@typescript-deploys/pr-build 5.3.0-pr-55880-5 → 5.3.0-pr-55887-9

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/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-insiders.20230926`;
38
+ version = `${versionMajorMinor}.0-insiders.20230927`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3802,8 +3802,10 @@ ${lanes.join("\n")}
3802
3802
  SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause";
3803
3803
  SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause";
3804
3804
  SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause";
3805
- SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause";
3806
- SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry";
3805
+ SyntaxKind5[SyntaxKind5["ImportAttributes"] = 300] = "ImportAttributes";
3806
+ SyntaxKind5[SyntaxKind5["ImportAttribute"] = 301] = "ImportAttribute";
3807
+ SyntaxKind5[SyntaxKind5["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause";
3808
+ SyntaxKind5[SyntaxKind5["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry";
3807
3809
  SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer";
3808
3810
  SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment";
3809
3811
  SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
@@ -5102,7 +5104,8 @@ ${lanes.join("\n")}
5102
5104
  ListFormat2[ListFormat2["ObjectBindingPatternElements"] = 525136] = "ObjectBindingPatternElements";
5103
5105
  ListFormat2[ListFormat2["ArrayBindingPatternElements"] = 524880] = "ArrayBindingPatternElements";
5104
5106
  ListFormat2[ListFormat2["ObjectLiteralExpressionProperties"] = 526226] = "ObjectLiteralExpressionProperties";
5105
- ListFormat2[ListFormat2["ImportClauseEntries"] = 526226] = "ImportClauseEntries";
5107
+ ListFormat2[ListFormat2["ImportAttributes"] = 526226] = "ImportAttributes";
5108
+ ListFormat2[ListFormat2["ImportClauseEntries"] = 526226 /* ImportAttributes */] = "ImportClauseEntries";
5106
5109
  ListFormat2[ListFormat2["ArrayLiteralExpressionElements"] = 8914] = "ArrayLiteralExpressionElements";
5107
5110
  ListFormat2[ListFormat2["CommaListElements"] = 528] = "CommaListElements";
5108
5111
  ListFormat2[ListFormat2["CallExpressionArguments"] = 2576] = "CallExpressionArguments";
@@ -7363,9 +7366,8 @@ ${lanes.join("\n")}
7363
7366
  _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),
7364
7367
  _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),
7365
7368
  Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
7366
- Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
7369
+ Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),
7367
7370
  Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
7368
- resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."),
7369
7371
  resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
7370
7372
  resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
7371
7373
  resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
@@ -7375,6 +7377,8 @@ ${lanes.join("\n")}
7375
7377
  File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`),
