Fix tests

This commit is contained in:
Andrew Branch committed 2022-03-14 16:02:42 -07:00
1 parent e5556b8d53
commit 6104a5cccb
7 files changed
+13 -20

No files matched your search

+4 -3
View File
@@ -1319,11 +1319,12 @@ namespace ts.server {
}
const auxiliaryProgram = auxiliaryProject.getLanguageService().getProgram()!;
const fileToSearch = Debug.checkDefined(auxiliaryProgram.getSourceFile(fileNameToSearch!));
const matches = FindAllReferences.Core.getTopMostDeclarationsInFile(candidate.name, fileToSearch);
const matches = FindAllReferences.Core.getTopMostDeclarationNamesInFile(candidate.name, fileToSearch);
for (const match of matches) {
const symbol = match.symbol || auxiliaryProgram.getTypeChecker().getSymbolAtLocation(match);
if (symbol) {
pushIfUnique(definitions, GoToDefinition.createDefinitionInfo(match, auxiliaryProgram.getTypeChecker(), symbol, match));
const decl = getDeclarationFromName(match);
if (symbol && decl) {
pushIfUnique(definitions, GoToDefinition.createDefinitionInfo(decl, auxiliaryProgram.getTypeChecker(), symbol, match));
}
}
}