From cfd1a6e1275b094764495b8166716d7fe8f6637f Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Thu, 19 May 2022 21:36:16 +0000 Subject: [PATCH] Bump version to 4.7.2 and LKG --- lib/cancellationToken.js | 2 +- lib/tsc.js | 18 +++++++++--------- lib/tsserver.js | 18 +++++++++--------- lib/tsserverlibrary.js | 18 +++++++++--------- lib/typescript.js | 18 +++++++++--------- lib/typescriptServices.js | 18 +++++++++--------- lib/typingsInstaller.js | 18 +++++++++--------- package.json | 2 +- src/compiler/corePublic.ts | 2 +- 9 files changed, 57 insertions(+), 57 deletions(-) diff --git a/lib/cancellationToken.js b/lib/cancellationToken.js index 76a6a60e72976..0d4569c601b91 100644 --- a/lib/cancellationToken.js +++ b/lib/cancellationToken.js @@ -49,7 +49,7 @@ function createCancellationToken(args) { }, resetRequest: function (requestId) { if (currentRequestId_1 !== requestId) { - throw new Error("Mismatched request id, expected " + currentRequestId_1 + ", actual " + requestId); + throw new Error("Mismatched request id, expected ".concat(currentRequestId_1, ", actual ").concat(requestId)); } perRequestPipeName_1 = undefined; } diff --git a/lib/tsc.js b/lib/tsc.js index 3a32af8b74081..781b84ae4daff 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { var ts; (function (ts) { ts.versionMajorMinor = "4.7"; - ts.version = "".concat(ts.versionMajorMinor, ".1-rc"); + ts.version = "4.7.2"; var NativeCollections; (function (NativeCollections) { var globals = typeof globalThis !== "undefined" ? globalThis : @@ -48703,9 +48703,9 @@ var ts; t.flags & 2097152 ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 ? globalStringType : t.flags & 296 ? globalNumberType : - t.flags & 2112 ? getGlobalBigIntType(languageVersion >= 7) : + t.flags & 2112 ? getGlobalBigIntType() : t.flags & 528 ? globalBooleanType : - t.flags & 12288 ? getGlobalESSymbolType(languageVersion >= 2) : + t.flags & 12288 ? getGlobalESSymbolType() : t.flags & 67108864 ? emptyObjectType : t.flags & 4194304 ? keyofConstraintType : t.flags & 2 && !strictNullChecks ? emptyObjectType : @@ -50103,8 +50103,8 @@ var ts; function getGlobalESSymbolConstructorTypeSymbol(reportErrors) { return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors)); } - function getGlobalESSymbolType(reportErrors) { - return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, reportErrors))) || emptyObjectType; + function getGlobalESSymbolType() { + return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, false))) || emptyObjectType; } function getGlobalPromiseType(reportErrors) { return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors))) || emptyGenericType; @@ -50165,8 +50165,8 @@ var ts; deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", 1, reportErrors) || (reportErrors ? unknownSymbol : undefined)); return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol; } - function getGlobalBigIntType(reportErrors) { - return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, reportErrors))) || emptyObjectType; + function getGlobalBigIntType() { + return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType; } function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) { return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType; @@ -53872,7 +53872,7 @@ var ts; if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || - (getGlobalESSymbolType(false) === source && esSymbolType === target)) { + (getGlobalESSymbolType() === source && esSymbolType === target)) { reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); } } @@ -69114,7 +69114,7 @@ var ts; if (ts.isIdentifier(childNode)) { var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { - if (ts.isIdentifier(expr)) { + if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) { return true; } var testedExpression = testedNode.parent; diff --git a/lib/tsserver.js b/lib/tsserver.js index 7d28ab2e23e31..2cd21081a3706 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -100,7 +100,7 @@ var ts; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types - ts.version = "".concat(ts.versionMajorMinor, ".1-rc"); + ts.version = "4.7.2"; /* @internal */ var Comparison; (function (Comparison) { @@ -58896,9 +58896,9 @@ var ts; t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType : t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType : - t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 7 /* ScriptTarget.ES2020 */) : + t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType : - t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ScriptTarget.ES2015 */) : + t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType : t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType : @@ -60473,8 +60473,8 @@ var ts; function getGlobalESSymbolConstructorTypeSymbol(reportErrors) { return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors)); } - function getGlobalESSymbolType(reportErrors) { - return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalESSymbolType() { + return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } function getGlobalPromiseType(reportErrors) { return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType; @@ -60538,8 +60538,8 @@ var ts; deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined)); return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol; } - function getGlobalBigIntType(reportErrors) { - return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalBigIntType() { + return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } /** * Instantiates a global type that is generic with some element type, and returns that instantiation. @@ -64691,7 +64691,7 @@ var ts; if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || - (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) { + (getGlobalESSymbolType() === source && esSymbolType === target)) { reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); } } @@ -82503,7 +82503,7 @@ var ts; var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { // If the test was a simple identifier, the above check is sufficient - if (ts.isIdentifier(expr)) { + if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) { return true; } // Otherwise we need to ensure the symbol is called on the same target diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 69d71eaae93e4..54c7b5294982c 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -294,7 +294,7 @@ var ts; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types - ts.version = "".concat(ts.versionMajorMinor, ".1-rc"); + ts.version = "4.7.2"; /* @internal */ var Comparison; (function (Comparison) { @@ -59090,9 +59090,9 @@ var ts; t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType : t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType : - t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 7 /* ScriptTarget.ES2020 */) : + t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType : - t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ScriptTarget.ES2015 */) : + t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType : t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType : @@ -60667,8 +60667,8 @@ var ts; function getGlobalESSymbolConstructorTypeSymbol(reportErrors) { return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors)); } - function getGlobalESSymbolType(reportErrors) { - return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalESSymbolType() { + return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } function getGlobalPromiseType(reportErrors) { return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType; @@ -60732,8 +60732,8 @@ var ts; deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined)); return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol; } - function getGlobalBigIntType(reportErrors) { - return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalBigIntType() { + return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } /** * Instantiates a global type that is generic with some element type, and returns that instantiation. @@ -64885,7 +64885,7 @@ var ts; if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || - (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) { + (getGlobalESSymbolType() === source && esSymbolType === target)) { reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); } } @@ -82697,7 +82697,7 @@ var ts; var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { // If the test was a simple identifier, the above check is sufficient - if (ts.isIdentifier(expr)) { + if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) { return true; } // Otherwise we need to ensure the symbol is called on the same target diff --git a/lib/typescript.js b/lib/typescript.js index cd94f8f9414c0..8f41c15ff8d89 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -294,7 +294,7 @@ var ts; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types - ts.version = "".concat(ts.versionMajorMinor, ".1-rc"); + ts.version = "4.7.2"; /* @internal */ var Comparison; (function (Comparison) { @@ -59090,9 +59090,9 @@ var ts; t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType : t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType : - t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 7 /* ScriptTarget.ES2020 */) : + t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType : - t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ScriptTarget.ES2015 */) : + t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType : t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType : @@ -60667,8 +60667,8 @@ var ts; function getGlobalESSymbolConstructorTypeSymbol(reportErrors) { return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors)); } - function getGlobalESSymbolType(reportErrors) { - return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalESSymbolType() { + return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } function getGlobalPromiseType(reportErrors) { return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType; @@ -60732,8 +60732,8 @@ var ts; deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined)); return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol; } - function getGlobalBigIntType(reportErrors) { - return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalBigIntType() { + return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } /** * Instantiates a global type that is generic with some element type, and returns that instantiation. @@ -64885,7 +64885,7 @@ var ts; if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || - (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) { + (getGlobalESSymbolType() === source && esSymbolType === target)) { reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); } } @@ -82697,7 +82697,7 @@ var ts; var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { // If the test was a simple identifier, the above check is sufficient - if (ts.isIdentifier(expr)) { + if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) { return true; } // Otherwise we need to ensure the symbol is called on the same target diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 009bcd628e582..0d8b6b5f33a19 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -294,7 +294,7 @@ var ts; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types - ts.version = "".concat(ts.versionMajorMinor, ".1-rc"); + ts.version = "4.7.2"; /* @internal */ var Comparison; (function (Comparison) { @@ -59090,9 +59090,9 @@ var ts; t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType : t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType : - t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 7 /* ScriptTarget.ES2020 */) : + t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType : - t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ScriptTarget.ES2015 */) : + t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType : t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType : @@ -60667,8 +60667,8 @@ var ts; function getGlobalESSymbolConstructorTypeSymbol(reportErrors) { return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors)); } - function getGlobalESSymbolType(reportErrors) { - return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalESSymbolType() { + return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } function getGlobalPromiseType(reportErrors) { return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType; @@ -60732,8 +60732,8 @@ var ts; deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined)); return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol; } - function getGlobalBigIntType(reportErrors) { - return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalBigIntType() { + return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } /** * Instantiates a global type that is generic with some element type, and returns that instantiation. @@ -64885,7 +64885,7 @@ var ts; if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || - (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) { + (getGlobalESSymbolType() === source && esSymbolType === target)) { reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); } } @@ -82697,7 +82697,7 @@ var ts; var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { // If the test was a simple identifier, the above check is sufficient - if (ts.isIdentifier(expr)) { + if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) { return true; } // Otherwise we need to ensure the symbol is called on the same target diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index f00693896845f..38ae0d01eafc5 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -89,7 +89,7 @@ var ts; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types - ts.version = "".concat(ts.versionMajorMinor, ".1-rc"); + ts.version = "4.7.2"; /* @internal */ var Comparison; (function (Comparison) { @@ -58885,9 +58885,9 @@ var ts; t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType : t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType : - t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 7 /* ScriptTarget.ES2020 */) : + t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType : - t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ScriptTarget.ES2015 */) : + t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType : t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType : @@ -60462,8 +60462,8 @@ var ts; function getGlobalESSymbolConstructorTypeSymbol(reportErrors) { return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors)); } - function getGlobalESSymbolType(reportErrors) { - return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalESSymbolType() { + return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } function getGlobalPromiseType(reportErrors) { return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType; @@ -60527,8 +60527,8 @@ var ts; deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined)); return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol; } - function getGlobalBigIntType(reportErrors) { - return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType; + function getGlobalBigIntType() { + return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType; } /** * Instantiates a global type that is generic with some element type, and returns that instantiation. @@ -64680,7 +64680,7 @@ var ts; if ((globalStringType === source && stringType === target) || (globalNumberType === source && numberType === target) || (globalBooleanType === source && booleanType === target) || - (getGlobalESSymbolType(/*reportErrors*/ false) === source && esSymbolType === target)) { + (getGlobalESSymbolType() === source && esSymbolType === target)) { reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); } } @@ -82492,7 +82492,7 @@ var ts; var childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { // If the test was a simple identifier, the above check is sufficient - if (ts.isIdentifier(expr)) { + if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) { return true; } // Otherwise we need to ensure the symbol is called on the same target diff --git a/package.json b/package.json index 6fd0e004159ce..dea95f6f6676a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "4.7.1-rc", + "version": "4.7.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 dc8401539a7ac..f15552f526ff9 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -5,7 +5,7 @@ namespace ts { // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types - export const version = `${versionMajorMinor}.1-rc`; + export const version = "4.7.2" as string; /** * Type of objects whose values are all of the same type.