File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ function isNotReference(node) {
120
120
return parent . parameters . includes ( node ) ;
121
121
}
122
122
123
+ // `type Foo = { [Identifier in keyof string]: number; };`
124
+ case 'TSTypeParameter' : {
125
+ return parent . name === node ;
126
+ }
127
+
123
128
// `type Identifier = Foo`
124
129
case 'TSTypeAliasDeclaration' : {
125
130
return parent . id === node ;
Original file line number Diff line number Diff line change @@ -272,6 +272,7 @@ test.typescript({
272
272
'type ModuleRegistry = { [module: string]: string };' ,
273
273
'const module = 1; type ModuleRegistry = { [module: string]: string };' ,
274
274
'type module = number[]; type ModuleRegistry = { [module: string]: string };' ,
275
+ 'type Data = { [module in keyof string]: number; };' ,
275
276
'type ModuleRegistry = { [exports: string]: string };' ,
276
277
] ,
277
278
invalid : [ ] ,
You can’t perform that action at this time.
0 commit comments