typescript 4.7.0-dev.20220501 → 4.7.0-dev.20220504

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.7";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220501";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220504";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -3405,7 +3405,7 @@ var ts;
3405
3405
  (function (ModuleResolutionKind) {
3406
3406
  ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
3407
3407
  ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs";
3408
- ModuleResolutionKind[ModuleResolutionKind["Node12"] = 3] = "Node12";
3408
+ ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16";
3409
3409
  ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
3410
3410
  })(ModuleResolutionKind = ts.ModuleResolutionKind || (ts.ModuleResolutionKind = {}));
3411
3411
  var ModuleDetectionKind;
@@ -3448,7 +3448,7 @@ var ts;
3448
3448
  ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
3449
3449
  ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022";
3450
3450
  ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
3451
- ModuleKind[ModuleKind["Node12"] = 100] = "Node12";
3451
+ ModuleKind[ModuleKind["Node16"] = 100] = "Node16";
3452
3452
  ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
3453
3453
  })(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
3454
3454
  ts.commentPragmas = {
@@ -5442,6 +5442,7 @@ var ts;
5442
5442
  _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, ts.DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),
5443
5443
  with_statements_are_not_allowed_in_an_async_function_block: diag(1300, ts.DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
5444
5444
  await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
5445
+ The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, ts.DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
5445
5446
  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: diag(1312, ts.DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),
5446
5447
  The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, ts.DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."),
5447
5448
  Global_module_exports_may_only_appear_in_module_files: diag(1314, ts.DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."),
@@ -5453,8 +5454,8 @@ var ts;
5453
5454
  Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),
5454
5455
  Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
5455
5456
  Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
5456
- Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'."),
5457
- Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'."),
5457
+ Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),
5458
+ Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),
5458
5459
  Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
5459
5460
  This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),
5460
5461
  String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
@@ -5471,7 +5472,7 @@ var ts;
5471
5472
  Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
5472
5473
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
5473
5474
  Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
5474
- The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'."),
5475
+ The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),
5475
5476
  A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
5476
5477
  An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
5477
5478
  This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
