diff --git a/snapshots/output/syntax/src/import.ts b/snapshots/output/syntax/src/import.ts index 46a59340..5a796855 100644 --- a/snapshots/output/syntax/src/import.ts +++ b/snapshots/output/syntax/src/import.ts @@ -34,7 +34,7 @@ newFunction() + // ^^^^^^^^^^^ reference syntax 1.0.0 src/`function.ts`/newFunction(). namespace.a.value -// ^^^^^^^^^ reference local 0 +// ^^^^^^^^^ reference syntax 1.0.0 src/`namespace.ts`/ // ^ reference syntax 1.0.0 src/`namespace.ts`/a/ // ^^^^^ reference syntax 1.0.0 src/`namespace.ts`/a/value. ) @@ -51,9 +51,9 @@ return import('./function').then(c => c.newFunction()) // ^^^^^^^^^^^^ reference syntax 1.0.0 src/`function.ts`/ // ^^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Promise#then(). -// ^ definition local 4 +// ^ definition local 3 // documentation ```ts\n(parameter) c: typeof import("/src/function")\n``` -// ^ reference local 4 +// ^ reference local 3 // ^^^^^^^^^^^ reference syntax 1.0.0 src/`function.ts`/newFunction(). } diff --git a/src/FileIndexer.ts b/src/FileIndexer.ts index 27f6a52b..6013c518 100644 --- a/src/FileIndexer.ts +++ b/src/FileIndexer.ts @@ -389,7 +389,11 @@ export class FileIndexer { return this.cached(node, this.scipSymbol(node.parent)) } - if (ts.isImportSpecifier(node) || ts.isImportClause(node)) { + if ( + ts.isImportSpecifier(node) || + ts.isImportClause(node) || + ts.isNamespaceImport(node) + ) { const tpe = this.checker.getTypeAtLocation(node) for (const declaration of tpe.symbol?.declarations || []) { return this.scipSymbol(declaration)