@typescript-deploys/pr-build 6.0.0-pr-62093-13 → 6.0.0-pr-60121-19

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
@@ -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.20250819`;
21
+ var version = `${versionMajorMinor}.0-insiders.20250823`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6995,7 +6995,7 @@ var Diagnostics = {
6995
6995
  The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."),
6996
6996
  Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
6997
6997
  Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
6998
- Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),
6998
+ Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later."),
6999
6999
  Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
7000
7000
  An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
7001
7001
  Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
@@ -62559,7 +62559,7 @@ function createTypeChecker(host) {
62559
62559
  context.nonFixingMapper = combineTypeMappers(context.nonFixingMapper, mapper);
62560
62560
  }
62561
62561
  if (!checkTypeDeferred) {
62562
- inferTypes(context.inferences, checkType, extendsType, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
62562
+ inferTypes(context.inferences, checkType, extendsType, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
62563
62563
  }
62564
62564
  combinedMapper = mapper ? combineTypeMappers(context.mapper, mapper) : context.mapper;
62565
62565
  }
@@ -66246,7 +66246,7 @@ function createTypeChecker(host) {
66246
66246
  0 /* None */,
66247
66247
  isRelatedToWorker
66248
66248
  );
66249
- inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
66249
+ inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
66250
66250
  sourceExtends = instantiateType(sourceExtends, ctx.mapper);
66251
66251
  mapper = ctx.mapper;
66252
66252
  }
@@ -68511,7 +68511,7 @@ function createTypeChecker(host) {
68511
68511
  function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
68512
68512
  let bivariant = false;
68513
68513
  let propagationType;
68514
- let inferencePriority = 4096 /* MaxValue */;
68514
+ let inferencePriority = 2048 /* MaxValue */;
68515
68515
  let visited;
68516
68516
  let sourceStack;
68517
68517
  let targetStack;
@@ -68586,18 +68586,13 @@ function createTypeChecker(host) {
68586
68586
  if (candidate === blockedStringType) {
68587
68587
  return;
68588
68588
  }
68589
- const combinedPriority = priority | (inference.individualPriority || 0 /* None */);
68590
- if (inference.priority === void 0 || priority < (inference.priority & ~512 /* DistributiveConditional */)) {
68589
+ if (inference.priority === void 0 || priority < inference.priority) {
68591
68590
  inference.candidates = void 0;
68592
68591
  inference.contraCandidates = void 0;
68593
68592
  inference.topLevel = true;
68594
- inference.priority = combinedPriority;
68593
+ inference.priority = priority;
68595
68594
  }
68596
- if (priority === (inference.priority & ~512 /* DistributiveConditional */)) {
68597
- if (inference.priority !== combinedPriority) {
68598
- inference.priority = combinedPriority;
68599
- clearCachedInferences(inferences);
68600
- }
68595
+ if (priority === inference.priority) {
68601
68596
  if (contravariant && !bivariant) {
68602
68597
  if (!contains(inference.contraCandidates, candidate)) {
68603
68598
  inference.contraCandidates = append(inference.contraCandidates, candidate);
@@ -68679,7 +68674,7 @@ function createTypeChecker(host) {
68679
68674
  if (isGenericMappedType(source) && isGenericMappedType(target)) {
68680
68675
  invokeOnce(source, target, inferFromGenericMappedTypes);
68681
68676
  }
68682
- if (!(priority & 1024 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
68677
+ if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
68683
68678
  const apparentSource = getApparentType(source);
68684
68679
  if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) {
68685
68680
  return inferFromTypes(apparentSource, target);
@@ -68718,7 +68713,7 @@ function createTypeChecker(host) {
68718
68713
  }
68719
68714
  (visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);
68720
68715
  const saveInferencePriority = inferencePriority;
68721
- inferencePriority = 4096 /* MaxValue */;
68716
+ inferencePriority = 2048 /* MaxValue */;
68722
68717
  const saveExpandingFlags = expandingFlags;
68723
68718
  (sourceStack ?? (sourceStack = [])).push(source);
68724
68719
  (targetStack ?? (targetStack = [])).push(target);
@@ -68768,7 +68763,7 @@ function createTypeChecker(host) {
68768
68763
  contravariant = !contravariant;
68769
68764
  }
68770
68765
  function inferFromContravariantTypesIfStrictFunctionTypes(source, target) {
68771
- if (strictFunctionTypes || priority & 2048 /* AlwaysStrict */) {
68766
+ if (strictFunctionTypes || priority & 1024 /* AlwaysStrict */) {
68772
68767
  inferFromContravariantTypes(source, target);
68773
68768
  } else {
68774
68769
  inferFromTypes(source, target);
@@ -68809,7 +68804,7 @@ function createTypeChecker(host) {
68809
68804
  } else {
68810
68805
  for (let i = 0; i < sources.length; i++) {
68811
68806
  const saveInferencePriority = inferencePriority;
68812
- inferencePriority = 4096 /* MaxValue */;
68807
+ inferencePriority = 2048 /* MaxValue */;
68813
68808
  inferFromTypes(sources[i], t);
68814
68809
  if (inferencePriority === priority) matched[i] = true;
68815
68810
  inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;
@@ -68888,11 +68883,6 @@ function createTypeChecker(host) {
68888
68883
  return false;
68889
68884
  }
68890
68885
  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 && !hasInferenceCandidates(info)) {
68894
- info.individualPriority = (info.individualPriority || 0 /* None */) | 512 /* DistributiveConditional */;
68895
- }
68896
68886
  if (source.flags & 16777216 /* Conditional */) {
68897
68887
  inferFromTypes(source.checkType, target.checkType);
68898
68888
  inferFromTypes(source.extendsType, target.extendsType);
@@ -68902,9 +68892,6 @@ function createTypeChecker(host) {
68902
68892
  const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];
68903
68893
  inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 /* ContravariantConditional */ : 0);
68904
68894
  }
68905
- if (info) {
68906
- info.individualPriority = saveIndividualPriority;
68907
- }
68908
68895
  }
68909
68896
  function inferToTemplateLiteralType(source, target) {
68910
68897
  const matches = inferTypesFromTemplateLiteralType(source, target);
@@ -69145,14 +69132,14 @@ function createTypeChecker(host) {
69145
69132
  return candidates;
69146
69133
  }
69147
69134
  function getContravariantInference(inference) {
69148
- return inference.priority & 928 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
69135
+ return inference.priority & 416 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
69149
69136
  }
69150
69137
  function getCovariantInference(inference, signature) {
69151
69138
  const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
69152
69139
  const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
69153
69140
  const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
69154
69141
  const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
69155
- const unwidenedType = inference.priority & 928 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
69142
+ const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
69156
69143
  return getWidenedType(unwidenedType);
69157
69144
  }
69158
69145
  function getInferredType(context, index) {
@@ -83221,8 +83208,11 @@ function createTypeChecker(host) {
83221
83208
  }
83222
83209
  const parent = node.parent.parent;
83223
83210
  const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
83224
- const parentType = getTypeForBindingElementParent(parent, parentCheckMode);
83225
83211
  const name = node.propertyName || node.name;
83212
+ let parentType = getTypeForBindingElementParent(parent, parentCheckMode);
83213
+ if (parentType && !parent.initializer) {
83214
+ parentType = checkNonNullType(parentType, parent);
83215
+ }
83226
83216
  if (parentType && !isBindingPattern(name)) {
83227
83217
  const exprType = getLiteralTypeFromPropertyName(name);
83228
83218
  if (isTypeUsableAsPropertyName(exprType)) {
@@ -83262,16 +83252,15 @@ function createTypeChecker(host) {
83262
83252
  if (isInAmbientOrTypeNode(node)) {
83263
83253
  return;
83264
83254
  }
83265
- const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */;
83255
+ const needCheckInitializer = node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */;
83266
83256
  const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression));
83267
83257
  if (needCheckInitializer || needCheckWidenedType) {
83268
83258
  const widenedType = getWidenedTypeForVariableLikeDeclaration(node);
83269
83259
  if (needCheckInitializer) {
83270
- const initializerType = checkExpressionCached(node.initializer);
83271
83260
  if (strictNullChecks && needCheckWidenedType) {
83272
- checkNonNullNonVoidType(initializerType, node);
83261
+ checkNonNullNonVoidType(checkExpressionCached(node.initializer), node);
83273
83262
  } else {
83274
- checkTypeAssignableToAndOptionallyElaborate(initializerType, getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);
83263
+ checkTypeAssignableToAndOptionallyElaborate(checkNonNullExpression(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);
83275
83264
  }
83276
83265
  }
83277
83266
  if (needCheckWidenedType) {
@@ -124458,8 +124447,8 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124458
124447
  if (options.customConditions && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
124459
124448
  createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions");
124460
124449
  }
124461
- if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind !== 200 /* Preserve */) {
124462
- createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, "bundler");
124450
+ if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind !== 200 /* Preserve */ && moduleKind !== 1 /* CommonJS */) {
124451
+ createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later, "bundler");
124463
124452
  }
124464
124453
  if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
124465
124454
  const moduleKindName = ModuleKind[moduleKind];
@@ -6893,11 +6893,10 @@ declare namespace ts {
6893
6893
  ContravariantConditional = 64,
6894
6894
  ReturnType = 128,
6895
6895
  LiteralKeyof = 256,
6896
- DistributiveConditional = 512,
6897
- NoConstraints = 1024,
6898
- AlwaysStrict = 2048,
6899
- MaxValue = 4096,
6900
- PriorityImpliesCombination = 928,
6896
+ NoConstraints = 512,
6897
+ AlwaysStrict = 1024,
6898
+ MaxValue = 2048,
6899
+ PriorityImpliesCombination = 416,
6901
6900
  Circularity = -1,
6902
6901
  }
6903
6902
  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.20250819`;
2288
+ var version = `${versionMajorMinor}.0-insiders.20250823`;
2289
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2290
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2291
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6641,11 +6641,10 @@ 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["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";
6644
+ InferencePriority2[InferencePriority2["NoConstraints"] = 512] = "NoConstraints";
6645
+ InferencePriority2[InferencePriority2["AlwaysStrict"] = 1024] = "AlwaysStrict";
6646
+ InferencePriority2[InferencePriority2["MaxValue"] = 2048] = "MaxValue";
6647
+ InferencePriority2[InferencePriority2["PriorityImpliesCombination"] = 416] = "PriorityImpliesCombination";
6649
6648
  InferencePriority2[InferencePriority2["Circularity"] = -1] = "Circularity";
6650
6649
  return InferencePriority2;
6651
6650
  })(InferencePriority || {});
@@ -10382,7 +10381,7 @@ var Diagnostics = {
10382
10381
  The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."),
10383
10382
  Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
10384
10383
  Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
10385
- Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),
10384
+ Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve', 'commonjs', or 'es2015' or later."),
10386
10385
  Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
10387
10386
  An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
10388
10387
  Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
@@ -67168,7 +67167,7 @@ function createTypeChecker(host) {
67168
67167
  context.nonFixingMapper = combineTypeMappers(context.nonFixingMapper, mapper);
67169
67168
  }
