PR feedback

This commit is contained in:
Sheetal Nandi
2019-01-23 10:45:20 -08:00
parent f0227ecb2c
commit d42185373a
2 changed files with 4 additions and 0 deletions

View File

@@ -422,6 +422,9 @@ namespace ts.FindAllReferences.Core {
return mergeReferences(program, moduleReferences, getReferencedSymbolsForSymbol(symbol, /*node*/ undefined, sourceFiles, sourceFilesSet, checker, cancellationToken, options));
}
/**
* Merges the references by sorting them (by file index in sourceFiles and their location in it) that point to same definition symbol
*/
function mergeReferences(program: Program, ...referencesToMerge: (SymbolAndEntries[] | undefined)[]): SymbolAndEntries[] | undefined {
let result: SymbolAndEntries[] | undefined;
for (const references of referencesToMerge) {

View File

@@ -38,6 +38,7 @@
//// "files": ["/src/index.ts", "typings/global.d.ts"]
////}
// GH#29533
// TODO:: this should be var THREE: typeof import instead of module name as var but thats existing issue and repros with quickInfo too.
verify.singleReferenceGroup(`module "/node_modules/@types/three/index"
var "/node_modules/@types/three/index": typeof import("/node_modules/@types/three/index")`);