You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -9800,12 +9804,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
9800
9804
case SyntaxKind.ImportClause: {
9801
9805
const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects
9802
9806
const specifier = bundled ? factory.createStringLiteral(generatedSpecifier) : (node as ImportClause).parent.moduleSpecifier;
@@ -9814,10 +9820,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
9814
9820
case SyntaxKind.NamespaceImport: {
9815
9821
const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects
9816
9822
const specifier = bundled ? factory.createStringLiteral(generatedSpecifier) : (node as NamespaceImport).parent.parent.moduleSpecifier;
9823
+
const isTypeOnly = isJSDocImportTag((node as NamespaceImport).parent.parent);
@@ -9839,11 +9846,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
9839
9846
case SyntaxKind.ImportSpecifier: {
9840
9847
const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); // generate specifier (even though we're reusing and existing one) for ambient module reference include side effects
9841
9848
const specifier = bundled ? factory.createStringLiteral(generatedSpecifier) : (node as ImportSpecifier).parent.parent.parent.moduleSpecifier;
9849
+
const isTypeOnly = isJSDocImportTag((node as ImportSpecifier).parent.parent.parent);
9842
9850
addResult(
9843
9851
factory.createImportDeclaration(
9844
9852
/*modifiers*/ undefined,
9845
9853
factory.createImportClause(
9846
-
/*isTypeOnly*/ false,
9854
+
isTypeOnly,
9847
9855
/*name*/ undefined,
9848
9856
factory.createNamedImports([
9849
9857
factory.createImportSpecifier(
@@ -42193,6 +42201,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
42193
42201
}
42194
42202
}
42195
42203
42204
+
function checkJSDocImportTag(node: JSDocImportTag) {
42205
+
checkImportAttributes(node);
42206
+
}
42207
+
42196
42208
function checkJSDocImplementsTag(node: JSDocImplementsTag): void {
42197
42209
const classLike = getEffectiveJSDocHost(node);
42198
42210
if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) {
@@ -46402,7 +46414,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
46402
46414
}
46403
46415
}
46404
46416
46405
-
function checkImportAttributes(declaration: ImportDeclaration | ExportDeclaration) {
46417
+
function checkImportAttributes(declaration: ImportDeclaration | ExportDeclaration | JSDocImportTag) {
0 commit comments