mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06:00
This commit is contained in:
parent
4c8937696f
commit
8795b75390
@ -107,6 +107,11 @@ namespace ts.FindAllReferences {
|
||||
if (namedBindings && namedBindings.kind === SyntaxKind.NamespaceImport) {
|
||||
handleNamespaceImport(direct, namedBindings.name);
|
||||
}
|
||||
else if (isDefaultImport(direct)) {
|
||||
const sourceFileLike = getSourceFileLikeForImportDeclaration(direct);
|
||||
addIndirectUser(sourceFileLike); // Add a check for indirect uses to handle synthetic default imports
|
||||
directImports.push(direct);
|
||||
}
|
||||
else {
|
||||
directImports.push(direct);
|
||||
}
|
||||
|
||||
12
tests/cases/fourslash/esModuleInteropFindAllReferences.ts
Normal file
12
tests/cases/fourslash/esModuleInteropFindAllReferences.ts
Normal file
@ -0,0 +1,12 @@
|
||||
// @esModuleInterop: true
|
||||
|
||||
// @Filename: /abc.d.ts
|
||||
////declare module "a" {
|
||||
//// export const [|x|]: number;
|
||||
////}
|
||||
|
||||
// @Filename: /b.ts
|
||||
////import * as a from "a";
|
||||
////a.[|x|];
|
||||
|
||||
verify.rangesReferenceEachOther();
|
||||
Loading…
x
Reference in New Issue
Block a user