@@ -5502,7 +5503,7 @@ var ts;
5502
5503
  await_expressions_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(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions 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."),
5503
5504
  _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
5504
5505
  _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
5505
- Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
5506
+ Top_level_await_expressions_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(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions 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."),
5506
5507
  An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
5507
5508
  An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
5508
5509
  Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
@@ -5554,7 +5555,7 @@ var ts;
5554
5555
  File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
5555
5556
  The_file_is_in_the_program_because_Colon: diag(1430, ts.DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
5556
5557
  for_await_loops_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(1431, ts.DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops 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."),
5557
- Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
5558
+ Top_level_for_await_loops_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(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops 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."),
5558
5559
  Decorators_may_not_be_applied_to_this_parameters: diag(1433, ts.DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."),
5559
5560
  Unexpected_keyword_or_identifier: diag(1434, ts.DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
5560
5561
  Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, ts.DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
@@ -5572,7 +5573,7 @@ var ts;
5572
5573
  Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.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."),
5573
5574
  Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, ts.DiagnosticCategory.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"),
5574
5575
  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, ts.DiagnosticCategory.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"),
5575
- Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`."),
5576
+ Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node16` or `nodenext`."),
5576
5577
  resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
5577
5578
  resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
5578
5579
  resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
@@ -5583,7 +5584,7 @@ var ts;
5583
5584
  An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, ts.DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."),
5584
5585
  An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
5585
5586
  Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, ts.DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."),
5586
- auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node12_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node12+) as modules."),
5587
+ auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, ts.DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."),
5587
5588
  The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
5588
5589
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
5589
5590
  Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
@@ -5592,7 +5593,6 @@ var ts;
5592
5593
  Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, ts.DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
5593
5594
  The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),
5594
5595
  The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),
5595
- This_type_parameter_probably_needs_an_extends_object_constraint: diag(2208, ts.DiagnosticCategory.Error, "This_type_parameter_probably_needs_an_extends_object_constraint_2208", "This type parameter probably needs an `extends object` constraint."),
5596
5596
  Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
5597
5597
  Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, ts.DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
5598
5598
  Static_members_cannot_reference_class_type_parameters: diag(2302, ts.DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."),
@@ -6070,8 +6070,8 @@ var ts;
6070
6070
  Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, ts.DiagnosticCategory.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'."),
6071
6071
  Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
6072
6072
  Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
6073
- Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.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 'node12' or 'nodenext'. Consider adding an extension to the import path."),
6074
- Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.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 'node12' or 'nodenext'. Did you mean '{0}'?"),
6073
+ 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, ts.DiagnosticCategory.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."),
6074
+ Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.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}'?"),
6075
6075
  Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.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."),
6076
6076
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
6077
6077
  All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
@@ -6737,7 +6737,6 @@ var ts;
6737
6737
  This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
6738
6738
  This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
6739
6739
  A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
6740
- JSON_imports_are_experimental_in_ES_module_mode_imports: diag(7062, ts.DiagnosticCategory.Error, "JSON_imports_are_experimental_in_ES_module_mode_imports_7062", "JSON imports are experimental in ES module mode imports."),
6741
6740
  You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
6742
6741
  You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
6743
6742
  import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
@@ -11335,7 +11334,7 @@ var ts;
11335
11334
  }
11336
11335
  ts.getNonAugmentationDeclaration = getNonAugmentationDeclaration;
11337
11336
  function isCommonJSContainingModuleKind(kind) {
11338
- return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node12 || kind === ts.ModuleKind.NodeNext;
11337
+ return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node16 || kind === ts.ModuleKind.NodeNext;
11339
11338
  }
11340
11339
  function isEffectiveExternalModule(node, compilerOptions) {
11341
11340
  return ts.isExternalModule(node) || compilerOptions.isolatedModules || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator);
@@ -15848,7 +15847,7 @@ var ts;
15848
15847
  checks.push(isFileModuleFromUsingJSXTag);
15849
15848
  }
15850
15849
  var moduleKind = getEmitModuleKind(options);
15851
- if (moduleKind === ts.ModuleKind.Node12 || moduleKind === ts.ModuleKind.NodeNext) {
15850
+ if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
15852
15851
  checks.push(isFileForcedToBeModuleByFormat);
15853
15852
  }
15854
15853
  var combined_1 = ts.or.apply(void 0, checks);
@@ -15859,7 +15858,7 @@ var ts;
15859
15858
  ts.getSetExternalModuleIndicator = getSetExternalModuleIndicator;
15860
15859
  function getEmitScriptTarget(compilerOptions) {
15861
15860
  return compilerOptions.target ||
15862
- (compilerOptions.module === ts.ModuleKind.Node12 && 7) ||
15861
+ (compilerOptions.module === ts.ModuleKind.Node16 && 9) ||
15863
15862
  (compilerOptions.module === ts.ModuleKind.NodeNext && 99) ||
15864
15863
  0;
15865
15864
  }
@@ -15877,8 +15876,8 @@ var ts;
15877
15876
  case ts.ModuleKind.CommonJS:
15878
15877
  moduleResolution = ts.ModuleResolutionKind.NodeJs;
15879
15878
  break;
15880
- case ts.ModuleKind.Node12:
15881
- moduleResolution = ts.ModuleResolutionKind.Node12;
15879
+ case ts.ModuleKind.Node16:
15880
+ moduleResolution = ts.ModuleResolutionKind.Node16;
15882
15881
  break;
15883
15882
  case ts.ModuleKind.NodeNext:
15884
15883
  moduleResolution = ts.ModuleResolutionKind.NodeNext;
@@ -15903,7 +15902,7 @@ var ts;
15903
15902
  case ts.ModuleKind.ES2020:
15904
15903
  case ts.ModuleKind.ES2022:
15905
15904
  case ts.ModuleKind.ESNext:
15906
- case ts.ModuleKind.Node12:
15905
+ case ts.ModuleKind.Node16:
15907
15906
  case ts.ModuleKind.NodeNext:
15908
15907
  return true;
15909
15908
  default:
@@ -15928,7 +15927,7 @@ var ts;
15928
15927
  return compilerOptions.esModuleInterop;
15929
15928
  }
15930
15929
  switch (getEmitModuleKind(compilerOptions)) {
15931
- case ts.ModuleKind.Node12:
15930
+ case ts.ModuleKind.Node16:
15932
15931
  case ts.ModuleKind.NodeNext:
15933
15932
  return true;
15934
15933
  }
@@ -31787,7 +31786,7 @@ var ts;
31787
31786
  es2020: ts.ModuleKind.ES2020,
31788
31787
  es2022: ts.ModuleKind.ES2022,
31789
31788
  esnext: ts.ModuleKind.ESNext,
31790
- node12: ts.ModuleKind.Node12,
31789
+ node16: ts.ModuleKind.Node16,
31791
31790
  nodenext: ts.ModuleKind.NodeNext,
31792
31791
  })),
