Skip to content

Commit d421853

Browse files
committed
PR feedback
1 parent f0227ec commit d421853

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/services/findAllReferences.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ namespace ts.FindAllReferences.Core {
422422
return mergeReferences(program, moduleReferences, getReferencedSymbolsForSymbol(symbol, /*node*/ undefined, sourceFiles, sourceFilesSet, checker, cancellationToken, options));
423423
}
424424

425+
/**
426+
* Merges the references by sorting them (by file index in sourceFiles and their location in it) that point to same definition symbol
427+
*/
425428
function mergeReferences(program: Program, ...referencesToMerge: (SymbolAndEntries[] | undefined)[]): SymbolAndEntries[] | undefined {
426429
let result: SymbolAndEntries[] | undefined;
427430
for (const references of referencesToMerge) {

tests/cases/fourslash/findAllReferencesUmdModuleAsGlobalConst.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
//// "files": ["/src/index.ts", "typings/global.d.ts"]
3939
////}
4040

41+
// GH#29533
4142
// TODO:: this should be var THREE: typeof import instead of module name as var but thats existing issue and repros with quickInfo too.
4243
verify.singleReferenceGroup(`module "/node_modules/@types/three/index"
4344
var "/node_modules/@types/three/index": typeof import("/node_modules/@types/three/index")`);

0 commit comments

Comments
 (0)