File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ namespace ts.FindAllReferences.Core {
273
273
}
274
274
}
275
275
276
- const symbol = checker . getSymbolAtLocation ( node ) ;
276
+ let symbol = checker . getSymbolAtLocation ( node ) ;
277
277
278
278
// Could not find a symbol e.g. unknown identifier
279
279
if ( ! symbol ) {
@@ -285,6 +285,9 @@ namespace ts.FindAllReferences.Core {
285
285
return undefined ;
286
286
}
287
287
288
+ // If this property is derived from another one, find references on the original property instead.
289
+ symbol = ( symbol as ts . SymbolLinks ) . syntheticOrigin || symbol ;
290
+
288
291
// The symbol was an internal symbol and does not have a declaration e.g. undefined symbol
289
292
if ( ! symbol . declarations || ! symbol . declarations . length ) {
290
293
return undefined ;
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////interface T { [|{| "isWriteAccess": true, "isDefinition": true |}a|]: number; }
4
+ ////type U = { readonly [K in keyof T]?: string };
5
+ ////declare const t: T;
6
+ ////t.[|a|];
7
+ ////declare const u: U;
8
+ ////u.[|a|];
9
+
10
+ verify . singleReferenceGroup ( "(property) T.a: number" ) ;
You can’t perform that action at this time.
0 commit comments