31793
31792
  affectsModuleResolution: true,
@@ -32136,7 +32135,7 @@ var ts;
32136
32135
  type: new ts.Map(ts.getEntries({
32137
32136
  node: ts.ModuleResolutionKind.NodeJs,
32138
32137
  classic: ts.ModuleResolutionKind.Classic,
32139
- node12: ts.ModuleResolutionKind.Node12,
32138
+ node16: ts.ModuleResolutionKind.Node16,
32140
32139
  nodenext: ts.ModuleResolutionKind.NodeNext,
32141
32140
  })),
32142
32141
  affectsModuleResolution: true,
@@ -32599,7 +32598,7 @@ var ts;
32599
32598
  affectsModuleResolution: true,
32600
32599
  description: ts.Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
32601
32600
  category: ts.Diagnostics.Language_and_Environment,
32602
- defaultValueDescription: ts.Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node12_as_modules,
32601
+ defaultValueDescription: ts.Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules,
32603
32602
  }
32604
32603
  ];
32605
32604
  ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
@@ -34545,7 +34544,7 @@ var ts;
34545
34544
  }
34546
34545
  var failedLookupLocations = [];
34547
34546
  var features = getDefaultNodeResolutionFeatures(options);
34548
- if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext)) {
34547
+ if (resolutionMode === ts.ModuleKind.ESNext && (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext)) {
34549
34548
  features |= NodeResolutionFeatures.EsmMode;
34550
34549
  }
34551
34550
  var conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : [];
@@ -34632,7 +34631,7 @@ var ts;
34632
34631
  }
34633
34632
  ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective;
34634
34633
  function getDefaultNodeResolutionFeatures(options) {
34635
- return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
34634
+ return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 ? NodeResolutionFeatures.Node16Default :
34636
34635
  ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
34637
34636
  NodeResolutionFeatures.None;
34638
34637
  }
@@ -34945,8 +34944,8 @@ var ts;
34945
34944
  case ts.ModuleKind.CommonJS:
34946
34945
  moduleResolution = ts.ModuleResolutionKind.NodeJs;
34947
34946
  break;
34948
- case ts.ModuleKind.Node12:
34949
- moduleResolution = ts.ModuleResolutionKind.Node12;
34947
+ case ts.ModuleKind.Node16:
34948
+ moduleResolution = ts.ModuleResolutionKind.Node16;
34950
34949
  break;
34951
34950
  case ts.ModuleKind.NodeNext:
34952
34951
  moduleResolution = ts.ModuleResolutionKind.NodeNext;
@@ -34966,8 +34965,8 @@ var ts;
34966
34965
  }
34967
34966
  ts.perfLogger.logStartResolveModule(moduleName);
34968
34967
  switch (moduleResolution) {
34969
- case ts.ModuleResolutionKind.Node12:
34970
- result = node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
34968
+ case ts.ModuleResolutionKind.Node16:
34969
+ result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
34971
34970
  break;
34972
34971
  case ts.ModuleResolutionKind.NodeNext:
34973
34972
  result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
@@ -35125,12 +35124,12 @@ var ts;
35125
35124
  NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
35126
35125
  NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
35127
35126
  NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
35128
- NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
35127
+ NodeResolutionFeatures[NodeResolutionFeatures["Node16Default"] = 30] = "Node16Default";
35129
35128
  NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
35130
35129
  NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
35131
35130
  })(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
35132
- function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
35133
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
35131
+ function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
35132
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node16Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
35134
35133
  }
35135
35134
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
35136
35135
  return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
@@ -41701,16 +41700,13 @@ var ts;
41701
41700
  if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
41702
41701
  errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
41703
41702
  }
41704
- if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
41703
+ if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
41705
41704
  var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
41706
41705
  var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
41707
41706
  var overrideClause = overrideClauseHost && ts.isImportTypeNode(overrideClauseHost) ? (_g = overrideClauseHost.assertions) === null || _g === void 0 ? void 0 : _g.assertClause : overrideClauseHost === null || overrideClauseHost === void 0 ? void 0 : overrideClauseHost.assertClause;
41708
41707
  if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
