@typescript-deploys/pr-build 5.1.0-pr-54066-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 +18 -38
- package/lib/tsserver.js +18 -38
- package/lib/tsserverlibrary.js +18 -38
- package/lib/typescript.js +18 -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 = [];
|
|
@@ -56065,7 +56065,6 @@ function createTypeChecker(host) {
|
|
|
56065
56065
|
if (types.length === 1) {
|
|
56066
56066
|
return types[0];
|
|
56067
56067
|
}
|
|
56068
|
-
types = [...new Set(types)];
|
|
56069
56068
|
if (types.length === 2 && !origin && (types[0].flags & 1048576 /* Union */ || types[1].flags & 1048576 /* Union */)) {
|
|
56070
56069
|
const infix = unionReduction === 0 /* None */ ? "N" : unionReduction === 2 /* Subtype */ ? "S" : "L";
|
|
56071
56070
|
const index = types[0].id < types[1].id ? 0 : 1;
|
|
@@ -56337,7 +56336,6 @@ function createTypeChecker(host) {
|
|
|
56337
56336
|
return result;
|
|
56338
56337
|
}
|
|
56339
56338
|
function getIntersectionType(types, aliasSymbol, aliasTypeArguments, noSupertypeReduction) {
|
|
56340
|
-
types = [...new Set(types.slice().reverse())].reverse();
|
|
56341
56339
|
const typeMembershipMap = /* @__PURE__ */ new Map();
|
|
56342
56340
|
const includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
56343
56341
|
const typeSet = arrayFrom(typeMembershipMap.values());
|
|
@@ -63567,14 +63565,14 @@ function createTypeChecker(host) {
|
|
|
63567
63565
|
const inference = context.inferences[index];
|
|
63568
63566
|
if (!inference.inferredType) {
|
|
63569
63567
|
let inferredType;
|
|
63570
|
-
|
|
63571
|
-
if (signature) {
|
|
63572
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
63573
|
-
|
|
63574
|
-
|
|
63575
|
-
|
|
63576
|
-
|
|
63577
|
-
|
|
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;
|
|
63578
63576
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
63579
63577
|
inferredType = silentNeverType;
|
|
63580
63578
|
} else {
|
|
@@ -63591,7 +63589,7 @@ function createTypeChecker(host) {
|
|
|
63591
63589
|
if (constraint) {
|
|
63592
63590
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
63593
63591
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
63594
|
-
inference.inferredType =
|
|
63592
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
63595
63593
|
}
|
|
63596
63594
|
}
|
|
63597
63595
|
}
|
|
@@ -93793,10 +93791,7 @@ function transformES2018(context) {
|
|
|
93793
93791
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
93794
93792
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
93795
93793
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
93796
|
-
const
|
|
93797
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
93798
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
93799
|
-
const statements = [];
|
|
93794
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
93800
93795
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
93801
93796
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
93802
93797
|
let bodyLocation;
|
|
@@ -93809,29 +93804,14 @@ function transformES2018(context) {
|
|
|
93809
93804
|
} else {
|
|
93810
93805
|
statements.push(statement);
|
|
93811
93806
|
}
|
|
93812
|
-
|
|
93813
|
-
|
|
93814
|
-
factory2.
|
|
93815
|
-
|
|
93816
|
-
|
|
93817
|
-
true
|
|
93818
|
-
),
|
|
93819
|
-
bodyLocation
|
|
93807
|
+
return setTextRange(
|
|
93808
|
+
factory2.createBlock(
|
|
93809
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
93810
|
+
/*multiLine*/
|
|
93811
|
+
true
|
|
93820
93812
|
),
|
|
93821
|
-
|
|
93813
|
+
bodyLocation
|
|
93822
93814
|
);
|
|
93823
|
-
return factory2.createBlock([
|
|
93824
|
-
iteratorValueStatement,
|
|
93825
|
-
exitNonUserCodeStatement,
|
|
93826
|
-
factory2.createTryStatement(
|
|
93827
|
-
body,
|
|
93828
|
-
/*catchClause*/
|
|
93829
|
-
void 0,
|
|
93830
|
-
factory2.createBlock([
|
|
93831
|
-
enterNonUserCodeStatement
|
|
93832
|
-
])
|
|
93833
|
-
)
|
|
93834
|
-
]);
|
|
93835
93815
|
}
|
|
93836
93816
|
function createDownlevelAwait(expression) {
|
|
93837
93817
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -93910,7 +93890,7 @@ function transformES2018(context) {
|
|
|
93910
93890
|
factory2.createLogicalNot(done)
|
|
93911
93891
|
]),
|
|
93912
93892
|
/*incrementor*/
|
|
93913
|
-
|
|
93893
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
93914
93894
|
/*statement*/
|
|
93915
93895
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
93916
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";
|
|
@@ -60715,7 +60715,6 @@ function createTypeChecker(host) {
|
|
|
60715
60715
|
if (types.length === 1) {
|
|
60716
60716
|
return types[0];
|
|
60717
60717
|
}
|
|
60718
|
-
types = [...new Set(types)];
|
|
60719
60718
|
if (types.length === 2 && !origin && (types[0].flags & 1048576 /* Union */ || types[1].flags & 1048576 /* Union */)) {
|
|
60720
60719
|
const infix = unionReduction === 0 /* None */ ? "N" : unionReduction === 2 /* Subtype */ ? "S" : "L";
|
|
60721
60720
|
const index = types[0].id < types[1].id ? 0 : 1;
|
|
@@ -60987,7 +60986,6 @@ function createTypeChecker(host) {
|
|
|
60987
60986
|
return result;
|
|
60988
60987
|
}
|
|
60989
60988
|
function getIntersectionType(types, aliasSymbol, aliasTypeArguments, noSupertypeReduction) {
|
|
60990
|
-
types = [...new Set(types.slice().reverse())].reverse();
|
|
60991
60989
|
const typeMembershipMap = /* @__PURE__ */ new Map();
|
|
60992
60990
|
const includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
60993
60991
|
const typeSet = arrayFrom(typeMembershipMap.values());
|
|
@@ -68217,14 +68215,14 @@ function createTypeChecker(host) {
|
|
|
68217
68215
|
const inference = context.inferences[index];
|
|
68218
68216
|
if (!inference.inferredType) {
|
|
68219
68217
|
let inferredType;
|
|
68220
|
-
|
|
68221
|
-
if (signature) {
|
|
68222
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
68223
|
-
|
|
68224
|
-
|
|
68225
|
-
|
|
68226
|
-
|
|
68227
|
-
|
|
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;
|
|
68228
68226
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
68229
68227
|
inferredType = silentNeverType;
|
|
68230
68228
|
} else {
|
|
@@ -68241,7 +68239,7 @@ function createTypeChecker(host) {
|
|
|
68241
68239
|
if (constraint) {
|
|
68242
68240
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
68243
68241
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
68244
|
-
inference.inferredType =
|
|
68242
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
68245
68243
|
}
|
|
68246
68244
|
}
|
|
68247
68245
|
}
|
|
@@ -98614,10 +98612,7 @@ function transformES2018(context) {
|
|
|
98614
98612
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
98615
98613
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
98616
98614
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
98617
|
-
const
|
|
98618
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
98619
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
98620
|
-
const statements = [];
|
|
98615
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
98621
98616
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
98622
98617
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
98623
98618
|
let bodyLocation;
|
|
@@ -98630,29 +98625,14 @@ function transformES2018(context) {
|
|
|
98630
98625
|
} else {
|
|
98631
98626
|
statements.push(statement);
|
|
98632
98627
|
}
|
|
98633
|
-
|
|
98634
|
-
|
|
98635
|
-
factory2.
|
|
98636
|
-
|
|
98637
|
-
|
|
98638
|
-
true
|
|
98639
|
-
),
|
|
98640
|
-
bodyLocation
|
|
98628
|
+
return setTextRange(
|
|
98629
|
+
factory2.createBlock(
|
|
98630
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
98631
|
+
/*multiLine*/
|
|
98632
|
+
true
|
|
98641
98633
|
),
|
|
98642
|
-
|
|
98634
|
+
bodyLocation
|
|
98643
98635
|
);
|
|
98644
|
-
return factory2.createBlock([
|
|
98645
|
-
iteratorValueStatement,
|
|
98646
|
-
exitNonUserCodeStatement,
|
|
98647
|
-
factory2.createTryStatement(
|
|
98648
|
-
body,
|
|
98649
|
-
/*catchClause*/
|
|
98650
|
-
void 0,
|
|
98651
|
-
factory2.createBlock([
|
|
98652
|
-
enterNonUserCodeStatement
|
|
98653
|
-
])
|
|
98654
|
-
)
|
|
98655
|
-
]);
|
|
98656
98636
|
}
|
|
98657
98637
|
function createDownlevelAwait(expression) {
|
|
98658
98638
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -98731,7 +98711,7 @@ function transformES2018(context) {
|
|
|
98731
98711
|
factory2.createLogicalNot(done)
|
|
98732
98712
|
]),
|
|
98733
98713
|
/*incrementor*/
|
|
98734
|
-
|
|
98714
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
98735
98715
|
/*statement*/
|
|
98736
98716
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
98737
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";
|
|
@@ -58507,7 +58507,6 @@ ${lanes.join("\n")}
|
|
|
58507
58507
|
if (types.length === 1) {
|
|
58508
58508
|
return types[0];
|
|
58509
58509
|
}
|
|
58510
|
-
types = [...new Set(types)];
|
|
58511
58510
|
if (types.length === 2 && !origin && (types[0].flags & 1048576 /* Union */ || types[1].flags & 1048576 /* Union */)) {
|
|
58512
58511
|
const infix = unionReduction === 0 /* None */ ? "N" : unionReduction === 2 /* Subtype */ ? "S" : "L";
|
|
58513
58512
|
const index = types[0].id < types[1].id ? 0 : 1;
|
|
@@ -58779,7 +58778,6 @@ ${lanes.join("\n")}
|
|
|
58779
58778
|
return result;
|
|
58780
58779
|
}
|
|
58781
58780
|
function getIntersectionType(types, aliasSymbol, aliasTypeArguments, noSupertypeReduction) {
|
|
58782
|
-
types = [...new Set(types.slice().reverse())].reverse();
|
|
58783
58781
|
const typeMembershipMap = /* @__PURE__ */ new Map();
|
|
58784
58782
|
const includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
58785
58783
|
const typeSet = arrayFrom(typeMembershipMap.values());
|
|
@@ -66009,14 +66007,14 @@ ${lanes.join("\n")}
|
|
|
66009
66007
|
const inference = context.inferences[index];
|
|
66010
66008
|
if (!inference.inferredType) {
|
|
66011
66009
|
let inferredType;
|
|
66012
|
-
|
|
66013
|
-
if (signature) {
|
|
66014
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
66015
|
-
|
|
66016
|
-
|
|
66017
|
-
|
|
66018
|
-
|
|
66019
|
-
|
|
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;
|
|
66020
66018
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
66021
66019
|
inferredType = silentNeverType;
|
|
66022
66020
|
} else {
|
|
@@ -66033,7 +66031,7 @@ ${lanes.join("\n")}
|
|
|
66033
66031
|
if (constraint) {
|
|
66034
66032
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
66035
66033
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
66036
|
-
inference.inferredType =
|
|
66034
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
66037
66035
|
}
|
|
66038
66036
|
}
|
|
66039
66037
|
}
|
|
@@ -96611,10 +96609,7 @@ ${lanes.join("\n")}
|
|
|
96611
96609
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
96612
96610
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
96613
96611
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96614
|
-
const
|
|
96615
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
96616
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96617
|
-
const statements = [];
|
|
96612
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
96618
96613
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
96619
96614
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
96620
96615
|
let bodyLocation;
|
|
@@ -96627,29 +96622,14 @@ ${lanes.join("\n")}
|
|
|
96627
96622
|
} else {
|
|
96628
96623
|
statements.push(statement);
|
|
96629
96624
|
}
|
|
96630
|
-
|
|
96631
|
-
|
|
96632
|
-
factory2.
|
|
96633
|
-
|
|
96634
|
-
|
|
96635
|
-
true
|
|
96636
|
-
),
|
|
96637
|
-
bodyLocation
|
|
96625
|
+
return setTextRange(
|
|
96626
|
+
factory2.createBlock(
|
|
96627
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
96628
|
+
/*multiLine*/
|
|
96629
|
+
true
|
|
96638
96630
|
),
|
|
96639
|
-
|
|
96631
|
+
bodyLocation
|
|
96640
96632
|
);
|
|
96641
|
-
return factory2.createBlock([
|
|
96642
|
-
iteratorValueStatement,
|
|
96643
|
-
exitNonUserCodeStatement,
|
|
96644
|
-
factory2.createTryStatement(
|
|
96645
|
-
body,
|
|
96646
|
-
/*catchClause*/
|
|
96647
|
-
void 0,
|
|
96648
|
-
factory2.createBlock([
|
|
96649
|
-
enterNonUserCodeStatement
|
|
96650
|
-
])
|
|
96651
|
-
)
|
|
96652
|
-
]);
|
|
96653
96633
|
}
|
|
96654
96634
|
function createDownlevelAwait(expression) {
|
|
96655
96635
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -96728,7 +96708,7 @@ ${lanes.join("\n")}
|
|
|
96728
96708
|
factory2.createLogicalNot(done)
|
|
96729
96709
|
]),
|
|
96730
96710
|
/*incrementor*/
|
|
96731
|
-
|
|
96711
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
96732
96712
|
/*statement*/
|
|
96733
96713
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
96734
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";
|
|
@@ -58507,7 +58507,6 @@ ${lanes.join("\n")}
|
|
|
58507
58507
|
if (types.length === 1) {
|
|
58508
58508
|
return types[0];
|
|
58509
58509
|
}
|
|
58510
|
-
types = [...new Set(types)];
|
|
58511
58510
|
if (types.length === 2 && !origin && (types[0].flags & 1048576 /* Union */ || types[1].flags & 1048576 /* Union */)) {
|
|
58512
58511
|
const infix = unionReduction === 0 /* None */ ? "N" : unionReduction === 2 /* Subtype */ ? "S" : "L";
|
|
58513
58512
|
const index = types[0].id < types[1].id ? 0 : 1;
|
|
@@ -58779,7 +58778,6 @@ ${lanes.join("\n")}
|
|
|
58779
58778
|
return result;
|
|
58780
58779
|
}
|
|
58781
58780
|
function getIntersectionType(types, aliasSymbol, aliasTypeArguments, noSupertypeReduction) {
|
|
58782
|
-
types = [...new Set(types.slice().reverse())].reverse();
|
|
58783
58781
|
const typeMembershipMap = /* @__PURE__ */ new Map();
|
|
58784
58782
|
const includes = addTypesToIntersection(typeMembershipMap, 0, types);
|
|
58785
58783
|
const typeSet = arrayFrom(typeMembershipMap.values());
|
|
@@ -66009,14 +66007,14 @@ ${lanes.join("\n")}
|
|
|
66009
66007
|
const inference = context.inferences[index];
|
|
66010
66008
|
if (!inference.inferredType) {
|
|
66011
66009
|
let inferredType;
|
|
66012
|
-
|
|
66013
|
-
if (signature) {
|
|
66014
|
-
const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
|
|
66015
|
-
|
|
66016
|
-
|
|
66017
|
-
|
|
66018
|
-
|
|
66019
|
-
|
|
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;
|
|
66020
66018
|
} else if (context.flags & 1 /* NoDefault */) {
|
|
66021
66019
|
inferredType = silentNeverType;
|
|
66022
66020
|
} else {
|
|
@@ -66033,7 +66031,7 @@ ${lanes.join("\n")}
|
|
|
66033
66031
|
if (constraint) {
|
|
66034
66032
|
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
|
|
66035
66033
|
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
|
|
66036
|
-
inference.inferredType =
|
|
66034
|
+
inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
|
|
66037
66035
|
}
|
|
66038
66036
|
}
|
|
66039
66037
|
}
|
|
@@ -96611,10 +96609,7 @@ ${lanes.join("\n")}
|
|
|
96611
96609
|
const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse());
|
|
96612
96610
|
const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression);
|
|
96613
96611
|
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96614
|
-
const
|
|
96615
|
-
const enterNonUserCodeStatement = factory2.createExpressionStatement(enterNonUserCodeExpression);
|
|
96616
|
-
setSourceMapRange(exitNonUserCodeStatement, node.expression);
|
|
96617
|
-
const statements = [];
|
|
96612
|
+
const statements = [iteratorValueStatement, exitNonUserCodeStatement];
|
|
96618
96613
|
const binding = createForOfBindingStatement(factory2, node.initializer, value);
|
|
96619
96614
|
statements.push(visitNode(binding, visitor, isStatement));
|
|
96620
96615
|
let bodyLocation;
|
|
@@ -96627,29 +96622,14 @@ ${lanes.join("\n")}
|
|
|
96627
96622
|
} else {
|
|
96628
96623
|
statements.push(statement);
|
|
96629
96624
|
}
|
|
96630
|
-
|
|
96631
|
-
|
|
96632
|
-
factory2.
|
|
96633
|
-
|
|
96634
|
-
|
|
96635
|
-
true
|
|
96636
|
-
),
|
|
96637
|
-
bodyLocation
|
|
96625
|
+
return setTextRange(
|
|
96626
|
+
factory2.createBlock(
|
|
96627
|
+
setTextRange(factory2.createNodeArray(statements), statementsLocation),
|
|
96628
|
+
/*multiLine*/
|
|
96629
|
+
true
|
|
96638
96630
|
),
|
|
96639
|
-
|
|
96631
|
+
bodyLocation
|
|
96640
96632
|
);
|
|
96641
|
-
return factory2.createBlock([
|
|
96642
|
-
iteratorValueStatement,
|
|
96643
|
-
exitNonUserCodeStatement,
|
|
96644
|
-
factory2.createTryStatement(
|
|
96645
|
-
body,
|
|
96646
|
-
/*catchClause*/
|
|
96647
|
-
void 0,
|
|
96648
|
-
factory2.createBlock([
|
|
96649
|
-
enterNonUserCodeStatement
|
|
96650
|
-
])
|
|
96651
|
-
)
|
|
96652
|
-
]);
|
|
96653
96633
|
}
|
|
96654
96634
|
function createDownlevelAwait(expression) {
|
|
96655
96635
|
return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression(
|
|
@@ -96728,7 +96708,7 @@ ${lanes.join("\n")}
|
|
|
96728
96708
|
factory2.createLogicalNot(done)
|
|
96729
96709
|
]),
|
|
96730
96710
|
/*incrementor*/
|
|
96731
|
-
|
|
96711
|
+
factory2.createAssignment(nonUserCode, factory2.createTrue()),
|
|
96732
96712
|
/*statement*/
|
|
96733
96713
|
convertForOfStatementHead(node, getValue, nonUserCode)
|
|
96734
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
|
}
|