-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueenhancementNew feature or requestNew feature or requestpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"rules": {
"@typescript-eslint/prefer-readonly-parameter-types": "error"
}
}type MySpecialString = string & {
readonly ' __tag': unique symbol;
};
function custom1(arg: MySpecialString) {}
// or
declare const specialTag: unique symbol;
type MyOtherSpecialString = string & {
readonly [specialTag]: true;
}
function custom2(arg: MyOtherSpecialString) {}Expected Result
No error
Actual Result
Parameter should be a read only type
Additional Info
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 |
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueenhancementNew feature or requestNew feature or requestpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin