typescript 5.3.1-rc → 5.3.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 +16 -21
- package/lib/tsserver.js +16 -21
- package/lib/typescript.js +16 -21
- package/lib/typingsInstaller.js +2 -4
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = "5.3.
|
|
21
|
+
var version = "5.3.2";
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -10961,7 +10961,7 @@ function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
|
10961
10961
|
return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */;
|
|
10962
10962
|
}
|
|
10963
10963
|
function isCallLikeOrFunctionLikeExpression(node) {
|
|
10964
|
-
return isCallLikeExpression(node) ||
|
|
10964
|
+
return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node);
|
|
10965
10965
|
}
|
|
10966
10966
|
function isCallLikeExpression(node) {
|
|
10967
10967
|
switch (node.kind) {
|
|
@@ -18823,10 +18823,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18823
18823
|
return update(updated, original);
|
|
18824
18824
|
}
|
|
18825
18825
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
18826
|
-
const text = typeof value === "number" ? value + "" : value;
|
|
18827
|
-
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
|
|
18828
18826
|
const node = createBaseDeclaration(9 /* NumericLiteral */);
|
|
18829
|
-
node.text =
|
|
18827
|
+
node.text = typeof value === "number" ? value + "" : value;
|
|
18830
18828
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
18831
18829
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
18832
18830
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
@@ -43682,7 +43680,7 @@ function createTypeChecker(host) {
|
|
|
43682
43680
|
const nodeLinks2 = getNodeLinks(node);
|
|
43683
43681
|
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
43684
43682
|
nodeLinks2.resolvedSignature = void 0;
|
|
43685
|
-
if (
|
|
43683
|
+
if (isFunctionExpressionOrArrowFunction(node)) {
|
|
43686
43684
|
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
43687
43685
|
const type = symbolLinks2.type;
|
|
43688
43686
|
cachedTypes2.push([symbolLinks2, type]);
|
|
@@ -48243,6 +48241,8 @@ function createTypeChecker(host) {
|
|
|
48243
48241
|
context.symbolDepth.set(id, depth + 1);
|
|
48244
48242
|
}
|
|
48245
48243
|
context.visitedTypes.add(typeId);
|
|
48244
|
+
const prevTrackedSymbols = context.trackedSymbols;
|
|
48245
|
+
context.trackedSymbols = void 0;
|
|
48246
48246
|
const startLength = context.approximateLength;
|
|
48247
48247
|
const result = transform(type2);
|
|
48248
48248
|
const addedLength = context.approximateLength - startLength;
|
|
@@ -48258,6 +48258,7 @@ function createTypeChecker(host) {
|
|
|
48258
48258
|
if (id) {
|
|
48259
48259
|
context.symbolDepth.set(id, depth);
|
|
48260
48260
|
}
|
|
48261
|
+
context.trackedSymbols = prevTrackedSymbols;
|
|
48261
48262
|
return result;
|
|
48262
48263
|
function deepCloneOrReuseNode(node) {
|
|
48263
48264
|
if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) {
|
|
@@ -48560,7 +48561,7 @@ function createTypeChecker(host) {
|
|
|
48560
48561
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
|
48561
48562
|
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
48562
48563
|
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
48563
|
-
if (propertyType !== writeType) {
|
|
48564
|
+
if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
|
|
48564
48565
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
48565
48566
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
48566
48567
|
typeElements.push(
|
|
@@ -49483,7 +49484,7 @@ function createTypeChecker(host) {
|
|
|
49483
49484
|
return factory.createStringLiteral(name, !!singleQuote);
|
|
49484
49485
|
}
|
|
49485
49486
|
if (isNumericLiteralName(name) && startsWith(name, "-")) {
|
|
49486
|
-
return factory.createComputedPropertyName(factory.
|
|
49487
|
+
return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
|
|
49487
49488
|
}
|
|
49488
49489
|
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
|
|
49489
49490
|
}
|
|
@@ -75350,14 +75351,9 @@ function createTypeChecker(host) {
|
|
|
75350
75351
|
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
75351
75352
|
case 11 /* StringLiteral */:
|
|
75352
75353
|
return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
|
|
75353
|
-
case 9 /* NumericLiteral */:
|
|
75354
|
+
case 9 /* NumericLiteral */:
|
|
75354
75355
|
checkGrammarNumericLiteral(node);
|
|
75355
|
-
|
|
75356
|
-
if (!isFinite(value)) {
|
|
75357
|
-
return numberType;
|
|
75358
|
-
}
|
|
75359
|
-
return getFreshTypeOfLiteralType(getNumberLiteralType(value));
|
|
75360
|
-
}
|
|
75356
|
+
return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text));
|
|
75361
75357
|
case 10 /* BigIntLiteral */:
|
|
75362
75358
|
checkGrammarBigIntLiteral(node);
|
|
75363
75359
|
return getFreshTypeOfLiteralType(getBigIntLiteralType({
|
|
@@ -82022,7 +82018,7 @@ function createTypeChecker(host) {
|
|
|
82022
82018
|
}
|
|
82023
82019
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
82024
82020
|
if (target === unknownSymbol) {
|
|
82025
|
-
return
|
|
82021
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
82026
82022
|
}
|
|
82027
82023
|
return !!(getSymbolFlags(
|
|
82028
82024
|
symbol,
|
|
@@ -82358,7 +82354,7 @@ function createTypeChecker(host) {
|
|
|
82358
82354
|
if (enumResult)
|
|
82359
82355
|
return enumResult;
|
|
82360
82356
|
const literalValue = type.value;
|
|
82361
|
-
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "
|
|
82357
|
+
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue);
|
|
82362
82358
|
}
|
|
82363
82359
|
function createLiteralConstValue(node, tracker) {
|
|
82364
82360
|
const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
|
|
@@ -88781,7 +88777,7 @@ function transformTypeScript(context) {
|
|
|
88781
88777
|
function transformEnumMemberDeclarationValue(member) {
|
|
88782
88778
|
const value = resolver.getConstantValue(member);
|
|
88783
88779
|
if (value !== void 0) {
|
|
88784
|
-
return typeof value === "string" ? factory2.createStringLiteral(value) :
|
|
88780
|
+
return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
|
|
88785
88781
|
} else {
|
|
88786
88782
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
88787
88783
|
if (member.initializer) {
|
|
@@ -102959,7 +102955,7 @@ function transformGenerators(context) {
|
|
|
102959
102955
|
if (labelExpressions === void 0) {
|
|
102960
102956
|
labelExpressions = [];
|
|
102961
102957
|
}
|
|
102962
|
-
const expression = factory2.createNumericLiteral(
|
|
102958
|
+
const expression = factory2.createNumericLiteral(-1);
|
|
102963
102959
|
if (labelExpressions[label] === void 0) {
|
|
102964
102960
|
labelExpressions[label] = [expression];
|
|
102965
102961
|
} else {
|
|
@@ -108834,8 +108830,7 @@ function transformDeclarations(context) {
|
|
|
108834
108830
|
if (shouldStripInternal(m))
|
|
108835
108831
|
return;
|
|
108836
108832
|
const constValue = resolver.getConstantValue(m);
|
|
108837
|
-
|
|
108838
|
-
return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
|
|
108833
|
+
return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m);
|
|
108839
108834
|
}))
|
|
108840
108835
|
));
|
|
108841
108836
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/compiler/corePublic.ts
|
|
2330
2330
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = "5.3.
|
|
2331
|
+
var version = "5.3.2";
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -14639,7 +14639,7 @@ function isPropertyAccessOrQualifiedName(node) {
|
|
|
14639
14639
|
return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */;
|
|
14640
14640
|
}
|
|
14641
14641
|
function isCallLikeOrFunctionLikeExpression(node) {
|
|
14642
|
-
return isCallLikeExpression(node) ||
|
|
14642
|
+
return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node);
|
|
14643
14643
|
}
|
|
14644
14644
|
function isCallLikeExpression(node) {
|
|
14645
14645
|
switch (node.kind) {
|
|
@@ -23031,10 +23031,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
23031
23031
|
return update(updated, original);
|
|
23032
23032
|
}
|
|
23033
23033
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
23034
|
-
const text = typeof value === "number" ? value + "" : value;
|
|
23035
|
-
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
|
|
23036
23034
|
const node = createBaseDeclaration(9 /* NumericLiteral */);
|
|
23037
|
-
node.text =
|
|
23035
|
+
node.text = typeof value === "number" ? value + "" : value;
|
|
23038
23036
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
23039
23037
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
23040
23038
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
@@ -48386,7 +48384,7 @@ function createTypeChecker(host) {
|
|
|
48386
48384
|
const nodeLinks2 = getNodeLinks(node);
|
|
48387
48385
|
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
48388
48386
|
nodeLinks2.resolvedSignature = void 0;
|
|
48389
|
-
if (
|
|
48387
|
+
if (isFunctionExpressionOrArrowFunction(node)) {
|
|
48390
48388
|
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
48391
48389
|
const type = symbolLinks2.type;
|
|
48392
48390
|
cachedTypes2.push([symbolLinks2, type]);
|
|
@@ -52947,6 +52945,8 @@ function createTypeChecker(host) {
|
|
|
52947
52945
|
context.symbolDepth.set(id, depth + 1);
|
|
52948
52946
|
}
|
|
52949
52947
|
context.visitedTypes.add(typeId);
|
|
52948
|
+
const prevTrackedSymbols = context.trackedSymbols;
|
|
52949
|
+
context.trackedSymbols = void 0;
|
|
52950
52950
|
const startLength = context.approximateLength;
|
|
52951
52951
|
const result = transform2(type2);
|
|
52952
52952
|
const addedLength = context.approximateLength - startLength;
|
|
@@ -52962,6 +52962,7 @@ function createTypeChecker(host) {
|
|
|
52962
52962
|
if (id) {
|
|
52963
52963
|
context.symbolDepth.set(id, depth);
|
|
52964
52964
|
}
|
|
52965
|
+
context.trackedSymbols = prevTrackedSymbols;
|
|
52965
52966
|
return result;
|
|
52966
52967
|
function deepCloneOrReuseNode(node) {
|
|
52967
52968
|
if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) {
|
|
@@ -53264,7 +53265,7 @@ function createTypeChecker(host) {
|
|
|
53264
53265
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
|
53265
53266
|
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
53266
53267
|
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
53267
|
-
if (propertyType !== writeType) {
|
|
53268
|
+
if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
|
|
53268
53269
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
53269
53270
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
53270
53271
|
typeElements.push(
|
|
@@ -54187,7 +54188,7 @@ function createTypeChecker(host) {
|
|
|
54187
54188
|
return factory.createStringLiteral(name, !!singleQuote);
|
|
54188
54189
|
}
|
|
54189
54190
|
if (isNumericLiteralName(name) && startsWith(name, "-")) {
|
|
54190
|
-
return factory.createComputedPropertyName(factory.
|
|
54191
|
+
return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
|
|
54191
54192
|
}
|
|
54192
54193
|
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
|
|
54193
54194
|
}
|
|
@@ -80054,14 +80055,9 @@ function createTypeChecker(host) {
|
|
|
80054
80055
|
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
80055
80056
|
case 11 /* StringLiteral */:
|
|
80056
80057
|
return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
|
|
80057
|
-
case 9 /* NumericLiteral */:
|
|
80058
|
+
case 9 /* NumericLiteral */:
|
|
80058
80059
|
checkGrammarNumericLiteral(node);
|
|
80059
|
-
|
|
80060
|
-
if (!isFinite(value)) {
|
|
80061
|
-
return numberType;
|
|
80062
|
-
}
|
|
80063
|
-
return getFreshTypeOfLiteralType(getNumberLiteralType(value));
|
|
80064
|
-
}
|
|
80060
|
+
return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text));
|
|
80065
80061
|
case 10 /* BigIntLiteral */:
|
|
80066
80062
|
checkGrammarBigIntLiteral(node);
|
|
80067
80063
|
return getFreshTypeOfLiteralType(getBigIntLiteralType({
|
|
@@ -86726,7 +86722,7 @@ function createTypeChecker(host) {
|
|
|
86726
86722
|
}
|
|
86727
86723
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
86728
86724
|
if (target === unknownSymbol) {
|
|
86729
|
-
return
|
|
86725
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
86730
86726
|
}
|
|
86731
86727
|
return !!(getSymbolFlags(
|
|
86732
86728
|
symbol,
|
|
@@ -87062,7 +87058,7 @@ function createTypeChecker(host) {
|
|
|
87062
87058
|
if (enumResult)
|
|
87063
87059
|
return enumResult;
|
|
87064
87060
|
const literalValue = type.value;
|
|
87065
|
-
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "
|
|
87061
|
+
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue);
|
|
87066
87062
|
}
|
|
87067
87063
|
function createLiteralConstValue(node, tracker) {
|
|
87068
87064
|
const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
|
|
@@ -93656,7 +93652,7 @@ function transformTypeScript(context) {
|
|
|
93656
93652
|
function transformEnumMemberDeclarationValue(member) {
|
|
93657
93653
|
const value = resolver.getConstantValue(member);
|
|
93658
93654
|
if (value !== void 0) {
|
|
93659
|
-
return typeof value === "string" ? factory2.createStringLiteral(value) :
|
|
93655
|
+
return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
|
|
93660
93656
|
} else {
|
|
93661
93657
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
93662
93658
|
if (member.initializer) {
|
|
@@ -107834,7 +107830,7 @@ function transformGenerators(context) {
|
|
|
107834
107830
|
if (labelExpressions === void 0) {
|
|
107835
107831
|
labelExpressions = [];
|
|
107836
107832
|
}
|
|
107837
|
-
const expression = factory2.createNumericLiteral(
|
|
107833
|
+
const expression = factory2.createNumericLiteral(-1);
|
|
107838
107834
|
if (labelExpressions[label] === void 0) {
|
|
107839
107835
|
labelExpressions[label] = [expression];
|
|
107840
107836
|
} else {
|
|
@@ -113709,8 +113705,7 @@ function transformDeclarations(context) {
|
|
|
113709
113705
|
if (shouldStripInternal(m))
|
|
113710
113706
|
return;
|
|
113711
113707
|
const constValue = resolver.getConstantValue(m);
|
|
113712
|
-
|
|
113713
|
-
return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
|
|
113708
|
+
return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m);
|
|
113714
113709
|
}))
|
|
113715
113710
|
));
|
|
113716
113711
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = "5.3.
|
|
38
|
+
version = "5.3.2";
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -12428,7 +12428,7 @@ ${lanes.join("\n")}
|
|
|
12428
12428
|
return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */;
|
|
12429
12429
|
}
|
|
12430
12430
|
function isCallLikeOrFunctionLikeExpression(node) {
|
|
12431
|
-
return isCallLikeExpression(node) ||
|
|
12431
|
+
return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node);
|
|
12432
12432
|
}
|
|
12433
12433
|
function isCallLikeExpression(node) {
|
|
12434
12434
|
switch (node.kind) {
|
|
@@ -20845,10 +20845,8 @@ ${lanes.join("\n")}
|
|
|
20845
20845
|
return update(updated, original);
|
|
20846
20846
|
}
|
|
20847
20847
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
20848
|
-
const text = typeof value === "number" ? value + "" : value;
|
|
20849
|
-
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
|
|
20850
20848
|
const node = createBaseDeclaration(9 /* NumericLiteral */);
|
|
20851
|
-
node.text =
|
|
20849
|
+
node.text = typeof value === "number" ? value + "" : value;
|
|
20852
20850
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
20853
20851
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
20854
20852
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
@@ -46153,7 +46151,7 @@ ${lanes.join("\n")}
|
|
|
46153
46151
|
const nodeLinks2 = getNodeLinks(node);
|
|
46154
46152
|
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
46155
46153
|
nodeLinks2.resolvedSignature = void 0;
|
|
46156
|
-
if (
|
|
46154
|
+
if (isFunctionExpressionOrArrowFunction(node)) {
|
|
46157
46155
|
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
46158
46156
|
const type = symbolLinks2.type;
|
|
46159
46157
|
cachedTypes2.push([symbolLinks2, type]);
|
|
@@ -50714,6 +50712,8 @@ ${lanes.join("\n")}
|
|
|
50714
50712
|
context.symbolDepth.set(id, depth + 1);
|
|
50715
50713
|
}
|
|
50716
50714
|
context.visitedTypes.add(typeId);
|
|
50715
|
+
const prevTrackedSymbols = context.trackedSymbols;
|
|
50716
|
+
context.trackedSymbols = void 0;
|
|
50717
50717
|
const startLength = context.approximateLength;
|
|
50718
50718
|
const result = transform2(type2);
|
|
50719
50719
|
const addedLength = context.approximateLength - startLength;
|
|
@@ -50729,6 +50729,7 @@ ${lanes.join("\n")}
|
|
|
50729
50729
|
if (id) {
|
|
50730
50730
|
context.symbolDepth.set(id, depth);
|
|
50731
50731
|
}
|
|
50732
|
+
context.trackedSymbols = prevTrackedSymbols;
|
|
50732
50733
|
return result;
|
|
50733
50734
|
function deepCloneOrReuseNode(node) {
|
|
50734
50735
|
if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) {
|
|
@@ -51031,7 +51032,7 @@ ${lanes.join("\n")}
|
|
|
51031
51032
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
|
51032
51033
|
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
51033
51034
|
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
51034
|
-
if (propertyType !== writeType) {
|
|
51035
|
+
if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
|
|
51035
51036
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
51036
51037
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
51037
51038
|
typeElements.push(
|
|
@@ -51954,7 +51955,7 @@ ${lanes.join("\n")}
|
|
|
51954
51955
|
return factory.createStringLiteral(name, !!singleQuote);
|
|
51955
51956
|
}
|
|
51956
51957
|
if (isNumericLiteralName(name) && startsWith(name, "-")) {
|
|
51957
|
-
return factory.createComputedPropertyName(factory.
|
|
51958
|
+
return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
|
|
51958
51959
|
}
|
|
51959
51960
|
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
|
|
51960
51961
|
}
|
|
@@ -77821,14 +77822,9 @@ ${lanes.join("\n")}
|
|
|
77821
77822
|
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
77822
77823
|
case 11 /* StringLiteral */:
|
|
77823
77824
|
return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
|
|
77824
|
-
case 9 /* NumericLiteral */:
|
|
77825
|
+
case 9 /* NumericLiteral */:
|
|
77825
77826
|
checkGrammarNumericLiteral(node);
|
|
77826
|
-
|
|
77827
|
-
if (!isFinite(value)) {
|
|
77828
|
-
return numberType;
|
|
77829
|
-
}
|
|
77830
|
-
return getFreshTypeOfLiteralType(getNumberLiteralType(value));
|
|
77831
|
-
}
|
|
77827
|
+
return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text));
|
|
77832
77828
|
case 10 /* BigIntLiteral */:
|
|
77833
77829
|
checkGrammarBigIntLiteral(node);
|
|
77834
77830
|
return getFreshTypeOfLiteralType(getBigIntLiteralType({
|
|
@@ -84493,7 +84489,7 @@ ${lanes.join("\n")}
|
|
|
84493
84489
|
}
|
|
84494
84490
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
84495
84491
|
if (target === unknownSymbol) {
|
|
84496
|
-
return
|
|
84492
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
84497
84493
|
}
|
|
84498
84494
|
return !!(getSymbolFlags(
|
|
84499
84495
|
symbol,
|
|
@@ -84829,7 +84825,7 @@ ${lanes.join("\n")}
|
|
|
84829
84825
|
if (enumResult)
|
|
84830
84826
|
return enumResult;
|
|
84831
84827
|
const literalValue = type.value;
|
|
84832
|
-
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "
|
|
84828
|
+
return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue);
|
|
84833
84829
|
}
|
|
84834
84830
|
function createLiteralConstValue(node, tracker) {
|
|
84835
84831
|
const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
|
|
@@ -91603,7 +91599,7 @@ ${lanes.join("\n")}
|
|
|
91603
91599
|
function transformEnumMemberDeclarationValue(member) {
|
|
91604
91600
|
const value = resolver.getConstantValue(member);
|
|
91605
91601
|
if (value !== void 0) {
|
|
91606
|
-
return typeof value === "string" ? factory2.createStringLiteral(value) :
|
|
91602
|
+
return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
|
|
91607
91603
|
} else {
|
|
91608
91604
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
91609
91605
|
if (member.initializer) {
|
|
@@ -105874,7 +105870,7 @@ ${lanes.join("\n")}
|
|
|
105874
105870
|
if (labelExpressions === void 0) {
|
|
105875
105871
|
labelExpressions = [];
|
|
105876
105872
|
}
|
|
105877
|
-
const expression = factory2.createNumericLiteral(
|
|
105873
|
+
const expression = factory2.createNumericLiteral(-1);
|
|
105878
105874
|
if (labelExpressions[label] === void 0) {
|
|
105879
105875
|
labelExpressions[label] = [expression];
|
|
105880
105876
|
} else {
|
|
@@ -111785,8 +111781,7 @@ ${lanes.join("\n")}
|
|
|
111785
111781
|
if (shouldStripInternal(m))
|
|
111786
111782
|
return;
|
|
111787
111783
|
const constValue = resolver.getConstantValue(m);
|
|
111788
|
-
|
|
111789
|
-
return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
|
|
111784
|
+
return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m);
|
|
111790
111785
|
}))
|
|
111791
111786
|
));
|
|
111792
111787
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = "5.3.
|
|
57
|
+
var version = "5.3.2";
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -13041,10 +13041,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13041
13041
|
return update(updated, original);
|
|
13042
13042
|
}
|
|
13043
13043
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
13044
|
-
const text = typeof value === "number" ? value + "" : value;
|
|
13045
|
-
Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
|
|
13046
13044
|
const node = createBaseDeclaration(9 /* NumericLiteral */);
|
|
13047
|
-
node.text =
|
|
13045
|
+
node.text = typeof value === "number" ? value + "" : value;
|
|
13048
13046
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
13049
13047
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
13050
13048
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
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": "5.3.
|
|
5
|
+
"version": "5.3.2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|