@typescript-deploys/pr-build 5.1.0-pr-54052-7 → 5.1.0-pr-54072-11
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 +33 -38
- package/lib/tsserver.js +33 -38
- package/lib/tsserverlibrary.js +33 -38
- package/lib/typescript.js +33 -38
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
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.1";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230501`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -61671,7 +61671,7 @@ function createTypeChecker(host) {
|
|
|
61671
61671
|
}
|
|
61672
61672
|
}
|
|
61673
61673
|
}
|
|
61674
|
-
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])
|
|
61674
|
+
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target;
|
|
61675
61675
|
return filtered.flags & 131072 /* Never */ ? target : filtered;
|
|
61676
61676
|
}
|
|
61677
61677
|
function isWeakType(type) {
|
|
@@ -63565,14 +63565,14 @@ function createTypeChecker(host) {
|
|
|
63565
63565
|
const inference = context.inferences[index];
|
|
63566
63566
|
if (!inference.inferredType) {
|
|
63567
63567
|
let inferredType;
|
|
63568
|
-
|
|
63569
|
-
if (signature) {
|
|
63570
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
63571
|
-
|
|
63572
|
-
|
|
63573
|
-
|
|
63574
|
-
|
|
63575
|
-
|
|
63568
|
+
let fallbackType;
|
|
63569
|
+
if (context.signature) {
|
|
63570
|
+
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
63571
|
+
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
63572
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
63573
|
+
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && every(inference.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other === inference || getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
63574
|
+
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
63575
|
+
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
63576
63576
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
63577
63577
|
inferredType = silentNeverType;
|
|
63578
63578
|
} else {
|
|
@@ -63589,7 +63589,7 @@ function createTypeChecker(host) {
|
|
|
63589
63589
|
if (constraint) {
|
|
63590
63590
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
63591
63591
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
63592
|
-
inference.inferredType =
|
|
63592
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
63593
63593
|
}
|
|
63594
63594
|
}
|
|
63595
63595
|
}
|
|
@@ -90414,6 +90414,19 @@ function transformLegacyDecorators(context) {
|
|
|
90414
90414
|
let members = visitNodes2(node.members, visitor, isClassElement);
|
|
90415
90415
|
let decorationStatements = [];
|
|
90416
90416
|
({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));
|
|
90417
|
+
const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member));
|
|
90418
|
+
if (assignClassAliasInStaticBlock) {
|
|
90419
|
+
members = setTextRange(factory2.createNodeArray([
|
|
90420
|
+
factory2.createClassStaticBlockDeclaration(
|
|
90421
|
+
factory2.createBlock([
|
|
90422
|
+
factory2.createExpressionStatement(
|
|
90423
|
+
factory2.createAssignment(classAlias, factory2.createThis())
|
|
90424
|
+
)
|
|
90425
|
+
])
|
|
90426
|
+
),
|
|
90427
|
+
...members
|
|
90428
|
+
]), members);
|
|
90429
|
+
}
|
|
90417
90430
|
const classExpression = factory2.createClassExpression(
|
|
90418
90431
|
modifiers,
|
|
90419
90432
|
name && isGeneratedIdentifier(name) ? void 0 : name,
|
|
@@ -90430,7 +90443,7 @@ function transformLegacyDecorators(context) {
|
|
|
90430
90443
|
void 0,
|
|
90431
90444
|
/*type*/
|
|
90432
90445
|
void 0,
|
|
90433
|
-
classAlias ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
90446
|
+
classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
90434
90447
|
);
|
|
90435
90448
|
setOriginalNode(varDecl, node);
|
|
90436
90449
|
let varModifiers;
|
|
@@ -93778,10 +93791,7 @@ function transformES2018(context) {
|
|
|
93778
93791
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
93779
93792
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
93780
93793
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
93781
|
-
const
|
|
93782
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
93783
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
93784
|
-
const statements = [];
|
|
93794
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
93785
93795
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
93786
93796
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
93787
93797
|
let bodyLocation;
|
|
@@ -93794,29 +93804,14 @@ function transformES2018(context) {
|
|
|
93794
93804
|
} else {
|
|
93795
93805
|
statements.push(statement);
|
|
93796
93806
|
}
|
|
93797
|
-
|
|
93798
|
-
|
|
93799
|
-
factory2.
|
|
93800
|
-
|
|
93801
|
-
|
|
93802
|
-
true
|
|
93803
|
-
),
|
|
93804
|
-
bodyLocation
|
|
93807
|
+
return setTextRange(
|
|
93808
|
+
factory2.createBlock(
|
|
93809
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
93810
|
+
/*multiLine*/
|
|
93811
|
+
true
|
|
93805
93812
|
),
|
|
93806
|
-
|
|
93813
|
+
bodyLocation
|
|
93807
93814
|
);
|
|
93808
|
-
return factory2.createBlock([
|
|
93809
|
-
iteratorValueStatement,
|
|
93810
|
-
exitNonUserCodeStatement,
|
|
93811
|
-
factory2.createTryStatement(
|
|
93812
|
-
body,
|
|
93813
|
-
/*catchClause*/
|
|
93814
|
-
void 0,
|
|
93815
|
-
factory2.createBlock([
|
|
93816
|
-
enterNonUserCodeStatement
|
|
93817
|
-
])
|
|
93818
|
-
)
|
|
93819
|
-
]);
|
|
93820
93815
|
}
|
|
93821
93816
|
function createDownlevelAwait(expression) {
|
|
93822
93817
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -93895,7 +93890,7 @@ function transformES2018(context) {
|
|
|
93895
93890
|
factory2.createLogicalNot(done)
|
|
93896
93891
|
]),
|
|
93897
93892
|
/*incrementor*/
|
|
93898
|
-
|
|
93893
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
93899
93894
|
/*statement*/
|
|
93900
93895
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
93901
93896
|
),
|
package/lib/tsserver.js
CHANGED
|
@@ -2303,7 +2303,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2303
2303
|
|
|
2304
2304
|
// src/compiler/corePublic.ts
|
|
2305
2305
|
var versionMajorMinor = "5.1";
|
|
2306
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2306
|
+
var version = `${versionMajorMinor}.0-insiders.20230501`;
|
|
2307
2307
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2308
2308
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2309
2309
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -66321,7 +66321,7 @@ function createTypeChecker(host) {
|
|
|
66321
66321
|
}
|
|
66322
66322
|
}
|
|
66323
66323
|
}
|
|
66324
|
-
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])
|
|
66324
|
+
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target;
|
|
66325
66325
|
return filtered.flags & 131072 /* Never */ ? target : filtered;
|
|
66326
66326
|
}
|
|
66327
66327
|
function isWeakType(type) {
|
|
@@ -68215,14 +68215,14 @@ function createTypeChecker(host) {
|
|
|
68215
68215
|
const inference = context.inferences[index];
|
|
68216
68216
|
if (!inference.inferredType) {
|
|
68217
68217
|
let inferredType;
|
|
68218
|
-
|
|
68219
|
-
if (signature) {
|
|
68220
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
68221
|
-
|
|
68222
|
-
|
|
68223
|
-
|
|
68224
|
-
|
|
68225
|
-
|
|
68218
|
+
let fallbackType;
|
|
68219
|
+
if (context.signature) {
|
|
68220
|
+
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
68221
|
+
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
68222
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
68223
|
+
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && every(inference.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other === inference || getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
68224
|
+
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
68225
|
+
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
68226
68226
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
68227
68227
|
inferredType = silentNeverType;
|
|
68228
68228
|
} else {
|
|
@@ -68239,7 +68239,7 @@ function createTypeChecker(host) {
|
|
|
68239
68239
|
if (constraint) {
|
|
68240
68240
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
68241
68241
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
68242
|
-
inference.inferredType =
|
|
68242
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
68243
68243
|
}
|
|
68244
68244
|
}
|
|
68245
68245
|
}
|
|
@@ -95235,6 +95235,19 @@ function transformLegacyDecorators(context) {
|
|
|
95235
95235
|
let members = visitNodes2(node.members, visitor, isClassElement);
|
|
95236
95236
|
let decorationStatements = [];
|
|
95237
95237
|
({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));
|
|
95238
|
+
const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member));
|
|
95239
|
+
if (assignClassAliasInStaticBlock) {
|
|
95240
|
+
members = setTextRange(factory2.createNodeArray([
|
|
95241
|
+
factory2.createClassStaticBlockDeclaration(
|
|
95242
|
+
factory2.createBlock([
|
|
95243
|
+
factory2.createExpressionStatement(
|
|
95244
|
+
factory2.createAssignment(classAlias, factory2.createThis())
|
|
95245
|
+
)
|
|
95246
|
+
])
|
|
95247
|
+
),
|
|
95248
|
+
...members
|
|
95249
|
+
]), members);
|
|
95250
|
+
}
|
|
95238
95251
|
const classExpression = factory2.createClassExpression(
|
|
95239
95252
|
modifiers,
|
|
95240
95253
|
name && isGeneratedIdentifier(name) ? void 0 : name,
|
|
@@ -95251,7 +95264,7 @@ function transformLegacyDecorators(context) {
|
|
|
95251
95264
|
void 0,
|
|
95252
95265
|
/*type*/
|
|
95253
95266
|
void 0,
|
|
95254
|
-
classAlias ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
95267
|
+
classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
95255
95268
|
);
|
|
95256
95269
|
setOriginalNode(varDecl, node);
|
|
95257
95270
|
let varModifiers;
|
|
@@ -98599,10 +98612,7 @@ function transformES2018(context) {
|
|
|
98599
98612
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
98600
98613
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
98601
98614
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
98602
|
-
const
|
|
98603
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
98604
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
98605
|
-
const statements = [];
|
|
98615
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
98606
98616
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
98607
98617
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
98608
98618
|
let bodyLocation;
|
|
@@ -98615,29 +98625,14 @@ function transformES2018(context) {
|
|
|
98615
98625
|
} else {
|
|
98616
98626
|
statements.push(statement);
|
|
98617
98627
|
}
|
|
98618
|
-
|
|
98619
|
-
|
|
98620
|
-
factory2.
|
|
98621
|
-
|
|
98622
|
-
|
|
98623
|
-
true
|
|
98624
|
-
),
|
|
98625
|
-
bodyLocation
|
|
98628
|
+
return setTextRange(
|
|
98629
|
+
factory2.createBlock(
|
|
98630
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
98631
|
+
/*multiLine*/
|
|
98632
|
+
true
|
|
98626
98633
|
),
|
|
98627
|
-
|
|
98634
|
+
bodyLocation
|
|
98628
98635
|
);
|
|
98629
|
-
return factory2.createBlock([
|
|
98630
|
-
iteratorValueStatement,
|
|
98631
|
-
exitNonUserCodeStatement,
|
|
98632
|
-
factory2.createTryStatement(
|
|
98633
|
-
body,
|
|
98634
|
-
/*catchClause*/
|
|
98635
|
-
void 0,
|
|
98636
|
-
factory2.createBlock([
|
|
98637
|
-
enterNonUserCodeStatement
|
|
98638
|
-
])
|
|
98639
|
-
)
|
|
98640
|
-
]);
|
|
98641
98636
|
}
|
|
98642
98637
|
function createDownlevelAwait(expression) {
|
|
98643
98638
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -98716,7 +98711,7 @@ function transformES2018(context) {
|
|
|
98716
98711
|
factory2.createLogicalNot(done)
|
|
98717
98712
|
]),
|
|
98718
98713
|
/*incrementor*/
|
|
98719
|
-
|
|
98714
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
98720
98715
|
/*statement*/
|
|
98721
98716
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
98722
98717
|
),
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230501`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -64113,7 +64113,7 @@ ${lanes.join("\n")}
|
|
|
64113
64113
|
}
|
|
64114
64114
|
}
|
|
64115
64115
|
}
|
|
64116
|
-
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])
|
|
64116
|
+
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target;
|
|
64117
64117
|
return filtered.flags & 131072 /* Never */ ? target : filtered;
|
|
64118
64118
|
}
|
|
64119
64119
|
function isWeakType(type) {
|
|
@@ -66007,14 +66007,14 @@ ${lanes.join("\n")}
|
|
|
66007
66007
|
const inference = context.inferences[index];
|
|
66008
66008
|
if (!inference.inferredType) {
|
|
66009
66009
|
let inferredType;
|
|
66010
|
-
|
|
66011
|
-
if (signature) {
|
|
66012
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
66013
|
-
|
|
66014
|
-
|
|
66015
|
-
|
|
66016
|
-
|
|
66017
|
-
|
|
66010
|
+
let fallbackType;
|
|
66011
|
+
if (context.signature) {
|
|
66012
|
+
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
66013
|
+
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
66014
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
66015
|
+
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && every(inference.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other === inference || getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
66016
|
+
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
66017
|
+
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
66018
66018
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
66019
66019
|
inferredType = silentNeverType;
|
|
66020
66020
|
} else {
|
|
@@ -66031,7 +66031,7 @@ ${lanes.join("\n")}
|
|
|
66031
66031
|
if (constraint) {
|
|
66032
66032
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
66033
66033
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
66034
|
-
inference.inferredType =
|
|
66034
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
66035
66035
|
}
|
|
66036
66036
|
}
|
|
66037
66037
|
}
|
|
@@ -93214,6 +93214,19 @@ ${lanes.join("\n")}
|
|
|
93214
93214
|
let members = visitNodes2(node.members, visitor, isClassElement);
|
|
93215
93215
|
let decorationStatements = [];
|
|
93216
93216
|
({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));
|
|
93217
|
+
const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member));
|
|
93218
|
+
if (assignClassAliasInStaticBlock) {
|
|
93219
|
+
members = setTextRange(factory2.createNodeArray([
|
|
93220
|
+
factory2.createClassStaticBlockDeclaration(
|
|
93221
|
+
factory2.createBlock([
|
|
93222
|
+
factory2.createExpressionStatement(
|
|
93223
|
+
factory2.createAssignment(classAlias, factory2.createThis())
|
|
93224
|
+
)
|
|
93225
|
+
])
|
|
93226
|
+
),
|
|
93227
|
+
...members
|
|
93228
|
+
]), members);
|
|
93229
|
+
}
|
|
93217
93230
|
const classExpression = factory2.createClassExpression(
|
|
93218
93231
|
modifiers,
|
|
93219
93232
|
name && isGeneratedIdentifier(name) ? void 0 : name,
|
|
@@ -93230,7 +93243,7 @@ ${lanes.join("\n")}
|
|
|
93230
93243
|
void 0,
|
|
93231
93244
|
/*type*/
|
|
93232
93245
|
void 0,
|
|
93233
|
-
classAlias ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
93246
|
+
classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
93234
93247
|
);
|
|
93235
93248
|
setOriginalNode(varDecl, node);
|
|
93236
93249
|
let varModifiers;
|
|
@@ -96596,10 +96609,7 @@ ${lanes.join("\n")}
|
|
|
96596
96609
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
96597
96610
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
96598
96611
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96599
|
-
const
|
|
96600
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
96601
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96602
|
-
const statements = [];
|
|
96612
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
96603
96613
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
96604
96614
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
96605
96615
|
let bodyLocation;
|
|
@@ -96612,29 +96622,14 @@ ${lanes.join("\n")}
|
|
|
96612
96622
|
} else {
|
|
96613
96623
|
statements.push(statement);
|
|
96614
96624
|
}
|
|
96615
|
-
|
|
96616
|
-
|
|
96617
|
-
factory2.
|
|
96618
|
-
|
|
96619
|
-
|
|
96620
|
-
true
|
|
96621
|
-
),
|
|
96622
|
-
bodyLocation
|
|
96625
|
+
return setTextRange(
|
|
96626
|
+
factory2.createBlock(
|
|
96627
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
96628
|
+
/*multiLine*/
|
|
96629
|
+
true
|
|
96623
96630
|
),
|
|
96624
|
-
|
|
96631
|
+
bodyLocation
|
|
96625
96632
|
);
|
|
96626
|
-
return factory2.createBlock([
|
|
96627
|
-
iteratorValueStatement,
|
|
96628
|
-
exitNonUserCodeStatement,
|
|
96629
|
-
factory2.createTryStatement(
|
|
96630
|
-
body,
|
|
96631
|
-
/*catchClause*/
|
|
96632
|
-
void 0,
|
|
96633
|
-
factory2.createBlock([
|
|
96634
|
-
enterNonUserCodeStatement
|
|
96635
|
-
])
|
|
96636
|
-
)
|
|
96637
|
-
]);
|
|
96638
96633
|
}
|
|
96639
96634
|
function createDownlevelAwait(expression) {
|
|
96640
96635
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -96713,7 +96708,7 @@ ${lanes.join("\n")}
|
|
|
96713
96708
|
factory2.createLogicalNot(done)
|
|
96714
96709
|
]),
|
|
96715
96710
|
/*incrementor*/
|
|
96716
|
-
|
|
96711
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
96717
96712
|
/*statement*/
|
|
96718
96713
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
96719
96714
|
),
|
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.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230501`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -64113,7 +64113,7 @@ ${lanes.join("\n")}
|
|
|
64113
64113
|
}
|
|
64114
64114
|
}
|
|
64115
64115
|
}
|
|
64116
|
-
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])
|
|
64116
|
+
const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target;
|
|
64117
64117
|
return filtered.flags & 131072 /* Never */ ? target : filtered;
|
|
64118
64118
|
}
|
|
64119
64119
|
function isWeakType(type) {
|
|
@@ -66007,14 +66007,14 @@ ${lanes.join("\n")}
|
|
|
66007
66007
|
const inference = context.inferences[index];
|
|
66008
66008
|
if (!inference.inferredType) {
|
|
66009
66009
|
let inferredType;
|
|
66010
|
-
|
|
66011
|
-
if (signature) {
|
|
66012
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
66013
|
-
|
|
66014
|
-
|
|
66015
|
-
|
|
66016
|
-
|
|
66017
|
-
|
|
66010
|
+
let fallbackType;
|
|
66011
|
+
if (context.signature) {
|
|
66012
|
+
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0;
|
|
66013
|
+
const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0;
|
|
66014
|
+
if (inferredCovariantType || inferredContravariantType) {
|
|
66015
|
+
const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && every(inference.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other === inference || getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType))));
|
|
66016
|
+
inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType;
|
|
66017
|
+
fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType;
|
|
66018
66018
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
66019
66019
|
inferredType = silentNeverType;
|
|
66020
66020
|
} else {
|
|
@@ -66031,7 +66031,7 @@ ${lanes.join("\n")}
|
|
|
66031
66031
|
if (constraint) {
|
|
66032
66032
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
66033
66033
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
66034
|
-
inference.inferredType =
|
|
66034
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
66035
66035
|
}
|
|
66036
66036
|
}
|
|
66037
66037
|
}
|
|
@@ -93214,6 +93214,19 @@ ${lanes.join("\n")}
|
|
|
93214
93214
|
let members = visitNodes2(node.members, visitor, isClassElement);
|
|
93215
93215
|
let decorationStatements = [];
|
|
93216
93216
|
({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members));
|
|
93217
|
+
const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member));
|
|
93218
|
+
if (assignClassAliasInStaticBlock) {
|
|
93219
|
+
members = setTextRange(factory2.createNodeArray([
|
|
93220
|
+
factory2.createClassStaticBlockDeclaration(
|
|
93221
|
+
factory2.createBlock([
|
|
93222
|
+
factory2.createExpressionStatement(
|
|
93223
|
+
factory2.createAssignment(classAlias, factory2.createThis())
|
|
93224
|
+
)
|
|
93225
|
+
])
|
|
93226
|
+
),
|
|
93227
|
+
...members
|
|
93228
|
+
]), members);
|
|
93229
|
+
}
|
|
93217
93230
|
const classExpression = factory2.createClassExpression(
|
|
93218
93231
|
modifiers,
|
|
93219
93232
|
name && isGeneratedIdentifier(name) ? void 0 : name,
|
|
@@ -93230,7 +93243,7 @@ ${lanes.join("\n")}
|
|
|
93230
93243
|
void 0,
|
|
93231
93244
|
/*type*/
|
|
93232
93245
|
void 0,
|
|
93233
|
-
classAlias ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
93246
|
+
classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression
|
|
93234
93247
|
);
|
|
93235
93248
|
setOriginalNode(varDecl, node);
|
|
93236
93249
|
let varModifiers;
|
|
@@ -96596,10 +96609,7 @@ ${lanes.join("\n")}
|
|
|
96596
96609
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
96597
96610
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
96598
96611
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96599
|
-
const
|
|
96600
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
96601
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96602
|
-
const statements = [];
|
|
96612
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
96603
96613
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
96604
96614
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
96605
96615
|
let bodyLocation;
|
|
@@ -96612,29 +96622,14 @@ ${lanes.join("\n")}
|
|
|
96612
96622
|
} else {
|
|
96613
96623
|
statements.push(statement);
|
|
96614
96624
|
}
|
|
96615
|
-
|
|
96616
|
-
|
|
96617
|
-
factory2.
|
|
96618
|
-
|
|
96619
|
-
|
|
96620
|
-
true
|
|
96621
|
-
),
|
|
96622
|
-
bodyLocation
|
|
96625
|
+
return setTextRange(
|
|
96626
|
+
factory2.createBlock(
|
|
96627
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
96628
|
+
/*multiLine*/
|
|
96629
|
+
true
|
|
96623
96630
|
),
|
|
96624
|
-
|
|
96631
|
+
bodyLocation
|
|
96625
96632
|
);
|
|
96626
|
-
return factory2.createBlock([
|
|
96627
|
-
iteratorValueStatement,
|
|
96628
|
-
exitNonUserCodeStatement,
|
|
96629
|
-
factory2.createTryStatement(
|
|
96630
|
-
body,
|
|
96631
|
-
/*catchClause*/
|
|
96632
|
-
void 0,
|
|
96633
|
-
factory2.createBlock([
|
|
96634
|
-
enterNonUserCodeStatement
|
|
96635
|
-
])
|
|
96636
|
-
)
|
|
96637
|
-
]);
|
|
96638
96633
|
}
|
|
96639
96634
|
function createDownlevelAwait(expression) {
|
|
96640
96635
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -96713,7 +96708,7 @@ ${lanes.join("\n")}
|
|
|
96713
96708
|
factory2.createLogicalNot(done)
|
|
96714
96709
|
]),
|
|
96715
96710
|
/*incrementor*/
|
|
96716
|
-
|
|
96711
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
96717
96712
|
/*statement*/
|
|
96718
96713
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
96719
96714
|
),
|
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.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230501`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-54072-11",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"node": "14.21.1",
|
|
117
117
|
"npm": "8.19.3"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "c8fcfa23862ff53c238f3b360a464cf8bc806ad3"
|
|
120
120
|
}
|