7376
7378
  File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`),
7377
7379
  File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"),
7380
+ resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."),
7381
+ Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),
7378
7382
  The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
7379
7383
  Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),
7380
7384
  catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
@@ -7401,6 +7405,7 @@ ${lanes.join("\n")}
7401
7405
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
7402
7406
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
7403
7407
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
7408
+ Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
7404
7409
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
7405
7410
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
7406
7411
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -7930,15 +7935,15 @@ ${lanes.join("\n")}
7930
7935
  Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
7931
7936
  Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
7932
7937
  Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
7938
+ Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823", "Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
7933
7939
  Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
7934
7940
  Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
7935
7941
  Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
7936
- Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that transpile to CommonJS 'require' calls."),
7942
+ Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),
7937
7943
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
7938
7944
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
7939
7945
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
7940
7946
  An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
7941
- The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
7942
7947
  _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
7943
7948
  We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
7944
7949
  Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
@@ -7952,6 +7957,10 @@ ${lanes.join("\n")}
7952
7957
  await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
7953
7958
  Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
7954
7959
  Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."),
7960
+ Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),
7961
+ Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
7962
+ Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."),
7963
+ Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."),
7955
7964
  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}'."),
7956
7965
  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}'."),
7957
7966
  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}'."),
@@ -8060,7 +8069,6 @@ ${lanes.join("\n")}
8060
8069
  This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
8061
8070
  This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
8062
8071
  Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
8063
- resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
8064
8072
  The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
8065
8073
  Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
8066
8074
  File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
@@ -12142,12 +12150,12 @@ ${lanes.join("\n")}
12142
12150
  function isTypeOnlyImportOrExportDeclaration(node) {
12143
12151
  return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node);
12144
12152
  }
12145
- function isAssertionKey(node) {
12146
- return isStringLiteral(node) || isIdentifier(node);
12147
- }
12148
12153
  function isStringTextContainingNode(node) {
12149
12154
  return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind);
12150
12155
  }
12156
+ function isImportAttributeName(node) {
12157
+ return isStringLiteral(node) || isIdentifier(node);
12158
+ }
12151
12159
  function isGeneratedIdentifier(node) {
12152
12160
  var _a;
12153
12161
  return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0;
@@ -16017,9 +16025,6 @@ ${lanes.join("\n")}
16017
16025
  function getIndentSize() {
16018
16026
  return indentStrings[1].length;
16019
16027
  }
16020
- function isNightly() {
16021
- return version.includes("-dev") || version.includes("-insiders");
16022
- }
16023
16028
  function createTextWriter(newLine) {
16024
16029
  var output;
16025
16030
  var indent3;
@@ -17425,6 +17430,7 @@ ${lanes.join("\n")}
17425
17430
  this.exportSymbol = void 0;
17426
17431
  this.constEnumOnlyModule = void 0;
17427
17432
  this.isReferenced = void 0;
17433
+ this.isInitialized = void 0;
17428
17434
  this.isAssigned = void 0;
17429
17435
  this.links = void 0;
17430
17436
  }
@@ -18887,6 +18893,12 @@ ${lanes.join("\n")}
18887
18893
  function isExpandoPropertyDeclaration(declaration) {
18888
18894
  return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
18889
18895
  }
18896
+ function hasResolutionModeOverride(node) {
18897
+ if (node === void 0) {
18898
+ return false;
18899
+ }
18900
+ return !!getResolutionModeOverride(node.attributes);
18901
+ }
18890
18902
  var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18891
18903
  var init_utilities = __esm({
18892
18904
  "src/compiler/utilities.ts"() {
@@ -20356,6 +20368,10 @@ ${lanes.join("\n")}
20356
20368
  updateAssertEntry,
20357
20369
  createImportTypeAssertionContainer,
20358
20370
  updateImportTypeAssertionContainer,
20371
+ createImportAttributes,
20372
+ updateImportAttributes,
20373
+ createImportAttribute,
20374
+ updateImportAttribute,
20359
20375
  createNamespaceImport,
20360
20376
  updateNamespaceImport,
20361
20377
  createNamespaceExport,
@@ -21624,18 +21640,21 @@ ${lanes.join("\n")}
21624
21640
  function updateTemplateLiteralType(node, head, templateSpans) {
21625
21641
  return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
21626
21642
  }
21627
- function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) {
21643
+ function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
21628
21644
  const node = createBaseNode(205 /* ImportType */);
21629
21645
  node.argument = argument;
21630
- node.assertions = assertions;
21646
+ node.attributes = attributes;
21647
+ if (node.assertions && node.assertions.assertClause && node.attributes) {
21648
+ node.assertions.assertClause = node.attributes;
21649
+ }
21631
21650
  node.qualifier = qualifier;
21632
21651
  node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
21633
21652
  node.isTypeOf = isTypeOf;
21634
21653
  node.transformFlags = 1 /* ContainsTypeScript */;
21635
21654
  return node;
21636
21655
  }
21637
- function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
21638
- return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node;
21656
+ function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
21657
+ return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node;
21639
21658
  }
21640
21659
  function createParenthesizedType(type) {
21641
21660
  const node = createBaseNode(196 /* ParenthesizedType */);
@@ -22765,19 +22784,19 @@ ${lanes.join("\n")}
22765
22784
  function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
22766
22785
  return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
22767
22786
  }
22768
- function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
22787
+ function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
22769
22788
  const node = createBaseNode(272 /* ImportDeclaration */);
22770
22789
  node.modifiers = asNodeArray(modifiers);
22771
22790
  node.importClause = importClause;
22772
22791
  node.moduleSpecifier = moduleSpecifier;
22773
- node.assertClause = assertClause;
22792
+ node.attributes = node.assertClause = attributes;
22774
22793
  node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
22775
22794
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
22776
22795
  node.jsDoc = void 0;
22777
22796
  return node;
22778
22797
  }
22779
- function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
22780
- return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node;
22798
+ function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
22799
+ return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
22781
22800
  }
22782
22801
  function createImportClause(isTypeOnly, name, namedBindings) {
22783
22802
  const node = createBaseDeclaration(273 /* ImportClause */);
@@ -22798,6 +22817,7 @@ ${lanes.join("\n")}
22798
22817
  const node = createBaseNode(300 /* AssertClause */);
22799
22818
  node.elements = createNodeArray(elements);
22800
22819
  node.multiLine = multiLine;
22820
+ node.token = 132 /* AssertKeyword */;
22801
22821
  node.transformFlags |= 4 /* ContainsESNext */;
22802
22822
  return node;
22803
22823
  }
@@ -22823,6 +22843,27 @@ ${lanes.join("\n")}
22823
22843
  function updateImportTypeAssertionContainer(node, clause, multiLine) {
22824
22844
  return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
22825
22845
  }
22846
+ function createImportAttributes(elements, multiLine, token) {
22847
+ const node = createBaseNode(300 /* ImportAttributes */);
22848
+ node.token = token ?? 118 /* WithKeyword */;
22849
+ node.elements = createNodeArray(elements);
22850
+ node.multiLine = multiLine;
22851
+ node.transformFlags |= 4 /* ContainsESNext */;
22852
+ return node;
22853
+ }
22854
+ function updateImportAttributes(node, elements, multiLine) {
22855
+ return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
22856
+ }
22857
+ function createImportAttribute(name, value) {
22858
+ const node = createBaseNode(301 /* ImportAttribute */);
22859
+ node.name = name;
22860
+ node.value = value;
22861
+ node.transformFlags |= 4 /* ContainsESNext */;
22862
+ return node;
22863
+ }
22864
+ function updateImportAttribute(node, name, value) {
22865
+ return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
22866
+ }
22826
22867
  function createNamespaceImport(name) {
22827
22868
  const node = createBaseDeclaration(274 /* NamespaceImport */);
22828
22869
  node.name = name;
@@ -22883,20 +22924,20 @@ ${lanes.join("\n")}
22883
22924
  function updateExportAssignment(node, modifiers, expression) {
22884
22925
  return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node;
22885
22926
  }
22886
- function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
22927
+ function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
22887
22928
  const node = createBaseDeclaration(278 /* ExportDeclaration */);
22888
22929
  node.modifiers = asNodeArray(modifiers);
22889
22930
  node.isTypeOnly = isTypeOnly;
22890
22931
  node.exportClause = exportClause;
22891
22932
  node.moduleSpecifier = moduleSpecifier;
22892
- node.assertClause = assertClause;
22933
+ node.attributes = node.assertClause = attributes;
22893
22934
  node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
22894
22935
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
22895
22936
  node.jsDoc = void 0;
22896
22937
  return node;
22897
22938
  }
22898
- function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
22899
- return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node) : node;
22939
+ function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
22940
+ return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node;
22900
22941
  }
22901
22942
  function finishUpdateExportDeclaration(updated, original) {
22902
22943
  if (updated !== original) {
@@ -24223,7 +24264,7 @@ ${lanes.join("\n")}
24223
24264
  } else {
24224
24265
  modifierArray = modifiers;
24225
24266
  }
24226
- return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node);
24267
+ return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node);
24227
24268
  }
24228
24269
  function updateModifierLike(node, modifierArray) {
24229
24270
  return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node);
@@ -26599,6 +26640,12 @@ ${lanes.join("\n")}
26599
26640
  function isAssertEntry(node) {
26600
26641
  return node.kind === 301 /* AssertEntry */;
26601
26642
  }
26643
+ function isImportAttributes(node) {
26644
+ return node.kind === 300 /* ImportAttributes */;
26645
+ }
26646
+ function isImportAttribute(node) {
26647
+ return node.kind === 301 /* ImportAttribute */;
26648
+ }
26602
26649
  function isNamespaceImport(node) {
26603
26650
  return node.kind === 274 /* NamespaceImport */;
26604
26651
  }
@@ -27326,7 +27373,7 @@ ${lanes.join("\n")}
27326
27373
  namedBindings
27327
27374
  ),
27328
27375
  nodeFactory.createStringLiteral(externalHelpersModuleNameText),
27329
- /*assertClause*/
27376
+ /*attributes*/
27330
27377
  void 0
27331
27378
  );
27332
27379
  addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */);
@@ -28503,7 +28550,7 @@ ${lanes.join("\n")}
28503
28550
  return visitNode2(cbNode, node.typeParameter);
28504
28551
  },
28505
28552
  [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
28506
- return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
28553
+ return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
28507
28554
  },
28508
28555
  [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {
28509
28556
  return visitNode2(cbNode, node.assertClause);
@@ -28677,15 +28724,15 @@ ${lanes.join("\n")}
28677
28724
  return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
28678
28725
  },
28679
28726
  [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
28680
- return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause);
28727
+ return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
28681
28728
  },
28682
28729
  [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
28683
28730
  return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
28684
28731
  },
28685
- [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) {
28732
+ [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
28686
28733
  return visitNodes(cbNode, cbNodes, node.elements);
28687
28734
  },
28688
- [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) {
28735
+ [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
28689
28736
  return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
28690
28737
  },
28691
28738
  [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
@@ -28700,7 +28747,7 @@ ${lanes.join("\n")}
28700
28747
  [275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
28701
28748
  [279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
28702
28749
  [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
28703
- return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause);
28750
+ return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
28704
28751
  },
28705
28752
  [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
28706
28753
  [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
@@ -29794,7 +29841,7 @@ ${lanes.join("\n")}
29794
29841
  function isLiteralPropertyName() {
29795
29842
  return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
29796
29843
  }
29797
- function isAssertionKey2() {
29844
+ function isImportAttributeName2() {
29798
29845
  return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
29799
29846
  }
29800
29847
  function parsePropertyNameWorker(allowComputedPropertyNames) {
@@ -29913,8 +29960,8 @@ ${lanes.join("\n")}
29913
29960
  return isLiteralPropertyName();
29914
29961
  case 9 /* ObjectBindingElements */:
29915
29962
  return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
29916
- case 24 /* AssertEntries */:
29917
- return isAssertionKey2();
29963
+ case 24 /* ImportAttributes */:
29964
+ return isImportAttributeName2();
29918
29965
  case 7 /* HeritageClauseElement */:
29919
29966
  if (token() === 19 /* OpenBraceToken */) {
29920
29967
  return lookAhead(isValidHeritageClauseObjectLiteral);
@@ -30017,7 +30064,7 @@ ${lanes.join("\n")}
30017
30064
  case 12 /* ObjectLiteralMembers */:
30018
30065
  case 9 /* ObjectBindingElements */:
30019
30066
  case 23 /* ImportOrExportSpecifiers */:
30020
- case 24 /* AssertEntries */:
30067
+ case 24 /* ImportAttributes */:
30021
30068
  return token() === 20 /* CloseBraceToken */;
30022
30069
  case 3 /* SwitchClauseStatements */:
30023
30070
  return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
@@ -30323,7 +30370,7 @@ ${lanes.join("\n")}
30323
30370
  return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
30324
30371
  case 14 /* JsxChildren */:
30325
30372
  return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
30326
- case 24 /* AssertEntries */:
30373
+ case 24 /* ImportAttributes */:
30327
30374
  return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
30328
30375
  case 25 /* JSDocComment */:
30329
30376
  return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
@@ -31198,28 +31245,6 @@ ${lanes.join("\n")}
31198
31245
  nextToken();
31199
31246
  return token() === 102 /* ImportKeyword */;
31200
31247
  }
31201
- function parseImportTypeAssertions() {
31202
- const pos = getNodePos();
31203
- const openBracePosition = scanner2.getTokenStart();
31204
- parseExpected(19 /* OpenBraceToken */);
31205
- const multiLine = scanner2.hasPrecedingLineBreak();
31206
- parseExpected(132 /* AssertKeyword */);
31207
- parseExpected(59 /* ColonToken */);
31208
- const clause = parseAssertClause(
31209
- /*skipAssertKeyword*/
31210
- true
31211
- );
31212
- if (!parseExpected(20 /* CloseBraceToken */)) {
31213
- const lastError = lastOrUndefined(parseDiagnostics);
31214
- if (lastError && lastError.code === Diagnostics._0_expected.code) {
31215
- addRelatedInfo(
31216
- lastError,
31217
- createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
31218
- );
31219
- }
31220
- }
31221
- return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos);
31222
- }
31223
31248
  function parseImportType() {
31224
31249
  sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
31225
31250
  const pos = getNodePos();
@@ -31227,14 +31252,36 @@ ${lanes.join("\n")}
31227
31252
  parseExpected(102 /* ImportKeyword */);
31228
31253
  parseExpected(21 /* OpenParenToken */);
31229
31254
  const type = parseType();
31230
- let assertions;
31255
+ let attributes;
31231
31256
  if (parseOptional(28 /* CommaToken */)) {
31232
- assertions = parseImportTypeAssertions();
31257
+ const openBracePosition = scanner2.getTokenStart();
31258
+ parseExpected(19 /* OpenBraceToken */);
31259
+ const currentToken2 = token();
31260
+ if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {
31261
+ nextToken();
31262
+ } else {
31263
+ parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
31264
+ }
31265
+ parseExpected(59 /* ColonToken */);
31266
+ attributes = parseImportAttributes(
31267
+ currentToken2,
31268
+ /*skipKeyword*/
31269
+ true
31270
+ );
31271
+ if (!parseExpected(20 /* CloseBraceToken */)) {
31272
+ const lastError = lastOrUndefined(parseDiagnostics);
31273
+ if (lastError && lastError.code === Diagnostics._0_expected.code) {
31274
+ addRelatedInfo(
31275
+ lastError,
31276
+ createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
31277
+ );
31278
+ }
31279
+ }
31233
31280
  }
31234
31281
  parseExpected(22 /* CloseParenToken */);
31235
31282
  const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
31236
31283
  const typeArguments = parseTypeArgumentsOfTypeReference();
31237
- return finishNode(factory2.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos);
31284
+ return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
31238
31285
  }
31239
31286
  function nextTokenIsNumericOrBigIntLiteral() {
31240
31287
  nextToken();
@@ -34296,15 +34343,16 @@ ${lanes.join("\n")}
34296
34343
  parseExpected(161 /* FromKeyword */);
34297
34344
  }
34298
34345
  const moduleSpecifier = parseModuleSpecifier();
34299
- let assertClause;
34300
- if (token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) {
34301
- assertClause = parseAssertClause();
34346
+ const currentToken2 = token();
34347
+ let attributes;
34348
+ if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
34349
+ attributes = parseImportAttributes(currentToken2);
34302
34350
  }
34303
34351
  parseSemicolon();
34304
- const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
34352
+ const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
34305
34353
  return withJSDoc(finishNode(node, pos), hasJSDoc);
34306
34354
  }
34307
- function parseAssertEntry() {
34355
+ function parseImportAttribute() {
34308
34356
  const pos = getNodePos();
34309
34357
  const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
34310
34358
  parseExpected(59 /* ColonToken */);
@@ -34312,19 +34360,19 @@ ${lanes.join("\n")}
34312
34360
  /*allowReturnTypeInArrowFunction*/
34313
34361
  true
34314
34362
  );
34315
- return finishNode(factory2.createAssertEntry(name, value), pos);
34363
+ return finishNode(factory2.createImportAttribute(name, value), pos);
34316
34364
  }
34317
- function parseAssertClause(skipAssertKeyword) {
34365
+ function parseImportAttributes(token2, skipKeyword) {
34318
34366
  const pos = getNodePos();
34319
- if (!skipAssertKeyword) {
34320
- parseExpected(132 /* AssertKeyword */);
34367
+ if (!skipKeyword) {
34368
+ parseExpected(token2);
34321
34369
  }
34322
34370
  const openBracePosition = scanner2.getTokenStart();
34323
34371
  if (parseExpected(19 /* OpenBraceToken */)) {
34324
34372
  const multiLine = scanner2.hasPrecedingLineBreak();
34325
34373
  const elements = parseDelimitedList(
34326
- 24 /* AssertEntries */,
34327
- parseAssertEntry,
34374
+ 24 /* ImportAttributes */,
34375
+ parseImportAttribute,
34328
34376
  /*considerSemicolonAsDelimiter*/
34329
34377
  true
34330
34378
  );
@@ -34337,7 +34385,7 @@ ${lanes.join("\n")}
34337
34385
  );
34338
34386
  }
34339
34387
  }
34340
- return finishNode(factory2.createAssertClause(elements, multiLine), pos);
34388
+ return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
34341
34389
  } else {
34342
34390
  const elements = createNodeArray(
34343
34391
  [],
@@ -34347,10 +34395,11 @@ ${lanes.join("\n")}
34347
34395
  /*hasTrailingComma*/
34348
34396
  false
34349
34397
  );
34350
- return finishNode(factory2.createAssertClause(
34398
+ return finishNode(factory2.createImportAttributes(
34351
34399
  elements,
34352
34400
  /*multiLine*/
34353
- false
34401
+ false,
34402
+ token2
34354
34403
  ), pos);
34355
34404
  }
34356
34405
  }
@@ -34482,7 +34531,7 @@ ${lanes.join("\n")}
34482
34531
  );
34483
34532
  let exportClause;
34484
34533
  let moduleSpecifier;
34485
- let assertClause;
34534
+ let attributes;
34486
34535
  const isTypeOnly = parseOptional(156 /* TypeKeyword */);
34487
34536
  const namespaceExportPos = getNodePos();
34488
34537
  if (parseOptional(42 /* AsteriskToken */)) {
@@ -34498,12 +34547,13 @@ ${lanes.join("\n")}
34498
34547
  moduleSpecifier = parseModuleSpecifier();
34499
34548
  }
34500
34549
  }
34501
- if (moduleSpecifier && token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) {
34502
- assertClause = parseAssertClause();
34550
+ const currentToken2 = token();
34551
+ if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
34552
+ attributes = parseImportAttributes(currentToken2);
34503
34553
  }
34504
34554
  parseSemicolon();
34505
34555
  setAwaitContext(savedAwaitContext);
34506
- const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
34556
+ const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
34507
34557
  return withJSDoc(finishNode(node, pos), hasJSDoc);
34508
34558
  }
34509
34559
  function parseExportAssignment(pos, hasJSDoc, modifiers) {
@@ -34553,7 +34603,7 @@ ${lanes.join("\n")}
34553
34603
  ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
34554
34604
  ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
34555
34605
  ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
34556
- ParsingContext2[ParsingContext2["AssertEntries"] = 24] = "AssertEntries";
34606
+ ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
34557
34607
  ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
34558
34608
  ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
34559
34609
  })(ParsingContext || (ParsingContext = {}));
@@ -39407,10 +39457,15 @@ ${lanes.join("\n")}
39407
39457
  const failedLookupLocations = [];
39408
39458
  const affectingLocations = [];
39409
39459
  let features = getNodeResolutionFeatures(options);
39410
- if (resolutionMode === 99 /* ESNext */ && (getEmitModuleResolutionKind(options) === 3 /* Node16 */ || getEmitModuleResolutionKind(options) === 99 /* NodeNext */)) {
39460
+ if (resolutionMode !== void 0) {
39461
+ features |= 30 /* AllFeatures */;
39462
+ }
39463
+ const moduleResolution = getEmitModuleResolutionKind(options);
39464
+ if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
39411
39465
  features |= 32 /* EsmMode */;
39412
39466
  }
39413
- const conditions = features & 8 /* Exports */ ? getConditions(options, !!(features & 32 /* EsmMode */)) : [];
39467
+ const useImportCondition = resolutionMode === 99 /* ESNext */ || (resolutionMode !== void 0 ? false : void 0);
39468
+ const conditions = features & 8 /* Exports */ ? getConditions(options, useImportCondition) : [];
39414
39469
  const diagnostics = [];
39415
39470
  const moduleResolutionState = {
39416
39471
  compilerOptions: options,
@@ -39579,11 +39634,19 @@ ${lanes.join("\n")}
39579
39634
  return features;
39580
39635
  }
39581
39636
  function getConditions(options, esmMode) {
39582
- const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"];
39637
+ const moduleResolution = getEmitModuleResolutionKind(options);
39638
+ if (esmMode === void 0) {
39639
+ if (moduleResolution === 100 /* Bundler */) {
39640
+ esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
39641
+ } else if (moduleResolution === 2 /* Node10 */) {
39642
+ return [];
39643
+ }
39644
+ }
39645
+ const conditions = esmMode ? ["import"] : ["require"];
39583
39646
  if (!options.noDtsResolution) {
39584
39647
  conditions.push("types");
39585
39648
  }
39586
- if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) {
39649
+ if (moduleResolution !== 100 /* Bundler */) {
39587
39650
  conditions.push("node");
39588
39651
  }
39589
39652
  return concatenate(conditions, options.customConditions);
@@ -40026,13 +40089,13 @@ ${lanes.join("\n")}
40026
40089
  result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
40027
40090
  break;
40028
40091
  case 2 /* Node10 */:
40029
- result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
40092
+ result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
40030
40093
  break;
40031
40094
  case 1 /* Classic */:
40032
40095
  result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
40033
40096
  break;
40034
40097
  case 100 /* Bundler */:
40035
- result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
40098
+ result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
40036
40099
  break;
40037
40100
  default:
40038
40101
  return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
@@ -40197,7 +40260,7 @@ ${lanes.join("\n")}
40197
40260
  resolutionMode
40198
40261
  );
40199
40262
  }
40200
- function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
40263
+ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {
40201
40264
  const containingDirectory = getDirectoryPath(containingFile);
40202
40265
  const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
40203
40266
  let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
@@ -40214,7 +40277,8 @@ ${lanes.join("\n")}
40214
40277
  extensions,
40215
40278
  /*isConfigLookup*/
40216
40279
  false,
40217
- redirectedReference
40280
+ redirectedReference,
40281
+ conditions
40218
40282
  );
40219
40283
  }
40220
40284
  function tryResolveJSModuleWorker(moduleName, initialDir, host) {
@@ -40230,10 +40294,12 @@ ${lanes.join("\n")}
40230
40294
  /*isConfigLookup*/
40231
40295
  false,
40232
40296
  /*redirectedReference*/
40297
+ void 0,
40298
+ /*conditions*/
40233
40299
  void 0
40234
40300
  );
40235
40301
  }
40236
- function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
40302
+ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {
40237
40303
  const containingDirectory = getDirectoryPath(containingFile);
40238
40304
  let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
40239
40305
  if (getResolveJsonModule(compilerOptions)) {
@@ -40249,10 +40315,11 @@ ${lanes.join("\n")}
40249
40315
  extensions,
40250
40316
  /*isConfigLookup*/
40251
40317
  false,
40252
- redirectedReference
40318
+ redirectedReference,
40319
+ conditions
40253
40320
  );
40254
40321
  }
40255
- function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
40322
+ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {
40256
40323
  let extensions;
40257
40324
  if (isConfigLookup) {
40258
40325
  extensions = 8 /* Json */;
@@ -40263,7 +40330,7 @@ ${lanes.join("\n")}
40263
40330
  } else {
40264
40331
  extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
40265
40332
  }
40266
- return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
40333
+ return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
40267
40334
  }
40268
40335
  function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
40269
40336
  return nodeModuleNameResolverWorker(
@@ -40278,15 +40345,21 @@ ${lanes.join("\n")}
40278
40345
  /*isConfigLookup*/
40279
40346
  true,
40280
40347
  /*redirectedReference*/
40348
+ void 0,
40349
+ /*conditions*/
40281
40350
  void 0
40282
40351
  );
40283
40352
  }
40284
- function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
40353
+ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
40285
40354
  var _a, _b, _c, _d;
40286
40355
  const traceEnabled = isTraceEnabled(compilerOptions, host);
40287
40356
  const failedLookupLocations = [];
40288
40357
  const affectingLocations = [];
40289
- const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */));
40358
+ const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
40359
+ conditions ?? (conditions = getConditions(
40360
+ compilerOptions,
40361
+ moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
40362
+ ));
40290
40363
  const diagnostics = [];
40291
40364
  const state = {
40292
40365
  compilerOptions,
@@ -40296,17 +40369,17 @@ ${lanes.join("\n")}
40296
40369
  affectingLocations,
40297
40370
  packageJsonInfoCache: cache,
40298
40371
  features,
40299
- conditions,
40372
+ conditions: conditions ?? emptyArray,
40300
40373
  requestContainingDirectory: containingDirectory,
40301
40374
  reportDiagnostic: (diag2) => void diagnostics.push(diag2),
40302
40375
  isConfigLookup,
40303
40376
  candidateIsFromPackageJsonField: false
40304
40377
  };
40305
- if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) {
40306
- trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
40378
+ if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
40379
+ trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
40307
40380
  }
40308
40381
  let result;
40309
- if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
40382
+ if (moduleResolution === 2 /* Node10 */) {
40310
40383
  const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
40311
40384
  const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
40312
40385
  result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
@@ -40314,7 +40387,7 @@ ${lanes.join("\n")}
40314
40387
  result = tryResolve(extensions, state);
40315
40388
  }
40316
40389
  let legacyResult;
40317
- if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.includes("import")) {
40390
+ if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && (conditions == null ? void 0 : conditions.includes("import"))) {
40318
40391
  traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
40319
40392
  const diagnosticState = {
40320
40393
  ...state,
@@ -41111,7 +41184,8 @@ ${lanes.join("\n")}
41111
41184
  extensions,
41112
41185
  /*isConfigLookup*/
41113
41186
  false,
41114
- redirectedReference
41187
+ redirectedReference,
41188
+ state.conditions
41115
41189
  );
41116
41190
  return toSearchResult(
41117
41191
  result.resolvedModule ? {
@@ -45929,11 +46003,16 @@ ${lanes.join("\n")}
45929
46003
  checkSourceFileWithEagerDiagnostics(file);
45930
46004
  Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */));
45931
46005
  diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName));
45932
- checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => {
45933
- if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
45934
- (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ });
45935
- }
45936
- });
46006
+ checkUnusedOrUninitializedIdentifiers(
46007
+ getPotentiallyUnusedOrUninitializedIdentifiers(file),
46008
+ (containingNode, kind, diag2) => {
46009
+ if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
46010
+ (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ });
46011
+ }
46012
+ },
46013
+ /*checkUnused*/
46014
+ true
46015
+ );
45937
46016
  return diagnostics2 || emptyArray;
45938
46017
  } finally {
45939
46018
  cancellationToken = void 0;
@@ -46430,7 +46509,7 @@ ${lanes.join("\n")}
46430
46509
  var deferredGlobalClassAccessorDecoratorTargetType;
46431
46510
  var deferredGlobalClassAccessorDecoratorResultType;
46432
46511
  var deferredGlobalClassFieldDecoratorContextType;
46433
- var allPotentiallyUnusedIdentifiers = /* @__PURE__ */ new Map();
46512
+ var allPotentiallyUnusedOrUninitializedIdentifiers = /* @__PURE__ */ new Map();
46434
46513
  var flowLoopStart = 0;
46435
46514
  var flowLoopCount = 0;
46436
46515
  var sharedFlowCount = 0;
@@ -47141,10 +47220,10 @@ ${lanes.join("\n")}
47141
47220
  function isConstAssertion(location) {
47142
47221
  return isAssertionExpression(location) && isConstTypeReference(location.type) || isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression);
47143
47222
  }
47144
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true) {
47145
- return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, getSymbol2);
47223
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true, isWritten = false) {
47224
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, isWritten, getSymbol2);
47146
47225
  }
47147
- function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
47226
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, isWritten, lookup) {
47148
47227
  var _a, _b, _c;
47149
47228
  const originalLocation = location;
47150
47229
  let result;
@@ -47370,6 +47449,9 @@ ${lanes.join("\n")}
47370
47449
  if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) {
47371
47450
  result.isReferenced |= meaning;
47372
47451
  }
47452
+ if (isWritten && result) {
47453
+ result.isInitialized = true;
47454
+ }
47373
47455
  if (!result) {
47374
47456
  if (lastLocation) {
47375
47457
  Debug.assertNode(lastLocation, isSourceFile);
@@ -48789,7 +48871,7 @@ ${lanes.join("\n")}
48789
48871
  return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0;
48790
48872
  }
48791
48873
  function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
48792
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
48874
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
48793
48875
  if (startsWith(moduleReference, "@types/")) {
48794
48876
  const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
48795
48877
  const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
@@ -48844,9 +48926,8 @@ ${lanes.join("\n")}
48844
48926
  }
48845
48927
  if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
48846
48928
  const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
48847
- const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
48848
- const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_j = overrideClauseHost.assertions) == null ? void 0 : _j.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause;
48849
- if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) {
48929
+ const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
48930
+ if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
48850
48931
  if (findAncestor(location, isImportEqualsDeclaration)) {
48851
48932
  error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference);
48852
48933
  } else {
@@ -48952,7 +49033,7 @@ ${lanes.join("\n")}
48952
49033
  error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
48953
49034
  } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
48954
49035
  const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
48955
- const suggestedExt = (_k = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _k[1];
49036
+ const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
48956
49037
  if (suggestedExt) {
48957
49038
  error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
48958
49039
  } else {
@@ -50717,7 +50798,7 @@ ${lanes.join("\n")}
50717
50798
  return factory.updateImportTypeNode(
50718
50799
  root,
50719
50800
  root.argument,
50720
- root.assertions,
50801
+ root.attributes,
50721
50802
  qualifier,
50722
50803
  typeArguments,
50723
50804
  root.isTypeOf
@@ -51450,7 +51531,6 @@ ${lanes.join("\n")}
51450
51531
  return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
51451
51532
  }
51452
51533
  function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
51453
- var _a, _b, _c, _d;
51454
51534
  const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */));
51455
51535
  const isTypeOf = meaning === 111551 /* Value */;
51456
51536
  if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
@@ -51459,17 +51539,18 @@ ${lanes.join("\n")}
51459
51539
  const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration));
51460
51540
  const targetFile = getSourceFileOfModule(chain[0]);
51461
51541
  let specifier;
51462
- let assertion;
51542
+ let attributes;
51463
51543
  if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
51464
51544
  if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) {
51465
51545
  specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */);
51466
- assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([
51467
- factory.createAssertEntry(
51468
- factory.createStringLiteral("resolution-mode"),
51469
- factory.createStringLiteral("import")
51470
- )
51471
- ])));
51472
- (_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _b.call(_a);
51546
+ attributes = factory.createImportAttributes(
51547
+ factory.createNodeArray([
51548
+ factory.createImportAttribute(
51549
+ factory.createStringLiteral("resolution-mode"),
51550
+ factory.createStringLiteral("import")
51551
+ )
51552
+ ])
51553
+ );
51473
51554
  }
51474
51555
  }
51475
51556
  if (!specifier) {
@@ -51483,16 +51564,17 @@ ${lanes.join("\n")}
51483
51564
  if (specifier.includes("/node_modules/")) {
51484
51565
  specifier = oldSpecifier;
51485
51566
  } else {
51486
- assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([
51487
- factory.createAssertEntry(
51488
- factory.createStringLiteral("resolution-mode"),
51489
- factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require")
51490
- )
51491
- ])));
51492
- (_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _d.call(_c);
51567
+ attributes = factory.createImportAttributes(
51568
+ factory.createNodeArray([
51569
+ factory.createImportAttribute(
51570
+ factory.createStringLiteral("resolution-mode"),
51571
+ factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require")
51572
+ )
51573
+ ])
51574
+ );
51493
51575
  }
51494
51576
  }
51495
- if (!assertion) {
51577
+ if (!attributes) {
51496
51578
  context.encounteredError = true;
51497
51579
  if (context.tracker.reportLikelyUnsafeImportRequiredError) {
51498
51580
  context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
@@ -51512,11 +51594,11 @@ ${lanes.join("\n")}
51512
51594
  void 0
51513
51595
  );
51514
51596
  }
51515
- return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
51597
+ return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf);
51516
51598
  } else {
51517
51599
  const splitNode = getTopmostIndexedAccessType(nonRootParts);
51518
51600
  const qualifier = splitNode.objectType.typeName;
51519
- return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
51601
+ return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
51520
51602
  }
51521
51603
  }
51522
51604
  const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
@@ -51992,7 +52074,7 @@ ${lanes.join("\n")}
51992
52074
  return factory.updateImportTypeNode(
51993
52075
  node,
51994
52076
  factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)),
51995
- node.assertions,
52077
+ node.attributes,
51996
52078
  node.qualifier,
51997
52079
  visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
51998
52080
  node.isTypeOf
@@ -52212,7 +52294,7 @@ ${lanes.join("\n")}
52212
52294
  return statements;
52213
52295
  }
52214
52296
  function inlineExportModifiers(statements) {
52215
- const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.assertClause && !!d.exportClause && isNamedExports(d.exportClause));
52297
+ const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause));
52216
52298
  if (index >= 0) {
52217
52299
  const exportDecl = statements[index];
52218
52300
  const replacements = mapDefined(exportDecl.exportClause.elements, (e) => {
@@ -52240,7 +52322,7 @@ ${lanes.join("\n")}
52240
52322
  replacements
52241
52323
  ),
52242
52324
  exportDecl.moduleSpecifier,
52243
- exportDecl.assertClause
52325
+ exportDecl.attributes
52244
52326
  );
52245
52327
  }
52246
52328
  }
@@ -52891,7 +52973,7 @@ ${lanes.join("\n")}
52891
52973
  )])
52892
52974
  ),
52893
52975
  factory.createStringLiteral(specifier2),
52894
- /*assertClause*/
52976
+ /*attributes*/
52895
52977
  void 0
52896
52978
  ),
52897
52979
  0 /* None */
@@ -52979,7 +53061,7 @@ ${lanes.join("\n")}
52979
53061
  void 0
52980
53062
  ),
52981
53063
  specifier2,
52982
- node.parent.assertClause
53064
+ node.parent.attributes
52983
53065
  ),
52984
53066
  0 /* None */
52985
53067
  );
@@ -53000,7 +53082,7 @@ ${lanes.join("\n")}
53000
53082
  factory.createNamespaceImport(factory.createIdentifier(localName))
53001
53083
  ),
53002
53084
  specifier2,
53003
- node.parent.parent.assertClause
53085
+ node.parent.attributes
53004
53086
  ),
53005
53087
  0 /* None */
53006
53088
  );
@@ -53041,7 +53123,7 @@ ${lanes.join("\n")}
53041
53123
  ])
53042
53124
  ),
53043
53125
  specifier2,
53044
- node.parent.parent.parent.assertClause
53126
+ node.parent.parent.parent.attributes
53045
53127
  ),
53046
53128
  0 /* None */
53047
53129
  );
@@ -62500,6 +62582,7 @@ ${lanes.join("\n")}
62500
62582
  let skipParentCounter = 0;
62501
62583
  let lastSkippedInfo;
62502
62584
  let incompatibleStack;
62585
+ let relationCount = 16e6 - relation.size >> 3;
62503
62586
  Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
62504
62587
  const result = isRelatedTo(
62505
62588
  source,
@@ -62513,8 +62596,19 @@ ${lanes.join("\n")}
62513
62596
  reportIncompatibleStack();
62514
62597
  }
62515
62598
  if (overflow) {
62599
+ const id = getRelationKey(
62600
+ source,
62601
+ target,
62602
+ /*intersectionState*/
62603
+ 0 /* None */,
62604
+ relation,
62605
+ /*ignoreConstraints*/
62606
+ false
62607
+ );
62608
+ relation.set(id, 4 /* Reported */ | 2 /* Failed */);
62516
62609
  (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth });
62517
- const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
62610
+ const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;
62611
+ const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target));
62518
62612
  if (errorOutputContainer) {
62519
62613
  (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
62520
62614
  }
@@ -63045,6 +63139,16 @@ ${lanes.join("\n")}
63045
63139
  }
63046
63140
  function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) {
63047
63141
  if (source2.flags & 1048576 /* Union */) {
63142
+ if (target2.flags & 1048576 /* Union */) {
63143
+ const sourceOrigin = source2.origin;
63144
+ if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) {
63145
+ return -1 /* True */;
63146
+ }
63147
+ const targetOrigin = target2.origin;
63148
+ if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) {
63149
+ return -1 /* True */;
63150
+ }
63151
+ }
63048
63152
  return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState);
63049
63153
  }
63050
63154
  if (target2.flags & 1048576 /* Union */) {
@@ -63358,6 +63462,10 @@ ${lanes.join("\n")}
63358
63462
  return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;
63359
63463
  }
63360
63464
  }
63465
+ if (relationCount <= 0) {
63466
+ overflow = true;
63467
+ return 0 /* False */;
63468
+ }
63361
63469
  if (!maybeKeys) {
63362
63470
  maybeKeys = [];
63363
63471
  maybeKeysSet = /* @__PURE__ */ new Set();
@@ -63451,6 +63559,7 @@ ${lanes.join("\n")}
63451
63559
  }
63452
63560
  } else {
63453
63561
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
63562
+ relationCount--;
63454
63563
  resetMaybeStack(
63455
63564
  /*markAllAsSucceeded*/
63456
63565
  false
@@ -63462,6 +63571,7 @@ ${lanes.join("\n")}
63462
63571
  maybeKeysSet.delete(maybeKeys[i]);
63463
63572
  if (markAllAsSucceeded) {
63464
63573
  relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
63574
+ relationCount--;
63465
63575
  }
63466
63576
  }
63467
63577
  maybeCount = maybeStart;
@@ -64857,10 +64967,7 @@ ${lanes.join("\n")}
64857
64967
  return false;
64858
64968
  }
64859
64969
  function getVariances(type) {
64860
- return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ || isArraySubtype(type) ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
64861
- }
64862
- function isArraySubtype(type) {
64863
- return length(type.typeParameters) === 1 && length(getBaseTypes(type)) === 1 && isTypeReferenceWithGenericArguments(getBaseTypes(type)[0]) && getVariances(getBaseTypes(type)[0].target) === arrayVariances && length(getTypeArguments(getBaseTypes(type)[0])) === 1 && getTypeArguments(getBaseTypes(type)[0])[0] === type.typeParameters[0];
64970
+ return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
64864
64971
  }
64865
64972
  function getAliasVariances(symbol) {
64866
64973
  return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);
@@ -66852,7 +66959,10 @@ ${lanes.join("\n")}
66852
66959
  node,
66853
66960
  !isWriteOnlyAccess(node),
66854
66961
  /*excludeGlobals*/
66855
- false
66962
+ false,
66963
+ /*getSpellingSuggestions*/
66964
+ void 0,
66965
+ isWriteAccess(node)
66856
66966
  ) || unknownSymbol;
66857
66967
  }
66858
66968
  return links.resolvedSymbol;
@@ -72286,6 +72396,8 @@ ${lanes.join("\n")}
72286
72396
  false,
72287
72397
  /*getSpellingSuggestions*/
72288
72398
  true,
72399
+ /*isWritten*/
72400
+ false,
72289
72401
  (symbols, name, meaning2) => {
72290
72402
  Debug.assertEqual(outerName, name, "name should equal outerName");
72291
72403
  const symbol = getSymbol2(symbols, name, meaning2);
@@ -77740,7 +77852,7 @@ ${lanes.join("\n")}
77740
77852
  }
77741
77853
  }
77742
77854
  if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) {
77743
- registerForUnusedIdentifiersCheck(node);
77855
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
77744
77856
  }
77745
77857
  }
77746
77858
  }
@@ -78285,7 +78397,7 @@ ${lanes.join("\n")}
78285
78397
  }
78286
78398
  }
78287
78399
  }
78288
- registerForUnusedIdentifiersCheck(node);
78400
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
78289
78401
  }
78290
78402
  function checkTemplateLiteralType(node) {
78291
78403
  for (const span of node.templateSpans) {
@@ -78297,16 +78409,8 @@ ${lanes.join("\n")}
78297
78409
  }
78298
78410
  function checkImportType(node) {
78299
78411
  checkSourceElement(node.argument);
78300
- if (node.assertions) {
78301
- const override = getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
78302
- if (override) {
78303
- if (!isNightly()) {
78304
- grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
78305
- }
78306
- if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
78307
- grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
78308
- }
78309
- }
78412
+ if (node.attributes) {
78413
+ getResolutionModeOverride(node.attributes, grammarErrorOnNode);
78310
78414
  }
78311
78415
  checkTypeReferenceOrImport(node);
78312
78416
  }
@@ -79279,25 +79383,27 @@ ${lanes.join("\n")}
79279
79383
  }
79280
79384
  }
79281
79385
  }
79282
- function registerForUnusedIdentifiersCheck(node) {
79283
- addLazyDiagnostic(registerForUnusedIdentifiersCheckDiagnostics);
79284
- function registerForUnusedIdentifiersCheckDiagnostics() {
79386
+ function registerForUnusedOrUninitializedIdentifiersCheck(node) {
79387
+ addLazyDiagnostic(registerForUnusedOrUninitializedIdentifiersCheckDiagnostics);
79388
+ function registerForUnusedOrUninitializedIdentifiersCheckDiagnostics() {
79285
79389
  const sourceFile = getSourceFileOfNode(node);
79286
- let potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path);
79287
- if (!potentiallyUnusedIdentifiers) {
79288
- potentiallyUnusedIdentifiers = [];
79289
- allPotentiallyUnusedIdentifiers.set(sourceFile.path, potentiallyUnusedIdentifiers);
79390
+ let potentiallyUnusedOrUninitializedIdentifiers = allPotentiallyUnusedOrUninitializedIdentifiers.get(sourceFile.path);
79391
+ if (!potentiallyUnusedOrUninitializedIdentifiers) {
79392
+ potentiallyUnusedOrUninitializedIdentifiers = [];
79393
+ allPotentiallyUnusedOrUninitializedIdentifiers.set(sourceFile.path, potentiallyUnusedOrUninitializedIdentifiers);
79290
79394
  }
79291
- potentiallyUnusedIdentifiers.push(node);
79395
+ potentiallyUnusedOrUninitializedIdentifiers.push(node);
79292
79396
  }
79293
79397
  }
79294
- function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) {
79398
+ function checkUnusedOrUninitializedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic, checkUnused, checkUninitialized) {
79295
79399
  for (const node of potentiallyUnusedIdentifiers) {
79296
79400
  switch (node.kind) {
79297
79401
  case 263 /* ClassDeclaration */:
79298
79402
  case 231 /* ClassExpression */:
79299
- checkUnusedClassMembers(node, addDiagnostic);
79300
- checkUnusedTypeParameters(node, addDiagnostic);
79403
+ if (checkUnused) {
79404
+ checkUnusedClassMembers(node, addDiagnostic);
79405
+ checkUnusedTypeParameters(node, addDiagnostic);
79406
+ }
79301
79407
  break;
79302
79408
  case 312 /* SourceFile */:
79303
79409
  case 267 /* ModuleDeclaration */:
@@ -79306,7 +79412,12 @@ ${lanes.join("\n")}
79306
79412
  case 248 /* ForStatement */:
79307
79413
  case 249 /* ForInStatement */:
79308
79414
  case 250 /* ForOfStatement */:
79309
- checkUnusedLocalsAndParameters(node, addDiagnostic);
79415
+ if (checkUnused) {
79416
+ checkUnusedLocalsAndParameters(node, addDiagnostic);
79417
+ }
79418
+ if (checkUninitialized) {
79419
+ checkUninitializedLocals(node);
79420
+ }
79310
79421
  break;
79311
79422
  case 176 /* Constructor */:
79312
79423
  case 218 /* FunctionExpression */:
@@ -79315,10 +79426,15 @@ ${lanes.join("\n")}
79315
79426
  case 174 /* MethodDeclaration */:
79316
79427
  case 177 /* GetAccessor */:
79317
79428
  case 178 /* SetAccessor */:
79318
- if (node.body) {
79319
- checkUnusedLocalsAndParameters(node, addDiagnostic);
79429
+ if (checkUnused) {
79430
+ if (node.body) {
79431
+ checkUnusedLocalsAndParameters(node, addDiagnostic);
79432
+ }
79433
+ checkUnusedTypeParameters(node, addDiagnostic);
79434
+ }
79435
+ if (checkUninitialized) {
79436
+ checkUninitializedLocals(node);
79320
79437
  }
79321
- checkUnusedTypeParameters(node, addDiagnostic);
79322
79438
  break;
79323
79439
  case 173 /* MethodSignature */:
79324
79440
  case 179 /* CallSignature */:
@@ -79327,10 +79443,14 @@ ${lanes.join("\n")}
79327
79443
  case 185 /* ConstructorType */:
79328
79444
  case 265 /* TypeAliasDeclaration */:
79329
79445
  case 264 /* InterfaceDeclaration */:
79330
- checkUnusedTypeParameters(node, addDiagnostic);
79446
+ if (checkUnused) {
79447
+ checkUnusedTypeParameters(node, addDiagnostic);
79448
+ }
79331
79449
  break;
79332
79450
  case 195 /* InferType */:
79333
- checkUnusedInferTypeParameter(node, addDiagnostic);
79451
+ if (checkUnused) {
79452
+ checkUnusedInferTypeParameter(node, addDiagnostic);
79453
+ }
79334
79454
  break;
79335
79455
  default:
79336
79456
  Debug.assertNever(node, "Node should not have been registered for unused identifiers check");
@@ -79520,6 +79640,26 @@ ${lanes.join("\n")}
79520
79640
  }
79521
79641
  });
79522
79642
  }
79643
+ function checkUninitializedLocals(nodeWithLocals) {
79644
+ nodeWithLocals.locals.forEach((local) => {
79645
+ if (!(local.flags & 3 /* Variable */) || local.isInitialized || !local.isReferenced) {
79646
+ return;
79647
+ }
79648
+ const declaration = local.valueDeclaration;
79649
+ if (!declaration) {
79650
+ return;
79651
+ }
79652
+ if (isVariableDeclaration(declaration)) {
79653
+ if (getCombinedNodeFlagsCached(declaration) & 33554432 /* Ambient */ || declaration.exclamationToken || declaration.initializer || !declaration.type) {
79654
+ return;
79655
+ }
79656
+ const type = getTypeFromTypeNode(declaration.type);
79657
+ if (!(type.flags & 3 /* AnyOrUnknown */) && !containsUndefinedType(type)) {
79658
+ error2(declaration, Diagnostics.Variable_0_is_used_before_being_assigned, idText(declaration.name));
79659
+ }
79660
+ }
79661
+ });
79662
+ }
79523
79663
  function checkPotentialUncheckedRenamedBindingElementsInTypes() {
79524
79664
  var _a;
79525
79665
  for (const node of potentialUnusedRenamedBindingElementsInTypes) {
@@ -79566,7 +79706,7 @@ ${lanes.join("\n")}
79566
79706
  forEach(node.statements, checkSourceElement);
79567
79707
  }
79568
79708
  if (node.locals) {
79569
- registerForUnusedIdentifiersCheck(node);
79709
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
79570
79710
  }
79571
79711
  }
79572
79712
  function checkCollisionWithArgumentsInGeneratedCode(node) {
@@ -80116,7 +80256,7 @@ ${lanes.join("\n")}
80116
80256
  checkExpression(node.incrementor);
80117
80257
  checkSourceElement(node.statement);
80118
80258
  if (node.locals) {
80119
- registerForUnusedIdentifiersCheck(node);
80259
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
80120
80260
  }
80121
80261
  }
80122
80262
  function checkForOfStatement(node) {
@@ -80155,7 +80295,7 @@ ${lanes.join("\n")}
80155
80295
  }
80156
80296
  checkSourceElement(node.statement);
80157
80297
  if (node.locals) {
80158
- registerForUnusedIdentifiersCheck(node);
80298
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
80159
80299
  }
80160
80300
  }
80161
80301
  function checkForInStatement(node) {
@@ -80187,7 +80327,7 @@ ${lanes.join("\n")}
80187
80327
  }
80188
80328
  checkSourceElement(node.statement);
80189
80329
  if (node.locals) {
80190
- registerForUnusedIdentifiersCheck(node);
80330
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
80191
80331
  }
80192
80332
  }
80193
80333
  function checkRightHandSideOfForOf(statement) {
@@ -80919,7 +81059,7 @@ ${lanes.join("\n")}
80919
81059
  }
80920
81060
  });
80921
81061
  if (node.caseBlock.locals) {
80922
- registerForUnusedIdentifiersCheck(node.caseBlock);
81062
+ registerForUnusedOrUninitializedIdentifiersCheck(node.caseBlock);
80923
81063
  }
80924
81064
  }
80925
81065
  function checkLabeledStatement(node) {
@@ -81259,7 +81399,7 @@ ${lanes.join("\n")}
81259
81399
  }
81260
81400
  function checkClassExpressionDeferred(node) {
81261
81401
  forEach(node.members, checkSourceElement);
81262
- registerForUnusedIdentifiersCheck(node);
81402
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
81263
81403
  }
81264
81404
  function checkClassDeclaration(node) {
81265
81405
  const firstDecorator = find(node.modifiers, isDecorator);
@@ -81271,7 +81411,7 @@ ${lanes.join("\n")}
81271
81411
  }
81272
81412
  checkClassLikeDeclaration(node);
81273
81413
  forEach(node.members, checkSourceElement);
81274
- registerForUnusedIdentifiersCheck(node);
81414
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
81275
81415
  }
81276
81416
  function checkClassLikeDeclaration(node) {
81277
81417
  checkGrammarClassLikeDeclaration(node);
@@ -81832,7 +81972,7 @@ ${lanes.join("\n")}
81832
81972
  forEach(node.members, checkSourceElement);
81833
81973
  addLazyDiagnostic(() => {
81834
81974
  checkTypeForDuplicateIndexSignatures(node);
81835
- registerForUnusedIdentifiersCheck(node);
81975
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
81836
81976
  });
81837
81977
  }
81838
81978
  function checkTypeAliasDeclaration(node) {
@@ -81846,7 +81986,7 @@ ${lanes.join("\n")}
81846
81986
  }
81847
81987
  } else {
81848
81988
  checkSourceElement(node.type);
81849
- registerForUnusedIdentifiersCheck(node);
81989
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
81850
81990
  }
81851
81991
  }
81852
81992
  function computeEnumMemberValues(node) {
@@ -82117,7 +82257,7 @@ ${lanes.join("\n")}
82117
82257
  if (node.body) {
82118
82258
  checkSourceElement(node.body);
82119
82259
  if (!isGlobalScopeAugmentation(node)) {
82120
- registerForUnusedIdentifiersCheck(node);
82260
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
82121
82261
  }
82122
82262
  }
82123
82263
  addLazyDiagnostic(checkModuleDeclarationDiagnostics);
@@ -82270,12 +82410,13 @@ ${lanes.join("\n")}
82270
82410
  return false;
82271
82411
  }
82272
82412
  }
82273
- if (!isImportEqualsDeclaration(node) && node.assertClause) {
82413
+ if (!isImportEqualsDeclaration(node) && node.attributes) {
82414
+ const diagnostic = node.attributes.token === 118 /* WithKeyword */ ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions;
82274
82415
  let hasError = false;
82275
- for (const clause of node.assertClause.elements) {
82276
- if (!isStringLiteral(clause.value)) {
82416
+ for (const attr of node.attributes.elements) {
82417
+ if (!isStringLiteral(attr.value)) {
82277
82418
  hasError = true;
82278
- error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions);
82419
+ error2(attr.value, diagnostic);
82279
82420
  }
82280
82421
  }
82281
82422
  return !hasError;
@@ -82407,32 +82548,26 @@ ${lanes.join("\n")}
82407
82548
  checkExternalEmitHelpers(node, 131072 /* ImportDefault */);
82408
82549
  }
82409
82550
  }
82410
- function checkAssertClause(declaration) {
82551
+ function checkImportAttributes(declaration) {
82411
82552
  var _a;
82412
- if (declaration.assertClause) {
82413
- const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration);
82414
- const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : void 0);
82415
- if (validForTypeAssertions && override) {
82416
- if (!isNightly()) {
82417
- grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
82418
- }
82419
- if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
82420
- return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
82421
- }
82553
+ const node = declaration.attributes;
82554
+ if (node) {
82555
+ const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration);
82556
+ const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0);
82557
+ const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */;
82558
+ if (validForTypeAttributes && override) {
82422
82559
  return;
82423
82560
  }
82424
82561
  const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
82425
82562
  if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) {
82426
- return grammarErrorOnNode(
82427
- declaration.assertClause,
82428
- moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext
82429
- );
82563
+ const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext;
82564
+ return grammarErrorOnNode(node, message);
82430
82565
  }
82431
82566
  if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
82432
- return grammarErrorOnNode(declaration.assertClause, Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
82567
+ return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
82433
82568
  }
82434
82569
  if (override) {
82435
- return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
82570
+ return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
82436
82571
  }
82437
82572
  }
82438
82573
  }
@@ -82464,7 +82599,7 @@ ${lanes.join("\n")}
82464
82599
  }
82465
82600
  }
82466
82601
  }
82467
- checkAssertClause(node);
82602
+ checkImportAttributes(node);
82468
82603
  }
82469
82604
  function checkImportEqualsDeclaration(node) {
82470
82605
  if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
@@ -82537,7 +82672,7 @@ ${lanes.join("\n")}
82537
82672
  }
82538
82673
  }
82539
82674
  }
82540
- checkAssertClause(node);
82675
+ checkImportAttributes(node);
82541
82676
  }
82542
82677
  function checkGrammarExportDeclaration(node) {
82543
82678
  var _a;
@@ -83120,8 +83255,8 @@ ${lanes.join("\n")}
83120
83255
  return Debug.assertNever(kind);
83121
83256
  }
83122
83257
  }
83123
- function getPotentiallyUnusedIdentifiers(sourceFile) {
83124
- return allPotentiallyUnusedIdentifiers.get(sourceFile.path) || emptyArray;
83258
+ function getPotentiallyUnusedOrUninitializedIdentifiers(sourceFile) {
83259
+ return allPotentiallyUnusedOrUninitializedIdentifiers.get(sourceFile.path) || emptyArray;
83125
83260
  }
83126
83261
  function checkSourceFileWorker(node) {
83127
83262
  const links = getNodeLinks(node);
@@ -83139,15 +83274,21 @@ ${lanes.join("\n")}
83139
83274
  checkSourceElement(node.endOfFileToken);
83140
83275
  checkDeferredNodes(node);
83141
83276
  if (isExternalOrCommonJsModule(node)) {
83142
- registerForUnusedIdentifiersCheck(node);
83277
+ registerForUnusedOrUninitializedIdentifiersCheck(node);
83143
83278
  }
83144
83279
  addLazyDiagnostic(() => {
83145
- if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) {
83146
- checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => {
83147
- if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
83148
- diagnostics.add(diag2);
83149
- }
83150
- });
83280
+ const checkUnused = !node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters);
83281
+ if (checkUnused || strictNullChecks) {
83282
+ checkUnusedOrUninitializedIdentifiers(
83283
+ getPotentiallyUnusedOrUninitializedIdentifiers(node),
83284
+ (containingNode, kind, diag2) => {
83285
+ if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
83286
+ diagnostics.add(diag2);
83287
+ }
83288
+ },
83289
+ checkUnused,
83290
+ strictNullChecks
83291
+ );
83151
83292
  }
83152
83293
  if (!node.isDeclarationFile) {
83153
83294
  checkPotentialUncheckedRenamedBindingElementsInTypes();
@@ -86327,12 +86468,12 @@ ${lanes.join("\n")}
86327
86468
  if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) {
86328
86469
  checkGrammarForDisallowedTrailingComma(nodeArguments);
86329
86470
  if (nodeArguments.length > 1) {
86330
- const assertionArgument = nodeArguments[1];
86331
- return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
86471
+ const importAttributesArgument = nodeArguments[1];
86472
+ return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
86332
86473
  }
86333
86474
  }
86334
86475
  if (nodeArguments.length === 0 || nodeArguments.length > 2) {
86335
- return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments);
86476
+ return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);
86336
86477
  }
86337
86478
  const spreadElement = find(nodeArguments, isSpreadElement);
86338
86479
  if (spreadElement) {
@@ -86731,13 +86872,6 @@ ${lanes.join("\n")}
86731
86872
  this.inner.reportNonSerializableProperty(propertyName);
86732
86873
  }
86733
86874
  }
86734
- reportImportTypeNodeResolutionModeOverride() {
86735
- var _a;
86736
- if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) {
86737
- this.onDiagnosticReported();
86738
- this.inner.reportImportTypeNodeResolutionModeOverride();
86739
- }
86740
- }
86741
86875
  onDiagnosticReported() {
86742
86876
  this.context.reportedDiagnostic = true;
86743
86877
  }
@@ -87257,7 +87391,7 @@ ${lanes.join("\n")}
87257
87391
  return context.factory.updateImportTypeNode(
87258
87392
  node,
87259
87393
  Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
87260
- nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
87394
+ nodeVisitor(node.attributes, visitor, isImportAttributes),
87261
87395
  nodeVisitor(node.qualifier, visitor, isEntityName),
87262
87396
  nodesVisitor(node.typeArguments, visitor, isTypeNode),
87263
87397
  node.isTypeOf
@@ -87808,20 +87942,20 @@ ${lanes.join("\n")}
87808
87942
  nodesVisitor(node.modifiers, visitor, isModifierLike),
87809
87943
  nodeVisitor(node.importClause, visitor, isImportClause),
87810
87944
  Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
87811
- nodeVisitor(node.assertClause, visitor, isAssertClause)
87945
+ nodeVisitor(node.attributes, visitor, isImportAttributes)
87812
87946
  );
87813
87947
  },
87814
- [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
87815
- return context.factory.updateAssertClause(
87948
+ [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
87949
+ return context.factory.updateImportAttributes(
87816
87950
  node,
87817
- nodesVisitor(node.elements, visitor, isAssertEntry),
87951
+ nodesVisitor(node.elements, visitor, isImportAttribute),
87818
87952
  node.multiLine
87819
87953
  );
87820
87954
  },
87821
- [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87822
- return context.factory.updateAssertEntry(
87955
+ [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
87956
+ return context.factory.updateImportAttribute(
87823
87957
  node,
87824
- Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
87958
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
87825
87959
  Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
87826
87960
  );
87827
87961
  },
@@ -87873,7 +88007,7 @@ ${lanes.join("\n")}
87873
88007
  node.isTypeOnly,
87874
88008
  nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
87875
88009
  nodeVisitor(node.moduleSpecifier, visitor, isExpression),
87876
- nodeVisitor(node.assertClause, visitor, isAssertClause)
88010
+ nodeVisitor(node.attributes, visitor, isImportAttributes)
87877
88011
  );
87878
88012
  },
87879
88013
  [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
@@ -91401,7 +91535,7 @@ ${lanes.join("\n")}
91401
91535
  void 0,
91402
91536
  importClause,
91403
91537
  node.moduleSpecifier,
91404
- node.assertClause
91538
+ node.attributes
91405
91539
  ) : void 0;
91406
91540
  }
91407
91541
  function visitImportClause(node) {
@@ -91451,7 +91585,7 @@ ${lanes.join("\n")}
91451
91585
  node.isTypeOnly,
91452
91586
  exportClause,
91453
91587
  node.moduleSpecifier,
91454
- node.assertClause
91588
+ node.attributes
91455
91589
  ) : void 0;
91456
91590
  }
91457
91591
  function visitNamedExports(node, allowEmpty) {
@@ -91485,7 +91619,7 @@ ${lanes.join("\n")}
91485
91619
  /*importClause*/
91486
91620
  void 0,
91487
91621
  node.moduleReference.expression,
91488
- /*assertClause*/
91622
+ /*attributes*/
91489
91623
  void 0
91490
91624
  ),
91491
91625
  node
@@ -99723,7 +99857,7 @@ ${lanes.join("\n")}
99723
99857
  factory2.createNamedImports(arrayFrom(importSpecifiersMap.values()))
99724
99858
  ),
99725
99859
  factory2.createStringLiteral(importSource),
99726
- /*assertClause*/
99860
+ /*attributes*/
99727
99861
  void 0
99728
99862
  );
99729
99863
  setParentRecursive(
@@ -109174,7 +109308,9 @@ ${lanes.join("\n")}
109174
109308
  )
109175
109309
  ])
109176
109310
  ),
109177
- factory2.createStringLiteral("module")
109311
+ factory2.createStringLiteral("module"),
109312
+ /*attributes*/
109313
+ void 0
109178
109314
  );
109179
109315
  const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */);
109180
109316
  const requireStatement = factory2.createVariableStatement(
@@ -109291,7 +109427,7 @@ ${lanes.join("\n")}
109291
109427
  )
109292
109428
  ),
109293
109429
  node.moduleSpecifier,
109294
- node.assertClause
109430
+ node.attributes
109295
109431
  );
109296
109432
  setOriginalNode(importDecl, node.exportClause);
109297
109433
  const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration(
@@ -109761,8 +109897,7 @@ ${lanes.join("\n")}
109761
109897
  trackReferencedAmbientModule,
109762
109898
  trackExternalModuleSymbolOfImportTypeNode,
109763
109899
  reportNonlocalAugmentation,
109764
- reportNonSerializableProperty,
109765
- reportImportTypeNodeResolutionModeOverride
109900
+ reportNonSerializableProperty
109766
109901
  };
109767
109902
  let errorNameNode;
109768
109903
  let errorFallbackNode;
@@ -109886,11 +110021,6 @@ ${lanes.join("\n")}
109886
110021
  context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
109887
110022
  }
109888
110023
  }
109889
- function reportImportTypeNodeResolutionModeOverride() {
109890
- if (!isNightly() && (errorNameNode || errorFallbackNode)) {
109891
- context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
109892
- }
109893
- }
109894
110024
  function transformDeclarationsForJS(sourceFile, bundled) {
109895
110025
  const oldDiag = getSymbolAccessibilityDiagnostic;
109896
110026
  getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : {
@@ -110395,7 +110525,7 @@ ${lanes.join("\n")}
110395
110525
  decl.modifiers,
110396
110526
  decl.importClause,
110397
110527
  rewriteModuleSpecifier(decl, decl.moduleSpecifier),
110398
- getResolutionModeOverrideForClauseInNightly(decl.assertClause)
110528
+ tryGetResolutionModeOverride(decl.attributes)
110399
110529
  );
110400
110530
  }
110401
110531
  const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0;
@@ -110411,7 +110541,7 @@ ${lanes.join("\n")}
110411
110541
  void 0
110412
110542
  ),
110413
110543
  rewriteModuleSpecifier(decl, decl.moduleSpecifier),
110414
- getResolutionModeOverrideForClauseInNightly(decl.assertClause)
110544
+ tryGetResolutionModeOverride(decl.attributes)
110415
110545
  );
110416
110546
  }
110417
110547
  if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) {
@@ -110429,7 +110559,7 @@ ${lanes.join("\n")}
110429
110559
  namedBindings
110430
110560
  ),
110431
110561
  rewriteModuleSpecifier(decl, decl.moduleSpecifier),
110432
- getResolutionModeOverrideForClauseInNightly(decl.assertClause)
110562
+ tryGetResolutionModeOverride(decl.attributes)
110433
110563
  ) : void 0;
110434
110564
  }
110435
110565
  const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0);
@@ -110444,7 +110574,7 @@ ${lanes.join("\n")}
110444
110574
  bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0
110445
110575
  ),
110446
110576
  rewriteModuleSpecifier(decl, decl.moduleSpecifier),
110447
- getResolutionModeOverrideForClauseInNightly(decl.assertClause)
110577
+ tryGetResolutionModeOverride(decl.attributes)
110448
110578
  );
110449
110579
  }
110450
110580
  if (resolver.isImportRequiredByAugmentation(decl)) {
@@ -110454,19 +110584,13 @@ ${lanes.join("\n")}
110454
110584
  /*importClause*/
110455
110585
  void 0,
110456
110586
  rewriteModuleSpecifier(decl, decl.moduleSpecifier),
110457
- getResolutionModeOverrideForClauseInNightly(decl.assertClause)
110587
+ tryGetResolutionModeOverride(decl.attributes)
110458
110588
  );
110459
110589
  }
110460
110590
  }
110461
- function getResolutionModeOverrideForClauseInNightly(assertClause) {
110462
- const mode = getResolutionModeOverrideForClause(assertClause);
110463
- if (mode !== void 0) {
110464
- if (!isNightly()) {
110465
- context.addDiagnostic(createDiagnosticForNode(assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
110466
- }
110467
- return assertClause;
110468
- }
110469
- return void 0;
110591
+ function tryGetResolutionModeOverride(node) {
110592
+ const mode = getResolutionModeOverride(node);
110593
+ return node && mode !== void 0 ? node : void 0;
110470
110594
  }
110471
110595
  function transformAndReplaceLatePaintedStatements(statements) {
110472
110596
  while (length(lateMarkedStatements)) {
@@ -110752,7 +110876,7 @@ ${lanes.join("\n")}
110752
110876
  return cleanup(factory2.updateImportTypeNode(
110753
110877
  input,
110754
110878
  factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
110755
- input.assertions,
110879
+ input.attributes,
110756
110880
  input.qualifier,
110757
110881
  visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode),
110758
110882
  input.isTypeOf
@@ -110806,7 +110930,7 @@ ${lanes.join("\n")}
110806
110930
  input.isTypeOnly,
110807
110931
  input.exportClause,
110808
110932
  rewriteModuleSpecifier(input, input.moduleSpecifier),
110809
- getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0
110933
+ tryGetResolutionModeOverride(input.attributes)
110810
110934
  );
110811
110935
  }
110812
110936
  case 277 /* ExportAssignment */: {
@@ -113280,10 +113404,10 @@ ${lanes.join("\n")}
113280
113404
  return emitNamedExports(node);
113281
113405
  case 281 /* ExportSpecifier */:
113282
113406
  return emitExportSpecifier(node);
113283
- case 300 /* AssertClause */:
113284
- return emitAssertClause(node);
113285
- case 301 /* AssertEntry */:
113286
- return emitAssertEntry(node);
113407
+ case 300 /* ImportAttributes */:
113408
+ return emitImportAttributes(node);
113409
+ case 301 /* ImportAttribute */:
113410
+ return emitImportAttribute(node);
113287
113411
  case 282 /* MissingDeclaration */:
113288
113412
  return;
113289
113413
  case 283 /* ExternalModuleReference */:
@@ -114058,16 +114182,16 @@ ${lanes.join("\n")}
114058
114182
  writeKeyword("import");
114059
114183
  writePunctuation("(");
114060
114184
  emit(node.argument);
114061
- if (node.assertions) {
114185
+ if (node.attributes) {
114062
114186
  writePunctuation(",");
114063
114187
  writeSpace();
114064
114188
  writePunctuation("{");
114065
114189
  writeSpace();
114066
- writeKeyword("assert");
114190
+ writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
114067
114191
  writePunctuation(":");
114068
114192
  writeSpace();
114069
- const elements = node.assertions.assertClause.elements;
114070
- emitList(node.assertions.assertClause, elements, 526226 /* ImportClauseEntries */);
114193
+ const elements = node.attributes.elements;
114194
+ emitList(node.attributes, elements, 526226 /* ImportAttributes */);
114071
114195
  writeSpace();
114072
114196
  writePunctuation("}");
114073
114197
  }
@@ -115056,8 +115180,8 @@ ${lanes.join("\n")}
115056
115180
  writeSpace();
115057
115181
  }
115058
115182
  emitExpression(node.moduleSpecifier);
115059
- if (node.assertClause) {
115060
- emitWithLeadingSpace(node.assertClause);
115183
+ if (node.attributes) {
115184
+ emitWithLeadingSpace(node.attributes);
115061
115185
  }
115062
115186
  writeTrailingSemicolon();
115063
115187
  }
@@ -115126,18 +115250,18 @@ ${lanes.join("\n")}
115126
115250
  writeSpace();
115127
115251
  emitExpression(node.moduleSpecifier);
115128
115252
  }
115129
- if (node.assertClause) {
115130
- emitWithLeadingSpace(node.assertClause);
115253
+ if (node.attributes) {
115254
+ emitWithLeadingSpace(node.attributes);
115131
115255
  }
115132
115256
  writeTrailingSemicolon();
115133
115257
  }
115134
- function emitAssertClause(node) {
115135
- emitTokenWithComment(132 /* AssertKeyword */, node.pos, writeKeyword, node);
115258
+ function emitImportAttributes(node) {
115259
+ emitTokenWithComment(node.token, node.pos, writeKeyword, node);
115136
115260
  writeSpace();
115137
115261
  const elements = node.elements;
115138
- emitList(node, elements, 526226 /* ImportClauseEntries */);
115262
+ emitList(node, elements, 526226 /* ImportAttributes */);
115139
115263
  }
115140
- function emitAssertEntry(node) {
115264
+ function emitImportAttribute(node) {
115141
115265
  emit(node.name);
115142
115266
  writePunctuation(":");
115143
115267
  writeSpace();
@@ -118275,8 +118399,6 @@ ${lanes.join("\n")}
118275
118399
  return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
118276
118400
  }
118277
118401
  function getModeForResolutionAtIndex(file, index) {
118278
- if (file.impliedNodeFormat === void 0)
118279
- return void 0;
118280
118402
  return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
118281
118403
  }
118282
118404
  function isExclusivelyTypeOnlyImportOrExport(decl) {
@@ -118290,42 +118412,48 @@ ${lanes.join("\n")}
118290
118412
  return false;
118291
118413
  }
118292
118414
  function getModeForUsageLocation(file, usage) {
118293
- var _a, _b;
118294
- if (file.impliedNodeFormat === void 0)
118295
- return void 0;
118415
+ var _a;
118296
118416
  if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) {
118297
118417
  const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
118298
118418
  if (isTypeOnly) {
118299
- const override = getResolutionModeOverrideForClause(usage.parent.assertClause);
118419
+ const override = getResolutionModeOverride(usage.parent.attributes);
118300
118420
  if (override) {
118301
118421
  return override;
118302
118422
  }
118303
118423
  }
118304
118424
  }
118305
118425
  if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) {
118306
- const override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) == null ? void 0 : _a.assertClause);
118426
+ const override = getResolutionModeOverride(usage.parent.parent.attributes);
118307
118427
  if (override) {
118308
118428
  return override;
118309
118429
  }
118310
118430
  }
118431
+ if (file.impliedNodeFormat === void 0)
118432
+ return void 0;
118311
118433
  if (file.impliedNodeFormat !== 99 /* ESNext */) {
118312
118434
  return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */;
118313
118435
  }
118314
- const exprParentParent = (_b = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _b.parent;
118436
+ const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent;
118315
118437
  return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */;
118316
118438
  }
118317
- function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) {
118318
- if (!clause)
118439
+ function getResolutionModeOverride(node, grammarErrorOnNode) {
118440
+ if (!node)
118319
118441
  return void 0;
118320
- if (length(clause.elements) !== 1) {
118321
- grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require);
118442
+ if (length(node.elements) !== 1) {
118443
+ grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
118444
+ node,
118445
+ node.token === 118 /* WithKeyword */ ? Diagnostics.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require
118446
+ );
118322
118447
  return void 0;
118323
118448
  }
118324
- const elem = clause.elements[0];
118449
+ const elem = node.elements[0];
118325
118450
  if (!isStringLiteralLike(elem.name))
118326
118451
  return void 0;
118327
118452
  if (elem.name.text !== "resolution-mode") {
118328
- grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions);
118453
+ grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
118454
+ elem.name,
118455
+ node.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_attributes : Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions
118456
+ );
118329
118457
  return void 0;
118330
118458
  }
118331
118459
  if (!isStringLiteralLike(elem.value))
@@ -120048,7 +120176,7 @@ ${lanes.join("\n")}
120048
120176
  /*importClause*/
120049
120177
  void 0,
120050
120178
  externalHelpersModuleReference,
120051
- /*assertClause*/
120179
+ /*attributes*/
120052
120180
  void 0
120053
120181
  );
120054
120182
  addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */);
@@ -120524,14 +120652,6 @@ ${lanes.join("\n")}
120524
120652
  const fileName = toFileNameLowerCase(ref.fileName);
120525
120653
  resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective);
120526
120654
  const mode = ref.resolutionMode || file.impliedNodeFormat;
120527
- if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) {
120528
- (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({
120529
- kind: 2 /* ResolutionDiagnostics */,
120530
- diagnostics: [
120531
- createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext)
120532
- ]
120533
- });
120534
- }
120535
120655
  processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index });
120536
120656
  }
120537
120657
  }
@@ -121927,7 +122047,7 @@ ${lanes.join("\n")}
121927
122047
  Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
121928
122048
  Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,
121929
122049
  Diagnostics.Duplicate_label_0.code,
121930
- Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code,
122050
+ Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
121931
122051
  Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
121932
122052
  Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
121933
122053
  Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
@@ -130458,7 +130578,7 @@ ${lanes.join("\n")}
130458
130578
  void 0,
130459
130579
  defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0,
130460
130580
  typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,
130461
- /*assertClause*/
130581
+ /*attributes*/
130462
130582
  void 0
130463
130583
  );
130464
130584
  }
@@ -136225,7 +136345,7 @@ ${lanes.join("\n")}
136225
136345
  }
136226
136346
  case 205 /* ImportType */:
136227
136347
  const importTypeNode = parent2;
136228
- changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf));
136348
+ changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf));
136229
136349
  break;
136230
136350
  default:
136231
136351
  Debug.failBadSyntaxKind(parent2);
@@ -136509,7 +136629,7 @@ ${lanes.join("\n")}
136509
136629
  elements && elements.length ? factory.createNamedImports(elements) : void 0
136510
136630
  ),
136511
136631
  old.moduleSpecifier,
136512
- /*assertClause*/
136632
+ /*attributes*/
136513
136633
  void 0
136514
136634
  );
136515
136635
  }
@@ -137395,7 +137515,7 @@ ${lanes.join("\n")}
137395
137515
  factory.createNamespaceImport(newNamespaceId)
137396
137516
  ),
137397
137517
  newModuleString,
137398
- /*assertClause*/
137518
+ /*attributes*/
137399
137519
  void 0
137400
137520
  );
137401
137521
  case 271 /* ImportEqualsDeclaration */:
@@ -137684,7 +137804,7 @@ ${lanes.join("\n")}
137684
137804
  void 0,
137685
137805
  factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings),
137686
137806
  getSynthesizedDeepClone(moduleSpecifier),
137687
- /*assertClause*/
137807
+ /*attributes*/
137688
137808
  void 0
137689
137809
  ) : void 0;
137690
137810
  }
@@ -138008,7 +138128,7 @@ ${lanes.join("\n")}
138008
138128
  continue;
138009
138129
  }
138010
138130
  if (length(updatedElements) < length(elements)) {
138011
- changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.assertClause));
138131
+ changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes));
138012
138132
  }
138013
138133
  }
138014
138134
  }
@@ -148490,7 +148610,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148490
148610
  false,
148491
148611
  factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))),
148492
148612
  exportDeclaration.moduleSpecifier,
148493
- /*assertClause*/
148613
+ /*attributes*/
148494
148614
  void 0
148495
148615
  );
148496
148616
  const typeExportDeclaration = factory.createExportDeclaration(
@@ -148500,7 +148620,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148500
148620
  true,
148501
148621
  factory.createNamedExports(typeExportSpecifiers),
148502
148622
  exportDeclaration.moduleSpecifier,
148503
- /*assertClause*/
148623
+ /*attributes*/
148504
148624
  void 0
148505
148625
  );
148506
148626
  changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, {
@@ -148615,7 +148735,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148615
148735
  true
148616
148736
  ),
148617
148737
  getSynthesizedDeepClone(
148618
- declaration.assertClause,
148738
+ declaration.attributes,
148619
148739
  /*includeTrivia*/
148620
148740
  true
148621
148741
  )
@@ -148643,7 +148763,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148643
148763
  true
148644
148764
  ),
148645
148765
  getSynthesizedDeepClone(
148646
- declaration.assertClause,
148766
+ declaration.attributes,
148647
148767
  /*includeTrivia*/
148648
148768
  true
148649
148769
  )
@@ -148666,7 +148786,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148666
148786
  true,
148667
148787
  importClause.name,
148668
148788
  newNamedBindings
148669
- ), declaration.moduleSpecifier, declaration.assertClause);
148789
+ ), declaration.moduleSpecifier, declaration.attributes);
148670
148790
  changes.replaceNode(sourceFile, declaration, importDeclaration);
148671
148791
  }
148672
148792
  }
@@ -150189,7 +150309,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
150189
150309
  factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name))
150190
150310
  ),
150191
150311
  quotedModuleSpecifier,
150192
- /*assertClause*/
150312
+ /*attributes*/
150193
150313
  void 0
150194
150314
  );
150195
150315
  statements = combine(statements, declaration);
@@ -150807,7 +150927,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
150807
150927
  )
150808
150928
  ),
150809
150929
  node.moduleSpecifier,
150810
- node.assertClause
150930
+ node.attributes
150811
150931
  )
150812
150932
  );
150813
150933
  }
@@ -150824,7 +150944,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
150824
150944
  )),
150825
150945
  /*moduleSpecifier*/
150826
150946
  void 0,
150827
- /*assertClause*/
150947
+ /*attributes*/
150828
150948
  void 0
150829
150949
  ));
150830
150950
  }
@@ -155795,7 +155915,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155795
155915
  namedImports
155796
155916
  ),
155797
155917
  required,
155798
- /*assertClause*/
155918
+ /*attributes*/
155799
155919
  void 0
155800
155920
  )
155801
155921
  );
@@ -155964,7 +156084,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155964
156084
  const newTypeNode = factory.updateImportTypeNode(
155965
156085
  importType,
155966
156086
  importType.argument,
155967
- importType.assertions,
156087
+ importType.attributes,
155968
156088
  importType.qualifier,
155969
156089
  importType.typeArguments,
155970
156090
  /*isTypeOf*/
@@ -156232,7 +156352,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156232
156352
  void 0
156233
156353
  ),
156234
156354
  importDeclaration.moduleSpecifier,
156235
- importDeclaration.assertClause
156355
+ importDeclaration.attributes
156236
156356
  )
156237
156357
  );
156238
156358
  changes.insertNodeAfter(
@@ -156249,7 +156369,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156249
156369
  importClause.namedBindings
156250
156370
  ),
156251
156371
  importDeclaration.moduleSpecifier,
156252
- importDeclaration.assertClause
156372
+ importDeclaration.attributes
156253
156373
  )
156254
156374
  );
156255
156375
  }
@@ -165577,7 +165697,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165577
165697
  /*importClause*/
165578
165698
  void 0,
165579
165699
  moduleSpecifier,
165580
- /*assertClause*/
165700
+ /*attributes*/
165581
165701
  void 0
165582
165702
  ));
165583
165703
  } else {
@@ -165743,7 +165863,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165743
165863
  exportDecl.isTypeOnly,
165744
165864
  exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)),
165745
165865
  exportDecl.moduleSpecifier,
165746
- exportDecl.assertClause
165866
+ exportDecl.attributes
165747
165867
  )
165748
165868
  );
165749
165869
  }
@@ -165775,7 +165895,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165775
165895
  factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings),
165776
165896
  // TODO: GH#18217
165777
165897
  importDeclaration.moduleSpecifier,
165778
- importDeclaration.assertClause
165898
+ importDeclaration.attributes
165779
165899
  );
165780
165900
  }
165781
165901
  function sortSpecifiers(specifiers, comparer) {
@@ -166293,10 +166413,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166293
166413
  return spanForParenthesizedExpression(n);
166294
166414
  case 275 /* NamedImports */:
166295
166415
  case 279 /* NamedExports */:
166416
+ case 300 /* ImportAttributes */:
166296
166417
  case 300 /* AssertClause */:
166297
- return spanForNamedImportsOrExportsOrAssertClause(n);
166418
+ return spanForImportExportElements(n);
166298
166419
  }
166299
- function spanForNamedImportsOrExportsOrAssertClause(node) {
166420
+ function spanForImportExportElements(node) {
166300
166421
  if (!node.elements.length) {
166301
166422
  return void 0;
166302
166423
  }
@@ -184915,7 +185036,7 @@ ${e.message}`;
184915
185036
  getRenameLocation: () => getRenameLocation,
