@typescript-deploys/pr-build 6.0.0-pr-62184-3 → 6.0.0-pr-62093-21
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 +47 -29
- package/lib/typescript.d.ts +5 -4
- package/lib/typescript.js +52 -33
- 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 = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20250820`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -46865,11 +46865,27 @@ function createTypeChecker(host) {
|
|
|
46865
46865
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
46866
46866
|
node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
|
|
46867
46867
|
if (node) {
|
|
46868
|
-
|
|
46868
|
+
const cachedResolvedSignatures = [];
|
|
46869
|
+
const cachedTypes2 = [];
|
|
46870
|
+
while (node) {
|
|
46871
|
+
const nodeLinks2 = getNodeLinks(node);
|
|
46872
|
+
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
46873
|
+
nodeLinks2.resolvedSignature = void 0;
|
|
46874
|
+
if (isFunctionExpressionOrArrowFunction(node)) {
|
|
46875
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
46876
|
+
const type = symbolLinks2.type;
|
|
46877
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
46878
|
+
symbolLinks2.type = void 0;
|
|
46879
|
+
}
|
|
46880
|
+
node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
|
|
46881
|
+
}
|
|
46869
46882
|
const result = fn();
|
|
46870
|
-
|
|
46871
|
-
|
|
46872
|
-
|
|
46883
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
46884
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
46885
|
+
}
|
|
46886
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
46887
|
+
symbolLinks2.type = type;
|
|
46888
|
+
}
|
|
46873
46889
|
return result;
|
|
46874
46890
|
}
|
|
46875
46891
|
return fn();
|
|
@@ -47342,10 +47358,7 @@ function createTypeChecker(host) {
|
|
|
47342
47358
|
var maximumSuggestionCount = 10;
|
|
47343
47359
|
var mergedSymbols = [];
|
|
47344
47360
|
var symbolLinks = [];
|
|
47345
|
-
var symbolLinksWithoutResolvedSignatureCaching;
|
|
47346
47361
|
var nodeLinks = [];
|
|
47347
|
-
var nodeLinksWithoutResolvedSignatureCaching;
|
|
47348
|
-
var sourceFileWithoutResolvedSignatureCaching;
|
|
47349
47362
|
var flowLoopCaches = [];
|
|
47350
47363
|
var flowLoopNodes = [];
|
|
47351
47364
|
var flowLoopKeys = [];
|
|
@@ -47814,19 +47827,11 @@ function createTypeChecker(host) {
|
|
|
47814
47827
|
function getSymbolLinks(symbol) {
|
|
47815
47828
|
if (symbol.flags & 33554432 /* Transient */) return symbol.links;
|
|
47816
47829
|
const id = getSymbolId(symbol);
|
|
47817
|
-
if (sourceFileWithoutResolvedSignatureCaching && symbol.valueDeclaration && (isFunctionExpressionOrArrowFunction(symbol.valueDeclaration) || tryGetRootParameterDeclaration(symbol.valueDeclaration)) && getSourceFileOfNode(symbol.valueDeclaration) === sourceFileWithoutResolvedSignatureCaching) {
|
|
47818
|
-
symbolLinksWithoutResolvedSignatureCaching ?? (symbolLinksWithoutResolvedSignatureCaching = []);
|
|
47819
|
-
return symbolLinksWithoutResolvedSignatureCaching[id] ?? (symbolLinksWithoutResolvedSignatureCaching[id] = new SymbolLinks());
|
|
47820
|
-
}
|
|
47821
47830
|
return symbolLinks[id] ?? (symbolLinks[id] = new SymbolLinks());
|
|
47822
47831
|
}
|
|
47823
47832
|
function getNodeLinks(node) {
|
|
47824
47833
|
const nodeId = getNodeId(node);
|
|
47825
|
-
|
|
47826
|
-
nodeLinksWithoutResolvedSignatureCaching ?? (nodeLinksWithoutResolvedSignatureCaching = []);
|
|
47827
|
-
return nodeLinksWithoutResolvedSignatureCaching[nodeId] ?? (nodeLinksWithoutResolvedSignatureCaching[nodeId] = new NodeLinks());
|
|
47828
|
-
}
|
|
47829
|
-
return nodeLinks[nodeId] ?? (nodeLinks[nodeId] = new NodeLinks());
|
|
47834
|
+
return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
|
|
47830
47835
|
}
|
|
47831
47836
|
function getSymbol(symbols, name, meaning) {
|
|
47832
47837
|
if (meaning) {
|
|
@@ -62554,7 +62559,7 @@ function createTypeChecker(host) {
|
|
|
62554
62559
|
context.nonFixingMapper = combineTypeMappers(context.nonFixingMapper, mapper);
|
|
62555
62560
|
}
|
|
62556
62561
|
if (!checkTypeDeferred) {
|
|
62557
|
-
inferTypes(context.inferences, checkType, extendsType,
|
|
62562
|
+
inferTypes(context.inferences, checkType, extendsType, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
|
|
62558
62563
|
}
|
|
62559
62564
|
combinedMapper = mapper ? combineTypeMappers(context.mapper, mapper) : context.mapper;
|
|
62560
62565
|
}
|
|
@@ -66241,7 +66246,7 @@ function createTypeChecker(host) {
|
|
|
66241
66246
|
0 /* None */,
|
|
66242
66247
|
isRelatedToWorker
|
|
66243
66248
|
);
|
|
66244
|
-
inferTypes(ctx.inferences, target2.extendsType, sourceExtends,
|
|
66249
|
+
inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
|
|
66245
66250
|
sourceExtends = instantiateType(sourceExtends, ctx.mapper);
|
|
66246
66251
|
mapper = ctx.mapper;
|
|
66247
66252
|
}
|
|
@@ -68506,7 +68511,7 @@ function createTypeChecker(host) {
|
|
|
68506
68511
|
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
68507
68512
|
let bivariant = false;
|
|
68508
68513
|
let propagationType;
|
|
68509
|
-
let inferencePriority =
|
|
68514
|
+
let inferencePriority = 4096 /* MaxValue */;
|
|
68510
68515
|
let visited;
|
|
68511
68516
|
let sourceStack;
|
|
68512
68517
|
let targetStack;
|
|
@@ -68581,13 +68586,18 @@ function createTypeChecker(host) {
|
|
|
68581
68586
|
if (candidate === blockedStringType) {
|
|
68582
68587
|
return;
|
|
68583
68588
|
}
|
|
68584
|
-
|
|
68589
|
+
const combinedPriority = priority | (inference.individualPriority || 0 /* None */);
|
|
68590
|
+
if (inference.priority === void 0 || priority < (inference.priority & ~512 /* DistributiveConditional */)) {
|
|
68585
68591
|
inference.candidates = void 0;
|
|
68586
68592
|
inference.contraCandidates = void 0;
|
|
68587
68593
|
inference.topLevel = true;
|
|
68588
|
-
inference.priority =
|
|
68594
|
+
inference.priority = combinedPriority;
|
|
68589
68595
|
}
|
|
68590
|
-
if (priority === inference.priority) {
|
|
68596
|
+
if (priority === (inference.priority & ~512 /* DistributiveConditional */)) {
|
|
68597
|
+
if (inference.priority > combinedPriority) {
|
|
68598
|
+
inference.priority = combinedPriority;
|
|
68599
|
+
clearCachedInferences(inferences);
|
|
68600
|
+
}
|
|
68591
68601
|
if (contravariant && !bivariant) {
|
|
68592
68602
|
if (!contains(inference.contraCandidates, candidate)) {
|
|
68593
68603
|
inference.contraCandidates = append(inference.contraCandidates, candidate);
|
|
@@ -68669,7 +68679,7 @@ function createTypeChecker(host) {
|
|
|
68669
68679
|
if (isGenericMappedType(source) && isGenericMappedType(target)) {
|
|
68670
68680
|
invokeOnce(source, target, inferFromGenericMappedTypes);
|
|
68671
68681
|
}
|
|
68672
|
-
if (!(priority &
|
|
68682
|
+
if (!(priority & 1024 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
|
|
68673
68683
|
const apparentSource = getApparentType(source);
|
|
68674
68684
|
if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) {
|
|
68675
68685
|
return inferFromTypes(apparentSource, target);
|
|
@@ -68708,7 +68718,7 @@ function createTypeChecker(host) {
|
|
|
68708
68718
|
}
|
|
68709
68719
|
(visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);
|
|
68710
68720
|
const saveInferencePriority = inferencePriority;
|
|
68711
|
-
inferencePriority =
|
|
68721
|
+
inferencePriority = 4096 /* MaxValue */;
|
|
68712
68722
|
const saveExpandingFlags = expandingFlags;
|
|
68713
68723
|
(sourceStack ?? (sourceStack = [])).push(source);
|
|
68714
68724
|
(targetStack ?? (targetStack = [])).push(target);
|
|
@@ -68758,7 +68768,7 @@ function createTypeChecker(host) {
|
|
|
68758
68768
|
contravariant = !contravariant;
|
|
68759
68769
|
}
|
|
68760
68770
|
function inferFromContravariantTypesIfStrictFunctionTypes(source, target) {
|
|
68761
|
-
if (strictFunctionTypes || priority &
|
|
68771
|
+
if (strictFunctionTypes || priority & 2048 /* AlwaysStrict */) {
|
|
68762
68772
|
inferFromContravariantTypes(source, target);
|
|
68763
68773
|
} else {
|
|
68764
68774
|
inferFromTypes(source, target);
|
|
@@ -68799,7 +68809,7 @@ function createTypeChecker(host) {
|
|
|
68799
68809
|
} else {
|
|
68800
68810
|
for (let i = 0; i < sources.length; i++) {
|
|
68801
68811
|
const saveInferencePriority = inferencePriority;
|
|
68802
|
-
inferencePriority =
|
|
68812
|
+
inferencePriority = 4096 /* MaxValue */;
|
|
68803
68813
|
inferFromTypes(sources[i], t);
|
|
68804
68814
|
if (inferencePriority === priority) matched[i] = true;
|
|
68805
68815
|
inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;
|
|
@@ -68878,6 +68888,11 @@ function createTypeChecker(host) {
|
|
|
68878
68888
|
return false;
|
|
68879
68889
|
}
|
|
68880
68890
|
function inferToConditionalType(source, target) {
|
|
68891
|
+
const info = target.root.isDistributive ? getInferenceInfoForType(getActualTypeVariable(target.checkType)) : void 0;
|
|
68892
|
+
const saveIndividualPriority = info == null ? void 0 : info.individualPriority;
|
|
68893
|
+
if (info) {
|
|
68894
|
+
info.individualPriority = (info.individualPriority || 0 /* None */) | 512 /* DistributiveConditional */;
|
|
68895
|
+
}
|
|
68881
68896
|
if (source.flags & 16777216 /* Conditional */) {
|
|
68882
68897
|
inferFromTypes(source.checkType, target.checkType);
|
|
68883
68898
|
inferFromTypes(source.extendsType, target.extendsType);
|
|
@@ -68887,6 +68902,9 @@ function createTypeChecker(host) {
|
|
|
68887
68902
|
const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];
|
|
68888
68903
|
inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 /* ContravariantConditional */ : 0);
|
|
68889
68904
|
}
|
|
68905
|
+
if (info) {
|
|
68906
|
+
info.individualPriority = saveIndividualPriority;
|
|
68907
|
+
}
|
|
68890
68908
|
}
|
|
68891
68909
|
function inferToTemplateLiteralType(source, target) {
|
|
68892
68910
|
const matches = inferTypesFromTemplateLiteralType(source, target);
|
|
@@ -69127,14 +69145,14 @@ function createTypeChecker(host) {
|
|
|
69127
69145
|
return candidates;
|
|
69128
69146
|
}
|
|
69129
69147
|
function getContravariantInference(inference) {
|
|
69130
|
-
return inference.priority &
|
|
69148
|
+
return inference.priority & 928 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
|
|
69131
69149
|
}
|
|
69132
69150
|
function getCovariantInference(inference, signature) {
|
|
69133
69151
|
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
|
|
69134
69152
|
const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
|
|
69135
69153
|
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
|
|
69136
69154
|
const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
|
|
69137
|
-
const unwidenedType = inference.priority &
|
|
69155
|
+
const unwidenedType = inference.priority & 928 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
|
|
69138
69156
|
return getWidenedType(unwidenedType);
|
|
69139
69157
|
}
|
|
69140
69158
|
function getInferredType(context, index) {
|
package/lib/typescript.d.ts
CHANGED
|
@@ -6893,10 +6893,11 @@ declare namespace ts {
|
|
|
6893
6893
|
ContravariantConditional = 64,
|
|
6894
6894
|
ReturnType = 128,
|
|
6895
6895
|
LiteralKeyof = 256,
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6896
|
+
DistributiveConditional = 512,
|
|
6897
|
+
NoConstraints = 1024,
|
|
6898
|
+
AlwaysStrict = 2048,
|
|
6899
|
+
MaxValue = 4096,
|
|
6900
|
+
PriorityImpliesCombination = 928,
|
|
6900
6901
|
Circularity = -1,
|
|
6901
6902
|
}
|
|
6902
6903
|
interface FileExtensionInfo {
|
package/lib/typescript.js
CHANGED
|
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2285
2285
|
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
|
2287
2287
|
var versionMajorMinor = "6.0";
|
|
2288
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2288
|
+
var version = `${versionMajorMinor}.0-insiders.20250820`;
|
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6641,10 +6641,11 @@ var InferencePriority = /* @__PURE__ */ ((InferencePriority2) => {
|
|
|
6641
6641
|
InferencePriority2[InferencePriority2["ContravariantConditional"] = 64] = "ContravariantConditional";
|
|
6642
6642
|
InferencePriority2[InferencePriority2["ReturnType"] = 128] = "ReturnType";
|
|
6643
6643
|
InferencePriority2[InferencePriority2["LiteralKeyof"] = 256] = "LiteralKeyof";
|
|
6644
|
-
InferencePriority2[InferencePriority2["
|
|
6645
|
-
InferencePriority2[InferencePriority2["
|
|
6646
|
-
InferencePriority2[InferencePriority2["
|
|
6647
|
-
InferencePriority2[InferencePriority2["
|
|
6644
|
+
InferencePriority2[InferencePriority2["DistributiveConditional"] = 512] = "DistributiveConditional";
|
|
6645
|
+
InferencePriority2[InferencePriority2["NoConstraints"] = 1024] = "NoConstraints";
|
|
6646
|
+
InferencePriority2[InferencePriority2["AlwaysStrict"] = 2048] = "AlwaysStrict";
|
|
6647
|
+
InferencePriority2[InferencePriority2["MaxValue"] = 4096] = "MaxValue";
|
|
6648
|
+
InferencePriority2[InferencePriority2["PriorityImpliesCombination"] = 928] = "PriorityImpliesCombination";
|
|
6648
6649
|
InferencePriority2[InferencePriority2["Circularity"] = -1] = "Circularity";
|
|
6649
6650
|
return InferencePriority2;
|
|
6650
6651
|
})(InferencePriority || {});
|
|
@@ -51473,11 +51474,27 @@ function createTypeChecker(host) {
|
|
|
51473
51474
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
51474
51475
|
node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
|
|
51475
51476
|
if (node) {
|
|
51476
|
-
|
|
51477
|
+
const cachedResolvedSignatures = [];
|
|
51478
|
+
const cachedTypes2 = [];
|
|
51479
|
+
while (node) {
|
|
51480
|
+
const nodeLinks2 = getNodeLinks(node);
|
|
51481
|
+
cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
|
|
51482
|
+
nodeLinks2.resolvedSignature = void 0;
|
|
51483
|
+
if (isFunctionExpressionOrArrowFunction(node)) {
|
|
51484
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
51485
|
+
const type = symbolLinks2.type;
|
|
51486
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
51487
|
+
symbolLinks2.type = void 0;
|
|
51488
|
+
}
|
|
51489
|
+
node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
|
|
51490
|
+
}
|
|
51477
51491
|
const result = fn();
|
|
51478
|
-
|
|
51479
|
-
|
|
51480
|
-
|
|
51492
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
51493
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
51494
|
+
}
|
|
51495
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
51496
|
+
symbolLinks2.type = type;
|
|
51497
|
+
}
|
|
51481
51498
|
return result;
|
|
51482
51499
|
}
|
|
51483
51500
|
return fn();
|
|
@@ -51950,10 +51967,7 @@ function createTypeChecker(host) {
|
|
|
51950
51967
|
var maximumSuggestionCount = 10;
|
|
51951
51968
|
var mergedSymbols = [];
|
|
51952
51969
|
var symbolLinks = [];
|
|
51953
|
-
var symbolLinksWithoutResolvedSignatureCaching;
|
|
51954
51970
|
var nodeLinks = [];
|
|
51955
|
-
var nodeLinksWithoutResolvedSignatureCaching;
|
|
51956
|
-
var sourceFileWithoutResolvedSignatureCaching;
|
|
51957
51971
|
var flowLoopCaches = [];
|
|
51958
51972
|
var flowLoopNodes = [];
|
|
51959
51973
|
var flowLoopKeys = [];
|
|
@@ -52422,19 +52436,11 @@ function createTypeChecker(host) {
|
|
|
52422
52436
|
function getSymbolLinks(symbol) {
|
|
52423
52437
|
if (symbol.flags & 33554432 /* Transient */) return symbol.links;
|
|
52424
52438
|
const id = getSymbolId(symbol);
|
|
52425
|
-
if (sourceFileWithoutResolvedSignatureCaching && symbol.valueDeclaration && (isFunctionExpressionOrArrowFunction(symbol.valueDeclaration) || tryGetRootParameterDeclaration(symbol.valueDeclaration)) && getSourceFileOfNode(symbol.valueDeclaration) === sourceFileWithoutResolvedSignatureCaching) {
|
|
52426
|
-
symbolLinksWithoutResolvedSignatureCaching ?? (symbolLinksWithoutResolvedSignatureCaching = []);
|
|
52427
|
-
return symbolLinksWithoutResolvedSignatureCaching[id] ?? (symbolLinksWithoutResolvedSignatureCaching[id] = new SymbolLinks());
|
|
52428
|
-
}
|
|
52429
52439
|
return symbolLinks[id] ?? (symbolLinks[id] = new SymbolLinks());
|
|
52430
52440
|
}
|
|
52431
52441
|
function getNodeLinks(node) {
|
|
52432
52442
|
const nodeId = getNodeId(node);
|
|
52433
|
-
|
|
52434
|
-
nodeLinksWithoutResolvedSignatureCaching ?? (nodeLinksWithoutResolvedSignatureCaching = []);
|
|
52435
|
-
return nodeLinksWithoutResolvedSignatureCaching[nodeId] ?? (nodeLinksWithoutResolvedSignatureCaching[nodeId] = new NodeLinks());
|
|
52436
|
-
}
|
|
52437
|
-
return nodeLinks[nodeId] ?? (nodeLinks[nodeId] = new NodeLinks());
|
|
52443
|
+
return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
|
|
52438
52444
|
}
|
|
52439
52445
|
function getSymbol2(symbols, name, meaning) {
|
|
52440
52446
|
if (meaning) {
|
|
@@ -67162,7 +67168,7 @@ function createTypeChecker(host) {
|
|
|
67162
67168
|
context.nonFixingMapper = combineTypeMappers(context.nonFixingMapper, mapper);
|
|
67163
67169
|
}
|
|
67164
67170
|
if (!checkTypeDeferred) {
|
|
67165
|
-
inferTypes(context.inferences, checkType, extendsType,
|
|
67171
|
+
inferTypes(context.inferences, checkType, extendsType, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
|
|
67166
67172
|
}
|
|
67167
67173
|
combinedMapper = mapper ? combineTypeMappers(context.mapper, mapper) : context.mapper;
|
|
67168
67174
|
}
|
|
@@ -70849,7 +70855,7 @@ function createTypeChecker(host) {
|
|
|
70849
70855
|
0 /* None */,
|
|
70850
70856
|
isRelatedToWorker
|
|
70851
70857
|
);
|
|
70852
|
-
inferTypes(ctx.inferences, target2.extendsType, sourceExtends,
|
|
70858
|
+
inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
|
|
70853
70859
|
sourceExtends = instantiateType(sourceExtends, ctx.mapper);
|
|
70854
70860
|
mapper = ctx.mapper;
|
|
70855
70861
|
}
|
|
@@ -73114,7 +73120,7 @@ function createTypeChecker(host) {
|
|
|
73114
73120
|
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
73115
73121
|
let bivariant = false;
|
|
73116
73122
|
let propagationType;
|
|
73117
|
-
let inferencePriority =
|
|
73123
|
+
let inferencePriority = 4096 /* MaxValue */;
|
|
73118
73124
|
let visited;
|
|
73119
73125
|
let sourceStack;
|
|
73120
73126
|
let targetStack;
|
|
@@ -73189,13 +73195,18 @@ function createTypeChecker(host) {
|
|
|
73189
73195
|
if (candidate === blockedStringType) {
|
|
73190
73196
|
return;
|
|
73191
73197
|
}
|
|
73192
|
-
|
|
73198
|
+
const combinedPriority = priority | (inference.individualPriority || 0 /* None */);
|
|
73199
|
+
if (inference.priority === void 0 || priority < (inference.priority & ~512 /* DistributiveConditional */)) {
|
|
73193
73200
|
inference.candidates = void 0;
|
|
73194
73201
|
inference.contraCandidates = void 0;
|
|
73195
73202
|
inference.topLevel = true;
|
|
73196
|
-
inference.priority =
|
|
73203
|
+
inference.priority = combinedPriority;
|
|
73197
73204
|
}
|
|
73198
|
-
if (priority === inference.priority) {
|
|
73205
|
+
if (priority === (inference.priority & ~512 /* DistributiveConditional */)) {
|
|
73206
|
+
if (inference.priority > combinedPriority) {
|
|
73207
|
+
inference.priority = combinedPriority;
|
|
73208
|
+
clearCachedInferences(inferences);
|
|
73209
|
+
}
|
|
73199
73210
|
if (contravariant && !bivariant) {
|
|
73200
73211
|
if (!contains(inference.contraCandidates, candidate)) {
|
|
73201
73212
|
inference.contraCandidates = append(inference.contraCandidates, candidate);
|
|
@@ -73277,7 +73288,7 @@ function createTypeChecker(host) {
|
|
|
73277
73288
|
if (isGenericMappedType(source) && isGenericMappedType(target)) {
|
|
73278
73289
|
invokeOnce(source, target, inferFromGenericMappedTypes);
|
|
73279
73290
|
}
|
|
73280
|
-
if (!(priority &
|
|
73291
|
+
if (!(priority & 1024 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
|
|
73281
73292
|
const apparentSource = getApparentType(source);
|
|
73282
73293
|
if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) {
|
|
73283
73294
|
return inferFromTypes(apparentSource, target);
|
|
@@ -73316,7 +73327,7 @@ function createTypeChecker(host) {
|
|
|
73316
73327
|
}
|
|
73317
73328
|
(visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);
|
|
73318
73329
|
const saveInferencePriority = inferencePriority;
|
|
73319
|
-
inferencePriority =
|
|
73330
|
+
inferencePriority = 4096 /* MaxValue */;
|
|
73320
73331
|
const saveExpandingFlags = expandingFlags;
|
|
73321
73332
|
(sourceStack ?? (sourceStack = [])).push(source);
|
|
73322
73333
|
(targetStack ?? (targetStack = [])).push(target);
|
|
@@ -73366,7 +73377,7 @@ function createTypeChecker(host) {
|
|
|
73366
73377
|
contravariant = !contravariant;
|
|
73367
73378
|
}
|
|
73368
73379
|
function inferFromContravariantTypesIfStrictFunctionTypes(source, target) {
|
|
73369
|
-
if (strictFunctionTypes || priority &
|
|
73380
|
+
if (strictFunctionTypes || priority & 2048 /* AlwaysStrict */) {
|
|
73370
73381
|
inferFromContravariantTypes(source, target);
|
|
73371
73382
|
} else {
|
|
73372
73383
|
inferFromTypes(source, target);
|
|
@@ -73407,7 +73418,7 @@ function createTypeChecker(host) {
|
|
|
73407
73418
|
} else {
|
|
73408
73419
|
for (let i = 0; i < sources.length; i++) {
|
|
73409
73420
|
const saveInferencePriority = inferencePriority;
|
|
73410
|
-
inferencePriority =
|
|
73421
|
+
inferencePriority = 4096 /* MaxValue */;
|
|
73411
73422
|
inferFromTypes(sources[i], t);
|
|
73412
73423
|
if (inferencePriority === priority) matched[i] = true;
|
|
73413
73424
|
inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;
|
|
@@ -73486,6 +73497,11 @@ function createTypeChecker(host) {
|
|
|
73486
73497
|
return false;
|
|
73487
73498
|
}
|
|
73488
73499
|
function inferToConditionalType(source, target) {
|
|
73500
|
+
const info = target.root.isDistributive ? getInferenceInfoForType(getActualTypeVariable(target.checkType)) : void 0;
|
|
73501
|
+
const saveIndividualPriority = info == null ? void 0 : info.individualPriority;
|
|
73502
|
+
if (info) {
|
|
73503
|
+
info.individualPriority = (info.individualPriority || 0 /* None */) | 512 /* DistributiveConditional */;
|
|
73504
|
+
}
|
|
73489
73505
|
if (source.flags & 16777216 /* Conditional */) {
|
|
73490
73506
|
inferFromTypes(source.checkType, target.checkType);
|
|
73491
73507
|
inferFromTypes(source.extendsType, target.extendsType);
|
|
@@ -73495,6 +73511,9 @@ function createTypeChecker(host) {
|
|
|
73495
73511
|
const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];
|
|
73496
73512
|
inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 /* ContravariantConditional */ : 0);
|
|
73497
73513
|
}
|
|
73514
|
+
if (info) {
|
|
73515
|
+
info.individualPriority = saveIndividualPriority;
|
|
73516
|
+
}
|
|
73498
73517
|
}
|
|
73499
73518
|
function inferToTemplateLiteralType(source, target) {
|
|
73500
73519
|
const matches = inferTypesFromTemplateLiteralType(source, target);
|
|
@@ -73735,14 +73754,14 @@ function createTypeChecker(host) {
|
|
|
73735
73754
|
return candidates;
|
|
73736
73755
|
}
|
|
73737
73756
|
function getContravariantInference(inference) {
|
|
73738
|
-
return inference.priority &
|
|
73757
|
+
return inference.priority & 928 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
|
|
73739
73758
|
}
|
|
73740
73759
|
function getCovariantInference(inference, signature) {
|
|
73741
73760
|
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
|
|
73742
73761
|
const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
|
|
73743
73762
|
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
|
|
73744
73763
|
const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
|
|
73745
|
-
const unwidenedType = inference.priority &
|
|
73764
|
+
const unwidenedType = inference.priority & 928 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
|
|
73746
73765
|
return getWidenedType(unwidenedType);
|
|
73747
73766
|
}
|
|
73748
73767
|
function getInferredType(context, index) {
|
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": "6.0.0-pr-
|
|
5
|
+
"version": "6.0.0-pr-62093-21",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|