67170
67169
  if (!checkTypeDeferred) {
67171
- inferTypes(context.inferences, checkType, extendsType, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
67170
+ inferTypes(context.inferences, checkType, extendsType, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
67172
67171
  }
67173
67172
  combinedMapper = mapper ? combineTypeMappers(context.mapper, mapper) : context.mapper;
67174
67173
  }
@@ -70855,7 +70854,7 @@ function createTypeChecker(host) {
70855
70854
  0 /* None */,
70856
70855
  isRelatedToWorker
70857
70856
  );
70858
- inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 1024 /* NoConstraints */ | 2048 /* AlwaysStrict */);
70857
+ inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
70859
70858
  sourceExtends = instantiateType(sourceExtends, ctx.mapper);
70860
70859
  mapper = ctx.mapper;
70861
70860
  }
@@ -73120,7 +73119,7 @@ function createTypeChecker(host) {
73120
73119
  function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
73121
73120
  let bivariant = false;
73122
73121
  let propagationType;
73123
- let inferencePriority = 4096 /* MaxValue */;
73122
+ let inferencePriority = 2048 /* MaxValue */;
73124
73123
  let visited;
73125
73124
  let sourceStack;
73126
73125
  let targetStack;
@@ -73195,18 +73194,13 @@ function createTypeChecker(host) {
73195
73194
  if (candidate === blockedStringType) {
73196
73195
  return;
73197
73196
  }
73198
- const combinedPriority = priority | (inference.individualPriority || 0 /* None */);
73199
- if (inference.priority === void 0 || priority < (inference.priority & ~512 /* DistributiveConditional */)) {
73197
+ if (inference.priority === void 0 || priority < inference.priority) {
73200
73198
  inference.candidates = void 0;
73201
73199
  inference.contraCandidates = void 0;
73202
73200
  inference.topLevel = true;
73203
- inference.priority = combinedPriority;
73201
+ inference.priority = priority;
73204
73202
  }
73205
- if (priority === (inference.priority & ~512 /* DistributiveConditional */)) {
73206
- if (inference.priority !== combinedPriority) {
73207
- inference.priority = combinedPriority;
73208
- clearCachedInferences(inferences);
73209
- }
73203
+ if (priority === inference.priority) {
73210
73204
  if (contravariant && !bivariant) {
73211
73205
  if (!contains(inference.contraCandidates, candidate)) {
73212
73206
  inference.contraCandidates = append(inference.contraCandidates, candidate);
@@ -73288,7 +73282,7 @@ function createTypeChecker(host) {
73288
73282
  if (isGenericMappedType(source) && isGenericMappedType(target)) {
73289
73283
  invokeOnce(source, target, inferFromGenericMappedTypes);
73290
73284
  }
73291
- if (!(priority & 1024 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
73285
+ if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) {
73292
73286
  const apparentSource = getApparentType(source);
73293
73287
  if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) {
73294
73288
  return inferFromTypes(apparentSource, target);
@@ -73327,7 +73321,7 @@ function createTypeChecker(host) {
73327
73321
  }
73328
73322
  (visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */);
73329
73323
  const saveInferencePriority = inferencePriority;
73330
- inferencePriority = 4096 /* MaxValue */;
73324
+ inferencePriority = 2048 /* MaxValue */;
73331
73325
  const saveExpandingFlags = expandingFlags;
73332
73326
  (sourceStack ?? (sourceStack = [])).push(source);
73333
73327
  (targetStack ?? (targetStack = [])).push(target);
@@ -73377,7 +73371,7 @@ function createTypeChecker(host) {
73377
73371
  contravariant = !contravariant;
73378
73372
  }
73379
73373
  function inferFromContravariantTypesIfStrictFunctionTypes(source, target) {
73380
- if (strictFunctionTypes || priority & 2048 /* AlwaysStrict */) {
73374
+ if (strictFunctionTypes || priority & 1024 /* AlwaysStrict */) {
73381
73375
  inferFromContravariantTypes(source, target);
73382
73376
  } else {
73383
73377
  inferFromTypes(source, target);
@@ -73418,7 +73412,7 @@ function createTypeChecker(host) {
73418
73412
  } else {
73419
73413
  for (let i = 0; i < sources.length; i++) {
73420
73414
  const saveInferencePriority = inferencePriority;
73421
- inferencePriority = 4096 /* MaxValue */;
73415
+ inferencePriority = 2048 /* MaxValue */;
73422
73416
  inferFromTypes(sources[i], t);
73423
73417
  if (inferencePriority === priority) matched[i] = true;
73424
73418
  inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */;
@@ -73497,11 +73491,6 @@ function createTypeChecker(host) {
73497
73491
  return false;
73498
73492
  }
73499
73493
  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 && !hasInferenceCandidates(info)) {
73503
- info.individualPriority = (info.individualPriority || 0 /* None */) | 512 /* DistributiveConditional */;
73504
- }
73505
73494
  if (source.flags & 16777216 /* Conditional */) {
73506
73495
  inferFromTypes(source.checkType, target.checkType);
73507
73496
  inferFromTypes(source.extendsType, target.extendsType);
@@ -73511,9 +73500,6 @@ function createTypeChecker(host) {
73511
73500
  const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];
73512
73501
  inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 /* ContravariantConditional */ : 0);
73513
73502
  }
73514
- if (info) {
73515
- info.individualPriority = saveIndividualPriority;
73516
- }
73517
73503
  }
73518
73504
  function inferToTemplateLiteralType(source, target) {
73519
73505
  const matches = inferTypesFromTemplateLiteralType(source, target);
@@ -73754,14 +73740,14 @@ function createTypeChecker(host) {
73754
73740
  return candidates;
73755
73741
  }
73756
73742
  function getContravariantInference(inference) {
73757
- return inference.priority & 928 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
73743
+ return inference.priority & 416 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
73758
73744
  }
73759
73745
  function getCovariantInference(inference, signature) {
73760
73746
  const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
73761
73747
  const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
73762
73748
  const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
73763
73749
  const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
73764
- const unwidenedType = inference.priority & 928 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
73750
+ const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
73765
73751
  return getWidenedType(unwidenedType);
73766
73752
  }
73767
73753
  function getInferredType(context, index) {
@@ -87830,8 +87816,11 @@ function createTypeChecker(host) {
87830
87816
  }
87831
87817
  const parent2 = node.parent.parent;
87832
87818
  const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */;
87833
- const parentType = getTypeForBindingElementParent(parent2, parentCheckMode);
87834
87819
  const name = node.propertyName || node.name;
87820
+ let parentType = getTypeForBindingElementParent(parent2, parentCheckMode);
87821
+ if (parentType && !parent2.initializer) {
87822
+ parentType = checkNonNullType(parentType, parent2);
87823
+ }
87835
87824
  if (parentType && !isBindingPattern(name)) {
87836
87825
  const exprType = getLiteralTypeFromPropertyName(name);
87837
87826
  if (isTypeUsableAsPropertyName(exprType)) {
@@ -87871,16 +87860,15 @@ function createTypeChecker(host) {
87871
87860
  if (isInAmbientOrTypeNode(node)) {
87872
87861
  return;
87873
87862
  }
87874
- const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */;
87863
+ const needCheckInitializer = node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */;
87875
87864
  const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression));
87876
87865
  if (needCheckInitializer || needCheckWidenedType) {
87877
87866
  const widenedType = getWidenedTypeForVariableLikeDeclaration(node);
87878
87867
  if (needCheckInitializer) {
87879
- const initializerType = checkExpressionCached(node.initializer);
87880
87868
  if (strictNullChecks && needCheckWidenedType) {
87881
- checkNonNullNonVoidType(initializerType, node);
87869
+ checkNonNullNonVoidType(checkExpressionCached(node.initializer), node);
87882
87870
  } else {
87883
- checkTypeAssignableToAndOptionallyElaborate(initializerType, getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);
87871
+ checkTypeAssignableToAndOptionallyElaborate(checkNonNullExpression(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer);
87884
87872
  }
87885
87873
  }
87886
87874
  if (needCheckWidenedType) {
@@ -129306,8 +129294,8 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129306
129294
  if (options.customConditions && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
129307
129295
  createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions");
129308
129296
  }
129309
- if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind !== 200 /* Preserve */) {
129310
- createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, "bundler");
129297
+ if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind !== 200 /* Preserve */ && moduleKind !== 1 /* CommonJS */) {
129298
+ createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later, "bundler");
129311
129299
  }
129312
129300
  if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
129313
129301
  const moduleKindName = ModuleKind[moduleKind];
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-62093-13",
5
+ "version": "6.0.0-pr-60121-19",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [