@@ -57,6 +57,7 @@ import {
5757 isVariableDeclaration ,
5858 isVariableDeclarationInitializedToBareOrAccessedRequire ,
5959 isVariableStatement ,
60+ JSDocImportTypeTag ,
6061 ModifierFlags ,
6162 ModuleBlock ,
6263 ModuleDeclaration ,
@@ -138,7 +139,7 @@ interface AmbientModuleDeclaration extends ModuleDeclaration {
138139}
139140type SourceFileLike = SourceFile | AmbientModuleDeclaration ;
140141// Identifier for the case of `const x = require("y")`.
141- type Importer = AnyImportOrReExport | ValidImportTypeNode | Identifier ;
142+ type Importer = AnyImportOrReExport | ValidImportTypeNode | Identifier | JSDocImportTypeTag ;
142143type ImporterOrCallExpression = Importer | CallExpression ;
143144
144145/** Returns import statements that directly reference the exporting module, and a list of files that may access the module through a namespace. */
@@ -215,6 +216,7 @@ function getImportersForExport(
215216 break ;
216217
217218 case SyntaxKind . ImportDeclaration :
219+ case SyntaxKind . JSDocImportTypeTag :
218220 directImports . push ( direct ) ;
219221 const namedBindings = direct . importClause && direct . importClause . namedBindings ;
220222 if ( namedBindings && namedBindings . kind === SyntaxKind . NamespaceImport ) {
@@ -267,7 +269,7 @@ function getImportersForExport(
267269 } ) ;
268270 }
269271
270- function handleNamespaceImport ( importDeclaration : ImportEqualsDeclaration | ImportDeclaration , name : Identifier , isReExport : boolean , alreadyAddedDirect : boolean ) : void {
272+ function handleNamespaceImport ( importDeclaration : ImportEqualsDeclaration | ImportDeclaration | JSDocImportTypeTag , name : Identifier , isReExport : boolean , alreadyAddedDirect : boolean ) : void {
271273 if ( exportKind === ExportKind . ExportEquals ) {
272274 // This is a direct import, not import-as-namespace.
273275 if ( ! alreadyAddedDirect ) directImports . push ( importDeclaration ) ;
0 commit comments