diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2201a3aa30264..9581dde18bc0a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -39882,7 +39882,7 @@ namespace ts { && !(node.flags & NodeFlags.Ambient)) { const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol); const isType = !(target.flags & SymbolFlags.Value); - if (isType || typeOnlyAlias) { + if (isType || typeOnlyAlias || target.valueDeclaration?.flags! & NodeFlags.Ambient && isConstEnumOrConstEnumOnlyModule(target)) { switch (node.kind) { case SyntaxKind.ImportClause: case SyntaxKind.ImportSpecifier: