@typescript-deploys/pr-build 5.9.0-pr-58378-3 → 5.9.0-pr-61913-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 CHANGED
@@ -46848,40 +46848,32 @@ function createTypeChecker(host) {
46848
46848
  return arrayFrom(candidatesSet);
46849
46849
  }
46850
46850
  function runWithoutResolvedSignatureCaching(node, fn) {
46851
- const cachedResolvedSignatures = [];
46852
- const cachedTypes2 = [];
46853
46851
  node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
46854
- if (!node) {
46855
- return fn();
46856
- }
46857
- while (node) {
46858
- const nodeLinks2 = getNodeLinks(node);
46859
- cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature, nodeLinks2.flags]);
46860
- nodeLinks2.resolvedSignature = void 0;
46861
- nodeLinks2.flags = 0 /* None */;
46862
- if (isFunctionExpressionOrArrowFunction(node)) {
46863
- resetCachedSymbolTypes(node);
46864
- for (const parameter of node.parameters) {
46865
- resetCachedSymbolTypes(parameter);
46852
+ if (node) {
46853
+ const cachedResolvedSignatures = [];
46854
+ const cachedTypes2 = [];
46855
+ while (node) {
46856
+ const nodeLinks2 = getNodeLinks(node);
46857
+ cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
46858
+ nodeLinks2.resolvedSignature = void 0;
46859
+ if (isFunctionExpressionOrArrowFunction(node)) {
46860
+ const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
46861
+ const type = symbolLinks2.type;
46862
+ cachedTypes2.push([symbolLinks2, type]);
46863
+ symbolLinks2.type = void 0;
46866
46864
  }
46865
+ node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
46867
46866
  }
46868
- node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
46869
- }
46870
- const result = fn();
46871
- for (const [nodeLinks2, resolvedSignature, nodeCheckFlags] of cachedResolvedSignatures) {
46872
- nodeLinks2.resolvedSignature = resolvedSignature;
46873
- nodeLinks2.flags = nodeCheckFlags;
46874
- }
46875
- for (const [symbolLinks2, type] of cachedTypes2) {
46876
- symbolLinks2.type = type;
46877
- }
46878
- return result;
46879
- function resetCachedSymbolTypes(declaration) {
46880
- const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(declaration));
46881
- const type = symbolLinks2.type;
46882
- cachedTypes2.push([symbolLinks2, type]);
46883
- symbolLinks2.type = void 0;
46867
+ const result = fn();
46868
+ for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
46869
+ nodeLinks2.resolvedSignature = resolvedSignature;
46870
+ }
46871
+ for (const [symbolLinks2, type] of cachedTypes2) {
46872
+ symbolLinks2.type = type;
46873
+ }
46874
+ return result;
46884
46875
  }
46876
+ return fn();
46885
46877
  }
46886
46878
  function runWithInferenceBlockedFromSourceNode(node, fn) {
46887
46879
  const containingCall = findAncestor(node, isCallLikeExpression);
@@ -68421,7 +68413,7 @@ function createTypeChecker(host) {
68421
68413
  function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
68422
68414
  let bivariant = false;
68423
68415
  let propagationType;
68424
- let inferencePriority = 2048 /* MaxValue */;
68416
+ let inferencePriority = 4096 /* MaxValue */;
68425
68417
  let visited;
68426
68418
  let sourceStack;
68427
68419
  let targetStack;
@@ -68493,7 +68485,7 @@ function createTypeChecker(host) {
68493
68485
  }
68494
68486
  if (!inference.isFixed) {
68495
68487
  const candidate = propagationType || source;
68496
- if (candidate === blockedStringType) {
68488
+ if (candidate === blockedStringType || candidate.flags & 3 /* AnyOrUnknown */ && priority & 2048 /* ReturnMapper */) {
68497
68489
  return;
68498
68490
  }
68499
68491
  if (inference.priority === void 0 || priority < inference.priority) {
@@ -68623,7 +68615,7 @@ function createTypeChecker(host) {
68623
68615
  }
68624
68616
  (visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);
68625
68617
  const saveInferencePriority = inferencePriority;
68626
- inferencePriority = 2048 /* MaxValue */;
68618
+ inferencePriority = 4096 /* MaxValue */;
68627
68619
  const saveExpandingFlags = expandingFlags;
68628
68620
  (sourceStack ?? (sourceStack = [])).push(source);
68629
68621
  (targetStack ?? (targetStack = [])).push(target);
@@ -68714,7 +68706,7 @@ function createTypeChecker(host) {
68714
68706
  } else {
68715
68707
  for (let i = 0; i < sources.length; i++) {
68716
68708
  const saveInferencePriority = inferencePriority;
68717
- inferencePriority = 2048 /* MaxValue */;
68709
+ inferencePriority = 4096 /* MaxValue */;
68718
68710
  inferFromTypes(sources[i], t);
68719
68711
  if (inferencePriority === priority) matched[i] = true;
68720
68712
  inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;
@@ -69042,14 +69034,14 @@ function createTypeChecker(host) {
69042
69034
  return candidates;
69043
69035
  }
69044
69036
  function getContravariantInference(inference) {
69045
- return inference.priority & 416 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
69037
+ return inference.priority & 2464 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
69046
69038
  }
69047
69039
  function getCovariantInference(inference, signature) {
69048
69040
  const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
69049
69041
  const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
69050
69042
  const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
69051
69043
  const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
69052
- const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
69044
+ const unwidenedType = inference.priority & 2464 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
69053
69045
  return getWidenedType(unwidenedType);
69054
69046
  }
69055
69047
  function getInferredType(context, index) {
@@ -75714,7 +75706,7 @@ function createTypeChecker(host) {
75714
75706
  }
75715
75707
  const returnContext = createInferenceContext(signature.typeParameters, signature, context.flags);
75716
75708
  const returnSourceType = instantiateType(contextualType, outerContext && createOuterReturnMapper(outerContext));
75717
- inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType);
75709
+ inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType, 2048 /* ReturnMapper */);
75718
75710
  context.returnMapper = some(returnContext.inferences, hasInferenceCandidates) ? getMapperFromContext(cloneInferredPartOfContext(returnContext)) : void 0;
75719
75711
  }
75720
75712
  }
@@ -6894,8 +6894,9 @@ declare namespace ts {
6894
6894
  LiteralKeyof = 256,
6895
6895
  NoConstraints = 512,
6896
6896
  AlwaysStrict = 1024,
6897
- MaxValue = 2048,
6898
- PriorityImpliesCombination = 416,
6897
+ ReturnMapper = 2048,
6898
+ MaxValue = 4096,
6899
+ PriorityImpliesCombination = 2464,
6899
6900
  Circularity = -1,
6900
6901
  }
6901
6902
  interface FileExtensionInfo {
package/lib/typescript.js CHANGED
@@ -6643,8 +6643,9 @@ var InferencePriority = /* @__PURE__ */ ((InferencePriority2) => {
6643
6643
  InferencePriority2[InferencePriority2["LiteralKeyof"] = 256] = "LiteralKeyof";
6644
6644
  InferencePriority2[InferencePriority2["NoConstraints"] = 512] = "NoConstraints";
6645
6645
  InferencePriority2[InferencePriority2["AlwaysStrict"] = 1024] = "AlwaysStrict";
6646
- InferencePriority2[InferencePriority2["MaxValue"] = 2048] = "MaxValue";
6647
- InferencePriority2[InferencePriority2["PriorityImpliesCombination"] = 416] = "PriorityImpliesCombination";
6646
+ InferencePriority2[InferencePriority2["ReturnMapper"] = 2048] = "ReturnMapper";
6647
+ InferencePriority2[InferencePriority2["MaxValue"] = 4096] = "MaxValue";
6648
+ InferencePriority2[InferencePriority2["PriorityImpliesCombination"] = 2464] = "PriorityImpliesCombination";
6648
6649
  InferencePriority2[InferencePriority2["Circularity"] = -1] = "Circularity";
6649
6650
  return InferencePriority2;
6650
6651
  })(InferencePriority || {});
@@ -6653,6 +6654,7 @@ var InferenceFlags = /* @__PURE__ */ ((InferenceFlags2) => {
6653
6654
  InferenceFlags2[InferenceFlags2["NoDefault"] = 1] = "NoDefault";
6654
6655
  InferenceFlags2[InferenceFlags2["AnyDefault"] = 2] = "AnyDefault";
6655
6656
  InferenceFlags2[InferenceFlags2["SkippedGenericFunction"] = 4] = "SkippedGenericFunction";
6657
+ InferenceFlags2[InferenceFlags2["NoUnknownInference"] = 8] = "NoUnknownInference";
6656
6658
  return InferenceFlags2;
6657
6659
  })(InferenceFlags || {});
6658
6660
  var Ternary = /* @__PURE__ */ ((Ternary2) => {
@@ -51459,40 +51461,32 @@ function createTypeChecker(host) {
51459
51461
  return arrayFrom(candidatesSet);
51460
51462
  }
51461
51463
  function runWithoutResolvedSignatureCaching(node, fn) {
51462
- const cachedResolvedSignatures = [];
51463
- const cachedTypes2 = [];
51464
51464
  node = findAncestor(node, isCallLikeOrFunctionLikeExpression);
51465
- if (!node) {
51466
- return fn();
51467
- }
51468
- while (node) {
51469
- const nodeLinks2 = getNodeLinks(node);
51470
- cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature, nodeLinks2.flags]);
51471
- nodeLinks2.resolvedSignature = void 0;
51472
- nodeLinks2.flags = 0 /* None */;
51473
- if (isFunctionExpressionOrArrowFunction(node)) {
51474
- resetCachedSymbolTypes(node);
51475
- for (const parameter of node.parameters) {
51476
- resetCachedSymbolTypes(parameter);
51465
+ if (node) {
51466
+ const cachedResolvedSignatures = [];
51467
+ const cachedTypes2 = [];
51468
+ while (node) {
51469
+ const nodeLinks2 = getNodeLinks(node);
51470
+ cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]);
51471
+ nodeLinks2.resolvedSignature = void 0;
51472
+ if (isFunctionExpressionOrArrowFunction(node)) {
51473
+ const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
51474
+ const type = symbolLinks2.type;
51475
+ cachedTypes2.push([symbolLinks2, type]);
51476
+ symbolLinks2.type = void 0;
51477
51477
  }
51478
+ node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
51478
51479
  }
51479
- node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression);
51480
- }
51481
- const result = fn();
51482
- for (const [nodeLinks2, resolvedSignature, nodeCheckFlags] of cachedResolvedSignatures) {
51483
- nodeLinks2.resolvedSignature = resolvedSignature;
51484
- nodeLinks2.flags = nodeCheckFlags;
51485
- }
51486
- for (const [symbolLinks2, type] of cachedTypes2) {
51487
- symbolLinks2.type = type;
51488
- }
51489
- return result;
51490
- function resetCachedSymbolTypes(declaration) {
51491
- const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(declaration));
51492
- const type = symbolLinks2.type;
51493
- cachedTypes2.push([symbolLinks2, type]);
51494
- symbolLinks2.type = void 0;
51480
+ const result = fn();
51481
+ for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
51482
+ nodeLinks2.resolvedSignature = resolvedSignature;
51483
+ }
51484
+ for (const [symbolLinks2, type] of cachedTypes2) {
51485
+ symbolLinks2.type = type;
51486
+ }
51487
+ return result;
51495
51488
  }
51489
+ return fn();
51496
51490
  }
51497
51491
  function runWithInferenceBlockedFromSourceNode(node, fn) {
51498
51492
  const containingCall = findAncestor(node, isCallLikeExpression);
@@ -73032,7 +73026,7 @@ function createTypeChecker(host) {
73032
73026
  function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
73033
73027
  let bivariant = false;
73034
73028
  let propagationType;
73035
- let inferencePriority = 2048 /* MaxValue */;
73029
+ let inferencePriority = 4096 /* MaxValue */;
73036
73030
  let visited;
73037
73031
  let sourceStack;
73038
73032
  let targetStack;
@@ -73104,7 +73098,7 @@ function createTypeChecker(host) {
73104
73098
  }
73105
73099
  if (!inference.isFixed) {
73106
73100
  const candidate = propagationType || source;
73107
- if (candidate === blockedStringType) {
73101
+ if (candidate === blockedStringType || candidate.flags & 3 /* AnyOrUnknown */ && priority & 2048 /* ReturnMapper */) {
73108
73102
  return;
73109
73103
  }
73110
73104
  if (inference.priority === void 0 || priority < inference.priority) {
@@ -73234,7 +73228,7 @@ function createTypeChecker(host) {
73234
73228
  }
73235
73229
  (visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);
73236
73230
  const saveInferencePriority = inferencePriority;
73237
- inferencePriority = 2048 /* MaxValue */;
73231
+ inferencePriority = 4096 /* MaxValue */;
73238
73232
  const saveExpandingFlags = expandingFlags;
73239
73233
  (sourceStack ?? (sourceStack = [])).push(source);
73240
73234
  (targetStack ?? (targetStack = [])).push(target);
@@ -73325,7 +73319,7 @@ function createTypeChecker(host) {
73325
73319
  } else {
73326
73320
  for (let i = 0; i < sources.length; i++) {
73327
73321
  const saveInferencePriority = inferencePriority;
73328
- inferencePriority = 2048 /* MaxValue */;
73322
+ inferencePriority = 4096 /* MaxValue */;
73329
73323
  inferFromTypes(sources[i], t);
73330
73324
  if (inferencePriority === priority) matched[i] = true;
73331
73325
  inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;
@@ -73653,14 +73647,14 @@ function createTypeChecker(host) {
73653
73647
  return candidates;
73654
73648
  }
73655
73649
  function getContravariantInference(inference) {
73656
- return inference.priority & 416 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
73650
+ return inference.priority & 2464 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
73657
73651
  }
73658
73652
  function getCovariantInference(inference, signature) {
73659
73653
  const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
73660
73654
  const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
73661
73655
  const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
73662
73656
  const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
73663
- const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
73657
+ const unwidenedType = inference.priority & 2464 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
73664
73658
  return getWidenedType(unwidenedType);
73665
73659
  }
73666
73660
  function getInferredType(context, index) {
@@ -80325,7 +80319,7 @@ function createTypeChecker(host) {
80325
80319
  }
80326
80320
  const returnContext = createInferenceContext(signature.typeParameters, signature, context.flags);
80327
80321
  const returnSourceType = instantiateType(contextualType, outerContext && createOuterReturnMapper(outerContext));
80328
- inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType);
80322
+ inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType, 2048 /* ReturnMapper */);
80329
80323
  context.returnMapper = some(returnContext.inferences, hasInferenceCandidates) ? getMapperFromContext(cloneInferredPartOfContext(returnContext)) : void 0;
80330
80324
  }
80331
80325
  }
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.9.0-pr-58378-3",
5
+ "version": "5.9.0-pr-61913-11",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [