Skip to content

Commit 4edfb2a

Browse files
committed
Tidy diff
1 parent 0294793 commit 4edfb2a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/server/session.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,9 @@ namespace ts.server {
373373
return perProjectResults;
374374
}
375375

376-
// We need to de-duplicate and aggregate the results by choosing an authoritative version
377-
// of each definition and merging references from all the projects where they appear.
378-
379-
const results: ReferencedSymbol[] = [];
376+
// `isDefinition` is only (definitely) correct in `defaultProject` because we might
377+
// have started the other project searches from related symbols. Propagate the
378+
// correct results to all other projects.
380379

381380
const defaultProjectResults = perProjectResults.get(defaultProject)!;
382381
if (defaultProjectResults[0].references[0].isDefinition === undefined) {
@@ -426,7 +425,10 @@ namespace ts.server {
426425
});
427426
}
428427

429-
// TODO (acasey): skip this aggregation when simplifying results?
428+
// We need to de-duplicate and aggregate the results by choosing an authoritative version
429+
// of each definition and merging references from all the projects where they appear.
430+
431+
const results: ReferencedSymbol[] = [];
430432

431433
perProjectResults.forEach((projectResults, project) => {
432434
for (const referencedSymbol of projectResults) {

0 commit comments

Comments
 (0)