184916
185037
  getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
184917
185038
  getResolutionDiagnostic: () => getResolutionDiagnostic,
184918
- getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause,
185039
+ getResolutionModeOverride: () => getResolutionModeOverride,
184919
185040
  getResolveJsonModule: () => getResolveJsonModule,
184920
185041
  getResolvePackageJsonExports: () => getResolvePackageJsonExports,
184921
185042
  getResolvePackageJsonImports: () => getResolvePackageJsonImports,
@@ -185047,6 +185168,7 @@ ${e.message}`;
185047
185168
  hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
185048
185169
  hasQuestionToken: () => hasQuestionToken,
185049
185170
  hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
185171
+ hasResolutionModeOverride: () => hasResolutionModeOverride,
185050
185172
  hasRestParameter: () => hasRestParameter,
185051
185173
  hasScopeMarker: () => hasScopeMarker,
185052
185174
  hasStaticModifier: () => hasStaticModifier,
@@ -185120,7 +185242,6 @@ ${e.message}`;
185120
185242
  isAssertClause: () => isAssertClause,
185121
185243
  isAssertEntry: () => isAssertEntry,
185122
185244
  isAssertionExpression: () => isAssertionExpression,
185123
- isAssertionKey: () => isAssertionKey,
185124
185245
  isAssertsKeyword: () => isAssertsKeyword,
