typescript 5.8.0-dev.20250122 → 5.8.0-dev.20250123

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 = "5.8";
21
- var version = `${versionMajorMinor}.0-dev.20250122`;
21
+ var version = `${versionMajorMinor}.0-dev.20250123`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6824,6 +6824,7 @@ var Diagnostics = {
6824
6824
  This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1 /* Error */, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),
6825
6825
  This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1 /* Error */, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),
6826
6826
  Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
6827
+ Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'asserts'."),
6827
6828
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6828
6829
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6829
6830
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -42877,13 +42878,16 @@ function createBinder() {
42877
42878
  function bindForStatement(node) {
42878
42879
  const preLoopLabel = setContinueTarget(node, createLoopLabel());
42879
42880
  const preBodyLabel = createBranchLabel();
42881
+ const preIncrementorLabel = createBranchLabel();
42880
42882
  const postLoopLabel = createBranchLabel();
42881
42883
  bind(node.initializer);
42882
42884
  addAntecedent(preLoopLabel, currentFlow);
42883
42885
  currentFlow = preLoopLabel;
42884
42886
  bindCondition(node.condition, preBodyLabel, postLoopLabel);
42885
42887
  currentFlow = finishFlowLabel(preBodyLabel);
42886
- bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
42888
+ bindIterativeStatement(node.statement, postLoopLabel, preIncrementorLabel);
42889
+ addAntecedent(preIncrementorLabel, currentFlow);
42890
+ currentFlow = finishFlowLabel(preIncrementorLabel);
42887
42891
  bind(node.incrementor);
42888
42892
  addAntecedent(preLoopLabel, currentFlow);
42889
42893
  currentFlow = finishFlowLabel(postLoopLabel);
@@ -49186,7 +49190,7 @@ function createTypeChecker(host) {
49186
49190
  moduleReference
49187
49191
  );
49188
49192
  }
49189
- if (errorNode && (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */)) {
49193
+ if (errorNode && (moduleKind === 100 /* Node16 */ || moduleKind === 101 /* Node18 */)) {
49190
49194
  const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
49191
49195
  const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));
49192
49196
  if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
@@ -59585,6 +59589,9 @@ function createTypeChecker(host) {
59585
59589
  case "Number":
59586
59590
  checkNoTypeArguments(node);
59587
59591
  return numberType;
59592
+ case "BigInt":
59593
+ checkNoTypeArguments(node);
59594
+ return bigintType;
59588
59595
  case "Boolean":
59589
59596
  checkNoTypeArguments(node);
59590
59597
  return booleanType;
@@ -68504,6 +68511,7 @@ function createTypeChecker(host) {
68504
68511
  return target.kind === 108 /* SuperKeyword */;
68505
68512
  case 235 /* NonNullExpression */:
68506
68513
  case 217 /* ParenthesizedExpression */:
68514
+ case 238 /* SatisfiesExpression */:
68507
68515
  return isMatchingReference(source.expression, target);
68508
68516
  case 211 /* PropertyAccessExpression */:
68509
68517
  case 212 /* ElementAccessExpression */:
@@ -70473,6 +70481,7 @@ function createTypeChecker(host) {
70473
70481
  return narrowTypeByCallExpression(type, expr, assumeTrue);
70474
70482
  case 217 /* ParenthesizedExpression */:
70475
70483
  case 235 /* NonNullExpression */:
70484
+ case 238 /* SatisfiesExpression */:
70476
70485
  return narrowType(type, expr.expression, assumeTrue);
70477
70486
  case 226 /* BinaryExpression */:
70478
70487
  return narrowTypeByBinaryExpression(type, expr, assumeTrue);
@@ -85289,6 +85298,9 @@ function createTypeChecker(host) {
85289
85298
  isImportAttributes2 ? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve
85290
85299
  );
85291
85300
  }
85301
+ if (moduleKind === 199 /* NodeNext */ && !isImportAttributes2) {
85302
+ return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_asserts);
85303
+ }
85292
85304
  if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) {
85293
85305
  return grammarErrorOnNode(
85294
85306
  node,