41709
41708
  error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
41710
41709
  }
41711
- if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
41712
- error(errorNode, ts.Diagnostics.JSON_imports_are_experimental_in_ES_module_mode_imports);
41713
- }
41714
41710
  }
41715
41711
  return getMergedSymbol(sourceFile.symbol);
41716
41712
  }
@@ -41754,7 +41750,7 @@ var ts;
41754
41750
  var tsExtension = ts.tryExtractTSExtension(moduleReference);
41755
41751
  var isExtensionlessRelativePathImport = ts.pathIsRelative(moduleReference) && !ts.hasExtension(moduleReference);
41756
41752
  var moduleResolutionKind = ts.getEmitModuleResolutionKind(compilerOptions);
41757
- var resolutionIsNode12OrNext = moduleResolutionKind === ts.ModuleResolutionKind.Node12 ||
41753
+ var resolutionIsNode16OrNext = moduleResolutionKind === ts.ModuleResolutionKind.Node16 ||
41758
41754
  moduleResolutionKind === ts.ModuleResolutionKind.NodeNext;
41759
41755
  if (tsExtension) {
41760
41756
  var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead;
@@ -41771,17 +41767,17 @@ var ts;
41771
41767
  ts.hasJsonModuleEmitEnabled(compilerOptions)) {
41772
41768
  error(errorNode, ts.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
41773
41769
  }
41774
- else if (mode === ts.ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) {
41770
+ else if (mode === ts.ModuleKind.ESNext && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
41775
41771
  var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
41776
41772
  var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
41777
41773
  var actualExt = _a[0], _importExt = _a[1];
41778
41774
  return host.fileExists(absoluteRef_1 + actualExt);
41779
41775
  })) === null || _h === void 0 ? void 0 : _h[1];
41780
41776
  if (suggestedExt) {
41781
- error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
41777
+ error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
41782
41778
  }
41783
41779
  else {
41784
- error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path);
41780
+ error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);
41785
41781
  }
41786
41782
  }
41787
41783
  else {
@@ -43878,7 +43874,7 @@ var ts;
43878
43874
  var targetFile = ts.getSourceFileOfModule(chain[0]);
43879
43875
  var specifier = void 0;
43880
43876
  var assertion = void 0;
43881
- if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
43877
+ if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
43882
43878
  if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
43883
43879
  specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
43884
43880
  assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
@@ -43891,7 +43887,7 @@ var ts;
43891
43887
  }
43892
43888
  if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
43893
43889
  var oldSpecifier = specifier;
43894
- if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
43890
+ if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
43895
43891
  var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
43896
43892
  specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
43897
43893
  if (specifier.indexOf("/node_modules/") >= 0) {
@@ -53869,7 +53865,6 @@ var ts;
53869
53865
  return 0;
53870
53866
  }
53871
53867
  function reportErrorResults(originalSource, originalTarget, source, target, headMessage) {
53872
- var _a, _b;
53873
53868
  var sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
53874
53869
  var targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
53875
53870
  source = (originalSource.aliasSymbol || sourceHasBase) ? originalSource : source;
@@ -53908,9 +53903,6 @@ var ts;
53908
53903
  return;
53909
53904
  }
53910
53905
  reportRelationError(headMessage, source, target);
53911
- if (strictNullChecks && source.flags & 8650752 && ((_b = (_a = source.symbol) === null || _a === void 0 ? void 0 : _a.declarations) === null || _b === void 0 ? void 0 : _b[0]) && !getConstraintOfType(source) && isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864))) {
53912
- associateRelatedInfo(ts.createDiagnosticForNode(source.symbol.declarations[0], ts.Diagnostics.This_type_parameter_probably_needs_an_extends_object_constraint));
53913
- }
53914
53906
  }
53915
53907
  function traceUnionsOrIntersectionsTooLarge(source, target) {
53916
53908
  if (!ts.tracing) {
@@ -54540,17 +54532,17 @@ var ts;
54540
54532
  if (sourceFlags & 8650752) {
54541
54533
  if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
54542
54534
  var constraint = getConstraintOfType(source);
54543
- if (!strictNullChecks && (!constraint || (sourceFlags & 262144 && constraint.flags & 1))) {
54535
+ if (!constraint || (sourceFlags & 262144 && constraint.flags & 1)) {
54544
54536
  if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
54545
54537
  resetErrorInfo(saveErrorInfo);
54546
54538
  return result;
54547
54539
  }
54548
54540
  }
54549
- else if (constraint && (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState))) {
54541
+ else if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
54550
54542
  resetErrorInfo(saveErrorInfo);
54551
54543
  return result;
54552
54544
  }
54553
- else if (constraint && (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(targetFlags & sourceFlags & 262144), undefined, intersectionState))) {
54545
+ else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(targetFlags & sourceFlags & 262144), undefined, intersectionState)) {
54554
54546
  resetErrorInfo(saveErrorInfo);
54555
54547
  return result;
54556
54548
  }
@@ -59445,7 +59437,7 @@ var ts;
59445
59437
  if (ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
59446
59438
  var parent = declaration.parent.parent;
59447
59439
  if (parent.kind === 254 && ts.getCombinedNodeFlags(declaration) & 2 || parent.kind === 164) {
59448
- var links = getNodeLinks(location);
59440
+ var links = getNodeLinks(parent);
59449
59441
  if (!(links.flags & 268435456)) {
59450
59442
  links.flags |= 268435456;
59451
59443
  var parentType = getTypeForBindingElementParent(parent, 0);
@@ -64414,13 +64406,13 @@ var ts;
64414
64406
  }
64415
64407
  }
64416
64408
  function checkImportMetaProperty(node) {
64417
- if (moduleKind === ts.ModuleKind.Node12 || moduleKind === ts.ModuleKind.NodeNext) {
64409
+ if (moduleKind === ts.ModuleKind.Node16 || moduleKind === ts.ModuleKind.NodeNext) {
64418
64410
  if (ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.ESNext) {
64419
64411
  error(node, ts.Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);
64420
64412
  }
64421
64413
  }
64422
64414
  else if (moduleKind < ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.System) {
64423
- error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext);
64415
+ error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);
64424
64416
  }
64425
64417
  var file = ts.getSourceFileOfNode(node);
64426
64418
  ts.Debug.assert(!!(file.flags & 4194304), "Containing file is missing import meta node flag.");
@@ -65252,15 +65244,28 @@ var ts;
65252
65244
  if (!hasParseDiagnostics(sourceFile)) {
65253
65245
  var span = void 0;
65254
65246
  if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
65255
- if (!span)
65256
- span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
65247
+ span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
65257
65248
  var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expressions_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);
65258
65249
  diagnostics.add(diagnostic);
65259
65250
  }
65260
- if ((moduleKind !== ts.ModuleKind.ES2022 && moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System && !(moduleKind === ts.ModuleKind.NodeNext && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.ESNext)) || languageVersion < 4) {
65261
- span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
65262
- var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher);
65263
- diagnostics.add(diagnostic);
65251
+ switch (moduleKind) {
65252
+ case ts.ModuleKind.Node16:
65253
+ case ts.ModuleKind.NodeNext:
65254
+ if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
65255
+ span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
65256
+ diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
65257
+ break;
65258
+ }
65259
+ case ts.ModuleKind.ES2022:
65260
+ case ts.ModuleKind.ESNext:
65261
+ case ts.ModuleKind.System:
65262
+ if (languageVersion >= 4) {
65263
+ break;
65264
+ }
65265
+ default:
65266
+ span !== null && span !== void 0 ? span : (span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos));
65267
+ diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_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));
65268
+ break;
65264
65269
  }
65265
65270
  }
65266
65271
  }
@@ -67461,8 +67466,8 @@ var ts;
67461
67466
  if (node.assertions) {
67462
67467
  var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
67463
67468
  if (override) {
67464
- if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
67465
- grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
67469
+ if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
67470
+ grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
67466
67471
  }
67467
67472
  }
67468
67473
  }
@@ -68631,7 +68636,7 @@ var ts;
68631
68636
  });
68632
68637
  }
68633
68638
  function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
68634
- if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.Node12 && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
68639
+ if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.Node16 && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
68635
68640
  return;
68636
68641
  }
68637
68642
  if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
@@ -71081,8 +71086,8 @@ var ts;
71081
71086
  var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
71082
71087
  var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
71083
71088
  if (validForTypeAssertions && override) {
71084
- if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
71085
- return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
71089
+ if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
71090
+ return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
71086
71091
  }
71087
71092
  return;
71088
71093
  }
