typescript 4.7.1-rc → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +9 -9
- package/lib/tsserver.js +9 -9
- package/lib/tsserverlibrary.js +9 -9
- package/lib/typescript.js +9 -9
- package/lib/typescriptServices.js +9 -9
- package/lib/typingsInstaller.js +9 -9
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version = "
|
|
72
|
+
ts.version = "4.7.2";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -48703,9 +48703,9 @@ var ts;
|
|
|
48703
48703
|
t.flags & 2097152 ? getApparentTypeOfIntersectionType(t) :
|
|
48704
48704
|
t.flags & 402653316 ? globalStringType :
|
|
48705
48705
|
t.flags & 296 ? globalNumberType :
|
|
48706
|
-
t.flags & 2112 ? getGlobalBigIntType(
|
|
48706
|
+
t.flags & 2112 ? getGlobalBigIntType() :
|
|
48707
48707
|
t.flags & 528 ? globalBooleanType :
|
|
48708
|
-
t.flags & 12288 ? getGlobalESSymbolType(
|
|
48708
|
+
t.flags & 12288 ? getGlobalESSymbolType() :
|
|
48709
48709
|
t.flags & 67108864 ? emptyObjectType :
|
|
48710
48710
|
t.flags & 4194304 ? keyofConstraintType :
|
|
48711
48711
|
t.flags & 2 && !strictNullChecks ? emptyObjectType :
|
|
@@ -50103,8 +50103,8 @@ var ts;
|
|
|
50103
50103
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
50104
50104
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
50105
50105
|
}
|
|
50106
|
-
function getGlobalESSymbolType(
|
|
50107
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0,
|
|
50106
|
+
function getGlobalESSymbolType() {
|
|
50107
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, false))) || emptyObjectType;
|
|
50108
50108
|
}
|
|
50109
50109
|
function getGlobalPromiseType(reportErrors) {
|
|
50110
50110
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors))) || emptyGenericType;
|
|
@@ -50165,8 +50165,8 @@ var ts;
|
|
|
50165
50165
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
50166
50166
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
50167
50167
|
}
|
|
50168
|
-
function getGlobalBigIntType(
|
|
50169
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0,
|
|
50168
|
+
function getGlobalBigIntType() {
|
|
50169
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType;
|
|
50170
50170
|
}
|
|
50171
50171
|
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
|
|
50172
50172
|
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
|
|
@@ -53872,7 +53872,7 @@ var ts;
|
|
|
53872
53872
|
if ((globalStringType === source && stringType === target) ||
|
|
53873
53873
|
(globalNumberType === source && numberType === target) ||
|
|
53874
53874
|
(globalBooleanType === source && booleanType === target) ||
|
|
53875
|
-
(getGlobalESSymbolType(
|
|
53875
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
53876
53876
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
53877
53877
|
}
|
|
53878
53878
|
}
|
|
@@ -69114,7 +69114,7 @@ var ts;
|
|
|
69114
69114
|
if (ts.isIdentifier(childNode)) {
|
|
69115
69115
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
69116
69116
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
69117
|
-
if (ts.isIdentifier(expr)) {
|
|
69117
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
69118
69118
|
return true;
|
|
69119
69119
|
}
|
|
69120
69120
|
var testedExpression = testedNode.parent;
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = "
|
|
103
|
+
ts.version = "4.7.2";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -58896,9 +58896,9 @@ var ts;
|
|
|
58896
58896
|
t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) :
|
|
58897
58897
|
t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType :
|
|
58898
58898
|
t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType :
|
|
58899
|
-
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(
|
|
58899
|
+
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() :
|
|
58900
58900
|
t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType :
|
|
58901
|
-
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(
|
|
58901
|
+
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() :
|
|
58902
58902
|
t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType :
|
|
58903
58903
|
t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType :
|
|
58904
58904
|
t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType :
|
|
@@ -60473,8 +60473,8 @@ var ts;
|
|
|
60473
60473
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
60474
60474
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
60475
60475
|
}
|
|
60476
|
-
function getGlobalESSymbolType(
|
|
60477
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60476
|
+
function getGlobalESSymbolType() {
|
|
60477
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60478
60478
|
}
|
|
60479
60479
|
function getGlobalPromiseType(reportErrors) {
|
|
60480
60480
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType;
|
|
@@ -60538,8 +60538,8 @@ var ts;
|
|
|
60538
60538
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
60539
60539
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
60540
60540
|
}
|
|
60541
|
-
function getGlobalBigIntType(
|
|
60542
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60541
|
+
function getGlobalBigIntType() {
|
|
60542
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60543
60543
|
}
|
|
60544
60544
|
/**
|
|
60545
60545
|
* Instantiates a global type that is generic with some element type, and returns that instantiation.
|
|
@@ -64691,7 +64691,7 @@ var ts;
|
|
|
64691
64691
|
if ((globalStringType === source && stringType === target) ||
|
|
64692
64692
|
(globalNumberType === source && numberType === target) ||
|
|
64693
64693
|
(globalBooleanType === source && booleanType === target) ||
|
|
64694
|
-
(getGlobalESSymbolType(
|
|
64694
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
64695
64695
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
64696
64696
|
}
|
|
64697
64697
|
}
|
|
@@ -82503,7 +82503,7 @@ var ts;
|
|
|
82503
82503
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
82504
82504
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
82505
82505
|
// If the test was a simple identifier, the above check is sufficient
|
|
82506
|
-
if (ts.isIdentifier(expr)) {
|
|
82506
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
82507
82507
|
return true;
|
|
82508
82508
|
}
|
|
82509
82509
|
// Otherwise we need to ensure the symbol is called on the same target
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "
|
|
297
|
+
ts.version = "4.7.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -59090,9 +59090,9 @@ var ts;
|
|
|
59090
59090
|
t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) :
|
|
59091
59091
|
t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType :
|
|
59092
59092
|
t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType :
|
|
59093
|
-
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(
|
|
59093
|
+
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() :
|
|
59094
59094
|
t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType :
|
|
59095
|
-
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(
|
|
59095
|
+
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() :
|
|
59096
59096
|
t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType :
|
|
59097
59097
|
t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType :
|
|
59098
59098
|
t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType :
|
|
@@ -60667,8 +60667,8 @@ var ts;
|
|
|
60667
60667
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
60668
60668
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
60669
60669
|
}
|
|
60670
|
-
function getGlobalESSymbolType(
|
|
60671
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60670
|
+
function getGlobalESSymbolType() {
|
|
60671
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60672
60672
|
}
|
|
60673
60673
|
function getGlobalPromiseType(reportErrors) {
|
|
60674
60674
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType;
|
|
@@ -60732,8 +60732,8 @@ var ts;
|
|
|
60732
60732
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
60733
60733
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
60734
60734
|
}
|
|
60735
|
-
function getGlobalBigIntType(
|
|
60736
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60735
|
+
function getGlobalBigIntType() {
|
|
60736
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60737
60737
|
}
|
|
60738
60738
|
/**
|
|
60739
60739
|
* Instantiates a global type that is generic with some element type, and returns that instantiation.
|
|
@@ -64885,7 +64885,7 @@ var ts;
|
|
|
64885
64885
|
if ((globalStringType === source && stringType === target) ||
|
|
64886
64886
|
(globalNumberType === source && numberType === target) ||
|
|
64887
64887
|
(globalBooleanType === source && booleanType === target) ||
|
|
64888
|
-
(getGlobalESSymbolType(
|
|
64888
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
64889
64889
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
64890
64890
|
}
|
|
64891
64891
|
}
|
|
@@ -82697,7 +82697,7 @@ var ts;
|
|
|
82697
82697
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
82698
82698
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
82699
82699
|
// If the test was a simple identifier, the above check is sufficient
|
|
82700
|
-
if (ts.isIdentifier(expr)) {
|
|
82700
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
82701
82701
|
return true;
|
|
82702
82702
|
}
|
|
82703
82703
|
// Otherwise we need to ensure the symbol is called on the same target
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "
|
|
297
|
+
ts.version = "4.7.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -59090,9 +59090,9 @@ var ts;
|
|
|
59090
59090
|
t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) :
|
|
59091
59091
|
t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType :
|
|
59092
59092
|
t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType :
|
|
59093
|
-
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(
|
|
59093
|
+
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() :
|
|
59094
59094
|
t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType :
|
|
59095
|
-
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(
|
|
59095
|
+
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() :
|
|
59096
59096
|
t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType :
|
|
59097
59097
|
t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType :
|
|
59098
59098
|
t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType :
|
|
@@ -60667,8 +60667,8 @@ var ts;
|
|
|
60667
60667
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
60668
60668
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
60669
60669
|
}
|
|
60670
|
-
function getGlobalESSymbolType(
|
|
60671
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60670
|
+
function getGlobalESSymbolType() {
|
|
60671
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60672
60672
|
}
|
|
60673
60673
|
function getGlobalPromiseType(reportErrors) {
|
|
60674
60674
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType;
|
|
@@ -60732,8 +60732,8 @@ var ts;
|
|
|
60732
60732
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
60733
60733
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
60734
60734
|
}
|
|
60735
|
-
function getGlobalBigIntType(
|
|
60736
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60735
|
+
function getGlobalBigIntType() {
|
|
60736
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60737
60737
|
}
|
|
60738
60738
|
/**
|
|
60739
60739
|
* Instantiates a global type that is generic with some element type, and returns that instantiation.
|
|
@@ -64885,7 +64885,7 @@ var ts;
|
|
|
64885
64885
|
if ((globalStringType === source && stringType === target) ||
|
|
64886
64886
|
(globalNumberType === source && numberType === target) ||
|
|
64887
64887
|
(globalBooleanType === source && booleanType === target) ||
|
|
64888
|
-
(getGlobalESSymbolType(
|
|
64888
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
64889
64889
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
64890
64890
|
}
|
|
64891
64891
|
}
|
|
@@ -82697,7 +82697,7 @@ var ts;
|
|
|
82697
82697
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
82698
82698
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
82699
82699
|
// If the test was a simple identifier, the above check is sufficient
|
|
82700
|
-
if (ts.isIdentifier(expr)) {
|
|
82700
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
82701
82701
|
return true;
|
|
82702
82702
|
}
|
|
82703
82703
|
// Otherwise we need to ensure the symbol is called on the same target
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "
|
|
297
|
+
ts.version = "4.7.2";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -59090,9 +59090,9 @@ var ts;
|
|
|
59090
59090
|
t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) :
|
|
59091
59091
|
t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType :
|
|
59092
59092
|
t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType :
|
|
59093
|
-
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(
|
|
59093
|
+
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() :
|
|
59094
59094
|
t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType :
|
|
59095
|
-
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(
|
|
59095
|
+
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() :
|
|
59096
59096
|
t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType :
|
|
59097
59097
|
t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType :
|
|
59098
59098
|
t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType :
|
|
@@ -60667,8 +60667,8 @@ var ts;
|
|
|
60667
60667
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
60668
60668
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
60669
60669
|
}
|
|
60670
|
-
function getGlobalESSymbolType(
|
|
60671
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60670
|
+
function getGlobalESSymbolType() {
|
|
60671
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60672
60672
|
}
|
|
60673
60673
|
function getGlobalPromiseType(reportErrors) {
|
|
60674
60674
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType;
|
|
@@ -60732,8 +60732,8 @@ var ts;
|
|
|
60732
60732
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
60733
60733
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
60734
60734
|
}
|
|
60735
|
-
function getGlobalBigIntType(
|
|
60736
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60735
|
+
function getGlobalBigIntType() {
|
|
60736
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60737
60737
|
}
|
|
60738
60738
|
/**
|
|
60739
60739
|
* Instantiates a global type that is generic with some element type, and returns that instantiation.
|
|
@@ -64885,7 +64885,7 @@ var ts;
|
|
|
64885
64885
|
if ((globalStringType === source && stringType === target) ||
|
|
64886
64886
|
(globalNumberType === source && numberType === target) ||
|
|
64887
64887
|
(globalBooleanType === source && booleanType === target) ||
|
|
64888
|
-
(getGlobalESSymbolType(
|
|
64888
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
64889
64889
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
64890
64890
|
}
|
|
64891
64891
|
}
|
|
@@ -82697,7 +82697,7 @@ var ts;
|
|
|
82697
82697
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
82698
82698
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
82699
82699
|
// If the test was a simple identifier, the above check is sufficient
|
|
82700
|
-
if (ts.isIdentifier(expr)) {
|
|
82700
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
82701
82701
|
return true;
|
|
82702
82702
|
}
|
|
82703
82703
|
// Otherwise we need to ensure the symbol is called on the same target
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "
|
|
92
|
+
ts.version = "4.7.2";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -58885,9 +58885,9 @@ var ts;
|
|
|
58885
58885
|
t.flags & 2097152 /* TypeFlags.Intersection */ ? getApparentTypeOfIntersectionType(t) :
|
|
58886
58886
|
t.flags & 402653316 /* TypeFlags.StringLike */ ? globalStringType :
|
|
58887
58887
|
t.flags & 296 /* TypeFlags.NumberLike */ ? globalNumberType :
|
|
58888
|
-
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType(
|
|
58888
|
+
t.flags & 2112 /* TypeFlags.BigIntLike */ ? getGlobalBigIntType() :
|
|
58889
58889
|
t.flags & 528 /* TypeFlags.BooleanLike */ ? globalBooleanType :
|
|
58890
|
-
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType(
|
|
58890
|
+
t.flags & 12288 /* TypeFlags.ESSymbolLike */ ? getGlobalESSymbolType() :
|
|
58891
58891
|
t.flags & 67108864 /* TypeFlags.NonPrimitive */ ? emptyObjectType :
|
|
58892
58892
|
t.flags & 4194304 /* TypeFlags.Index */ ? keyofConstraintType :
|
|
58893
58893
|
t.flags & 2 /* TypeFlags.Unknown */ && !strictNullChecks ? emptyObjectType :
|
|
@@ -60462,8 +60462,8 @@ var ts;
|
|
|
60462
60462
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
60463
60463
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
60464
60464
|
}
|
|
60465
|
-
function getGlobalESSymbolType(
|
|
60466
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60465
|
+
function getGlobalESSymbolType() {
|
|
60466
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60467
60467
|
}
|
|
60468
60468
|
function getGlobalPromiseType(reportErrors) {
|
|
60469
60469
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", /*arity*/ 1, reportErrors))) || emptyGenericType;
|
|
@@ -60527,8 +60527,8 @@ var ts;
|
|
|
60527
60527
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", /*arity*/ 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
60528
60528
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
60529
60529
|
}
|
|
60530
|
-
function getGlobalBigIntType(
|
|
60531
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, reportErrors))) || emptyObjectType;
|
|
60530
|
+
function getGlobalBigIntType() {
|
|
60531
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
60532
60532
|
}
|
|
60533
60533
|
/**
|
|
60534
60534
|
* Instantiates a global type that is generic with some element type, and returns that instantiation.
|
|
@@ -64680,7 +64680,7 @@ var ts;
|
|
|
64680
64680
|
if ((globalStringType === source && stringType === target) ||
|
|
64681
64681
|
(globalNumberType === source && numberType === target) ||
|
|
64682
64682
|
(globalBooleanType === source && booleanType === target) ||
|
|
64683
|
-
(getGlobalESSymbolType(
|
|
64683
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
64684
64684
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
64685
64685
|
}
|
|
64686
64686
|
}
|
|
@@ -82492,7 +82492,7 @@ var ts;
|
|
|
82492
82492
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
82493
82493
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
82494
82494
|
// If the test was a simple identifier, the above check is sufficient
|
|
82495
|
-
if (ts.isIdentifier(expr)) {
|
|
82495
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
82496
82496
|
return true;
|
|
82497
82497
|
}
|
|
82498
82498
|
// Otherwise we need to ensure the symbol is called on the same target
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.7.
|
|
5
|
+
"version": "4.7.2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|