diff --git a/lib/tsc.js b/lib/tsc.js index 4c3cda93213c3..1dba6cec8172e 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -13848,7 +13848,7 @@ var ts; checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule) { + if (result && isInExternalModule && (meaning & 107455) === 107455) { var decls = result.declarations; if (decls && decls.length === 1 && decls[0].kind === 228) { error(errorLocation, ts.Diagnostics.Identifier_0_must_be_imported_from_a_module, name); diff --git a/lib/tsserver.js b/lib/tsserver.js index ec61c9c87a0d7..a86fd0178f06e 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -14844,7 +14844,7 @@ var ts; checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule) { + if (result && isInExternalModule && (meaning & 107455) === 107455) { var decls = result.declarations; if (decls && decls.length === 1 && decls[0].kind === 228) { error(errorLocation, ts.Diagnostics.Identifier_0_must_be_imported_from_a_module, name); diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index ec39a42fecfce..a494af9cc33ef 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -14844,7 +14844,7 @@ var ts; checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule) { + if (result && isInExternalModule && (meaning & 107455) === 107455) { var decls = result.declarations; if (decls && decls.length === 1 && decls[0].kind === 228) { error(errorLocation, ts.Diagnostics.Identifier_0_must_be_imported_from_a_module, name); diff --git a/lib/typescript.js b/lib/typescript.js index a4d02a9413af2..f4d1a6ceff633 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -17337,8 +17337,8 @@ var ts; checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - // If we're in an external module, we can't reference symbols created from UMD export declarations - if (result && isInExternalModule) { + // If we're in an external module, we can't reference value symbols created from UMD export declarations + if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) { var decls = result.declarations; if (decls && decls.length === 1 && decls[0].kind === 228 /* NamespaceExportDeclaration */) { error(errorLocation, ts.Diagnostics.Identifier_0_must_be_imported_from_a_module, name); diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index a4d02a9413af2..f4d1a6ceff633 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -17337,8 +17337,8 @@ var ts; checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - // If we're in an external module, we can't reference symbols created from UMD export declarations - if (result && isInExternalModule) { + // If we're in an external module, we can't reference value symbols created from UMD export declarations + if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) { var decls = result.declarations; if (decls && decls.length === 1 && decls[0].kind === 228 /* NamespaceExportDeclaration */) { error(errorLocation, ts.Diagnostics.Identifier_0_must_be_imported_from_a_module, name);