Closed
Description
Repro
{
"rules": {
"@typescript-eslint/prefer-readonly-parameter-types": "error"
}
}
interface CustomArrayType extends ReadonlyArray<string> {
readonly prop: string;
}
function custom1(arg: CustomArrayType) {}
Expected Result
No error
Actual Result
Parameter should be a read only type
Additional Info
This is the example within https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.25.0 |
@typescript-eslint/parser |
2.25.0 |
TypeScript |
3.8.3 |
ESLint |
6.8.0 |
node |
12.16.1 |
npm |
6.13.4 |