diff --git a/lib/_tsc.js b/lib/_tsc.js index bbbf11249c5..586d0514b68 100644 --- a/lib/_tsc.js +++ b/lib/_tsc.js @@ -18,7 +18,7 @@ and limitations under the License. // src/compiler/corePublic.ts var versionMajorMinor = "5.8"; -var version = "5.8.1-rc"; +var version = "5.8.2"; // src/compiler/core.ts var emptyArray = []; @@ -85063,11 +85063,10 @@ function createTypeChecker(host) { return; } checkGrammarModifiers(node); - const isImportEquals = isInternalModuleImportEqualsDeclaration(node); - if (compilerOptions.erasableSyntaxOnly && isImportEquals && !(node.flags & 33554432 /* Ambient */)) { + if (compilerOptions.erasableSyntaxOnly && !(node.flags & 33554432 /* Ambient */)) { error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); } - if (isImportEquals || checkExternalImportOrExportDeclaration(node)) { + if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); markLinkedReferences(node, 6 /* ExportImportEquals */); if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { @@ -85187,6 +85186,9 @@ function createTypeChecker(host) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } + if (compilerOptions.erasableSyntaxOnly && node.isExportEquals && !(node.flags & 33554432 /* Ambient */)) { + error(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } const container = node.parent.kind === 307 /* SourceFile */ ? node.parent : node.parent.parent; if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { diff --git a/lib/typescript.js b/lib/typescript.js index 6db1e7b02a7..dc0fe9a56bb 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports); // src/compiler/corePublic.ts var versionMajorMinor = "5.8"; -var version = "5.8.1-rc"; +var version = "5.8.2"; var Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -89673,11 +89673,10 @@ function createTypeChecker(host) { return; } checkGrammarModifiers(node); - const isImportEquals = isInternalModuleImportEqualsDeclaration(node); - if (compilerOptions.erasableSyntaxOnly && isImportEquals && !(node.flags & 33554432 /* Ambient */)) { + if (compilerOptions.erasableSyntaxOnly && !(node.flags & 33554432 /* Ambient */)) { error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); } - if (isImportEquals || checkExternalImportOrExportDeclaration(node)) { + if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); markLinkedReferences(node, 6 /* ExportImportEquals */); if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { @@ -89797,6 +89796,9 @@ function createTypeChecker(host) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } + if (compilerOptions.erasableSyntaxOnly && node.isExportEquals && !(node.flags & 33554432 /* Ambient */)) { + error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } const container = node.parent.kind === 307 /* SourceFile */ ? node.parent : node.parent.parent; if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { diff --git a/package-lock.json b/package-lock.json index 2bc25a87c92..501846ce2c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typescript", - "version": "5.8.1-rc", + "version": "5.8.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "typescript", - "version": "5.8.1-rc", + "version": "5.8.2", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 10c89a1d465..285ab0e2465 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.8.1-rc", + "version": "5.8.2", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts index f3a94caf681..03814df54b5 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -3,7 +3,7 @@ export const versionMajorMinor = "5.8"; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ -export const version = "5.8.1-rc" as string; +export const version = "5.8.2" as string; /** * Type of objects whose values are all of the same type.