mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:13:54 -06:00
Make FAR handle non-existent imported symbols
This commit is contained in:
parent
70e9a5e6dc
commit
9c2b95dae3
@ -356,7 +356,7 @@ namespace ts.FindAllReferences.Core {
|
||||
|
||||
/** Core find-all-references algorithm for a normal symbol. */
|
||||
function getReferencedSymbolsForSymbol(symbol: Symbol, node: Node, sourceFiles: ReadonlyArray<SourceFile>, checker: TypeChecker, cancellationToken: CancellationToken, options: Options): SymbolAndEntries[] {
|
||||
symbol = skipPastExportOrImportSpecifierOrUnion(symbol, node, checker);
|
||||
symbol = skipPastExportOrImportSpecifierOrUnion(symbol, node, checker) || symbol;
|
||||
|
||||
// Compute the meaning from the location and the symbol it references
|
||||
const searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), symbol.declarations);
|
||||
|
||||
7
tests/cases/fourslash/findAllRefsBadImport.ts
Normal file
7
tests/cases/fourslash/findAllRefsBadImport.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////import { [|ab|] as [|cd|] } from "doesNotExist";
|
||||
|
||||
const [r0, r1] = test.ranges();
|
||||
verify.referencesOf(r0, [r1]);
|
||||
verify.referencesOf(r1, [r1]);
|
||||
Loading…
x
Reference in New Issue
Block a user