@@ -73974,8 +73979,22 @@ var ts;
73974
73979
  if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
73975
73980
  diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.for_await_loops_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));
73976
73981
  }
73977
- if ((moduleKind !== ts.ModuleKind.ES2022 && moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System && !(moduleKind === ts.ModuleKind.NodeNext && ts.getSourceFileOfNode(forInOrOfStatement).impliedNodeFormat === ts.ModuleKind.ESNext)) || languageVersion < 4) {
73978
- diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher));
73982
+ switch (moduleKind) {
73983
+ case ts.ModuleKind.Node16:
73984
+ case ts.ModuleKind.NodeNext:
73985
+ if (sourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS) {
73986
+ diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));
73987
+ break;
73988
+ }
73989
+ case ts.ModuleKind.ES2022:
73990
+ case ts.ModuleKind.ESNext:
73991
+ case ts.ModuleKind.System:
73992
+ if (languageVersion >= 4) {
73993
+ break;
73994
+ }
73995
+ default:
73996
+ diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_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));
73997
+ break;
73979
73998
  }
73980
73999
  }
73981
74000
  }
@@ -74607,7 +74626,7 @@ var ts;
74607
74626
  }
74608
74627
  function checkGrammarImportCallExpression(node) {
74609
74628
  if (moduleKind === ts.ModuleKind.ES2015) {
74610
- return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext);
74629
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);
74611
74630
  }
74612
74631
  if (node.typeArguments) {
74613
74632
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
@@ -74617,7 +74636,7 @@ var ts;
74617
74636
  checkGrammarForDisallowedTrailingComma(nodeArguments);
74618
74637
  if (nodeArguments.length > 1) {
74619
74638
  var assertionArgument = nodeArguments[1];
74620
- return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext);
74639
+ return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
74621
74640
  }
74622
74641
  }
74623
74642
  if (nodeArguments.length === 0 || nodeArguments.length > 2) {
@@ -89391,7 +89410,7 @@ var ts;
89391
89410
  return ts.transformECMAScriptModule;
89392
89411
  case ts.ModuleKind.System:
89393
89412
  return ts.transformSystemModule;
89394
- case ts.ModuleKind.Node12:
89413
+ case ts.ModuleKind.Node16:
89395
89414
  case ts.ModuleKind.NodeNext:
89396
89415
  return ts.transformNodeModule;
89397
89416
  default:
@@ -95714,7 +95733,7 @@ var ts;
95714
95733
  ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics;
95715
95734
  function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {
95716
95735
  switch (ts.getEmitModuleResolutionKind(options)) {
95717
- case ts.ModuleResolutionKind.Node12:
95736
+ case ts.ModuleResolutionKind.Node16:
95718
95737
  case ts.ModuleResolutionKind.NodeNext:
95719
95738
  return ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".mjs"]) ? ts.ModuleKind.ESNext :
95720
95739
  ts.fileExtensionIsOneOf(fileName, [".d.cts", ".cts", ".cjs"]) ? ts.ModuleKind.CommonJS :
@@ -97403,8 +97422,8 @@ var ts;
97403
97422
  var fileName = ts.toFileNameLowerCase(ref.fileName);
97404
97423
  ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
97405
97424
  var mode = ref.resolutionMode || file.impliedNodeFormat;
97406
- if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
97407
- programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext));
97425
+ if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
97426
+ programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
97408
97427
  }
97409
97428
  processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: ts.FileIncludeKind.TypeReferenceDirective, file: file.path, index: index, });
97410
97429
  }
@@ -97737,7 +97756,7 @@ var ts;
97737
97756
  }
97738
97757
  if (options.resolveJsonModule) {
97739
97758
  if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs &&
97740
- ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node12 &&
97759
+ ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 &&
97741
97760
  ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
97742
97761
  createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
97743
97762
  }
@@ -100410,7 +100429,7 @@ var ts;
100410
100429
  }
100411
100430
  function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
100412
100431
  var _a;
100413
- if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12
100432
+ if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16
100414
100433
  && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
100415
100434
  return false;
100416
100435
  }
@@ -100906,7 +100925,7 @@ var ts;
100906
100925
  var cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host)) === null || _b === void 0 ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
100907
100926
  if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
100908
100927
  var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
100909
- if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
100928
+ if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node16 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
100910
100929
  var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
100911
100930
  var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
100912
100931
  ? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)