185125
185246
  isAssignmentDeclaration: () => isAssignmentDeclaration,
185126
185247
  isAssignmentExpression: () => isAssignmentExpression,
@@ -185330,6 +185451,9 @@ ${e.message}`;
185330
185451
  isIfStatement: () => isIfStatement,
185331
185452
  isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
185332
185453
  isImplicitGlob: () => isImplicitGlob,
185454
+ isImportAttribute: () => isImportAttribute,
185455
+ isImportAttributeName: () => isImportAttributeName,
185456
+ isImportAttributes: () => isImportAttributes,
185333
185457
  isImportCall: () => isImportCall,
185334
185458
  isImportClause: () => isImportClause,
185335
185459
  isImportDeclaration: () => isImportDeclaration,
@@ -185521,7 +185645,6 @@ ${e.message}`;
185521
185645
  isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
185522
185646
  isNewExpression: () => isNewExpression,
185523
185647
  isNewExpressionTarget: () => isNewExpressionTarget,
185524
- isNightly: () => isNightly,
185525
185648
  isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
185526
185649
  isNode: () => isNode,
185527
185650
  isNodeArray: () => isNodeArray,
@@ -187322,7 +187445,7 @@ ${e.message}`;
187322
187445
  getRenameLocation: () => getRenameLocation,
187323
187446
  getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
187324
187447
  getResolutionDiagnostic: () => getResolutionDiagnostic,
187325
- getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause,
187448
+ getResolutionModeOverride: () => getResolutionModeOverride,
187326
187449
  getResolveJsonModule: () => getResolveJsonModule,
187327
187450
  getResolvePackageJsonExports: () => getResolvePackageJsonExports,
187328
187451
  getResolvePackageJsonImports: () => getResolvePackageJsonImports,
@@ -187454,6 +187577,7 @@ ${e.message}`;
187454
187577
  hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
187455
187578
  hasQuestionToken: () => hasQuestionToken,
187456
187579
  hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
187580
+ hasResolutionModeOverride: () => hasResolutionModeOverride,
187457
187581
  hasRestParameter: () => hasRestParameter,
187458
187582
  hasScopeMarker: () => hasScopeMarker,
187459
187583
  hasStaticModifier: () => hasStaticModifier,
@@ -187527,7 +187651,6 @@ ${e.message}`;
187527
187651
  isAssertClause: () => isAssertClause,
187528
187652
  isAssertEntry: () => isAssertEntry,
187529
187653
  isAssertionExpression: () => isAssertionExpression,
187530
- isAssertionKey: () => isAssertionKey,
187531
187654
  isAssertsKeyword: () => isAssertsKeyword,
187532
187655
  isAssignmentDeclaration: () => isAssignmentDeclaration,
187533
187656
  isAssignmentExpression: () => isAssignmentExpression,
@@ -187737,6 +187860,9 @@ ${e.message}`;
187737
187860
  isIfStatement: () => isIfStatement,
187738
187861
  isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
187739
187862
  isImplicitGlob: () => isImplicitGlob,
187863
+ isImportAttribute: () => isImportAttribute,
187864
+ isImportAttributeName: () => isImportAttributeName,
187865
+ isImportAttributes: () => isImportAttributes,
187740
187866
  isImportCall: () => isImportCall,
187741
187867
  isImportClause: () => isImportClause,
187742
187868
  isImportDeclaration: () => isImportDeclaration,
@@ -187928,7 +188054,6 @@ ${e.message}`;
187928
188054
  isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
187929
188055
  isNewExpression: () => isNewExpression,
187930
188056
  isNewExpressionTarget: () => isNewExpressionTarget,
187931
- isNightly: () => isNightly,
187932
188057
  isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
187933
188058
  isNode: () => isNode,
187934
188059
  isNodeArray: () => isNodeArray,