Skip to content

Playground: incorrect type causing false negatives #4493

Closed
@bradzacher

Description

@bradzacher
/* eslint "@typescript-eslint/prefer-readonly-parameter-types": "error" */

function foo(arg: string[]) {}

playground link

This should error because the array is mutable. But it doesn't.

Debugging a bit - for some reason the type of arg is {}.
Maybe there's a config issue somewhere?

cc @armano2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghas prthere is a PR raised to close thispackage: websiteIssues related to the @typescript-eslint website

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions