Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 15, 2024
1 parent c53317f commit aa7646d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rules/ast/is-reference-identifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,18 @@ function isNotReference(node) {
return parent.parameters.includes(node);
}

// `@typescript-eslint/parse` v7
// `type Foo = { [Identifier in keyof string]: number; };`
case 'TSTypeParameter': {
return parent.name === node;
}

// `@typescript-eslint/parse` v8
// `type Foo = { [Identifier in keyof string]: number; };`
case 'TSMappedType': {
return parent.key === node;
}

// `type Identifier = Foo`
case 'TSTypeAliasDeclaration': {
return parent.id === node;
Expand Down

0 comments on commit aa7646d

Please sign in to comment.