typescript 5.3.0-dev.20230926 → 5.3.0-dev.20230927
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/lib.es5.d.ts +9 -1
- package/lib/tsc.js +319 -259
- package/lib/tsserver.js +363 -289
- package/lib/typescript.d.ts +51 -29
- package/lib/typescript.js +358 -286
- package/lib/typingsInstaller.js +165 -109
- package/package.json +2 -2
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-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.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["
|
|
3806
|
-
SyntaxKind5[SyntaxKind5["
|
|
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["
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -18887,6 +18892,12 @@ ${lanes.join("\n")}
|
|
|
18887
18892
|
function isExpandoPropertyDeclaration(declaration) {
|
|
18888
18893
|
return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
|
|
18889
18894
|
}
|
|
18895
|
+
function hasResolutionModeOverride(node) {
|
|
18896
|
+
if (node === void 0) {
|
|
18897
|
+
return false;
|
|
18898
|
+
}
|
|
18899
|
+
return !!getResolutionModeOverride(node.attributes);
|
|
18900
|
+
}
|
|
18890
18901
|
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
18902
|
var init_utilities = __esm({
|
|
18892
18903
|
"src/compiler/utilities.ts"() {
|
|
@@ -20356,6 +20367,10 @@ ${lanes.join("\n")}
|
|
|
20356
20367
|
updateAssertEntry,
|
|
20357
20368
|
createImportTypeAssertionContainer,
|
|
20358
20369
|
updateImportTypeAssertionContainer,
|
|
20370
|
+
createImportAttributes,
|
|
20371
|
+
updateImportAttributes,
|
|
20372
|
+
createImportAttribute,
|
|
20373
|
+
updateImportAttribute,
|
|
20359
20374
|
createNamespaceImport,
|
|
20360
20375
|
updateNamespaceImport,
|
|
20361
20376
|
createNamespaceExport,
|
|
@@ -21624,18 +21639,21 @@ ${lanes.join("\n")}
|
|
|
21624
21639
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
21625
21640
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
21626
21641
|
}
|
|
21627
|
-
function createImportTypeNode(argument,
|
|
21642
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
21628
21643
|
const node = createBaseNode(205 /* ImportType */);
|
|
21629
21644
|
node.argument = argument;
|
|
21630
|
-
node.
|
|
21645
|
+
node.attributes = attributes;
|
|
21646
|
+
if (node.assertions && node.assertions.assertClause && node.attributes) {
|
|
21647
|
+
node.assertions.assertClause = node.attributes;
|
|
21648
|
+
}
|
|
21631
21649
|
node.qualifier = qualifier;
|
|
21632
21650
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
21633
21651
|
node.isTypeOf = isTypeOf;
|
|
21634
21652
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
21635
21653
|
return node;
|
|
21636
21654
|
}
|
|
21637
|
-
function updateImportTypeNode(node, argument,
|
|
21638
|
-
return node.argument !== argument || node.
|
|
21655
|
+
function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
|
|
21656
|
+
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
21657
|
}
|
|
21640
21658
|
function createParenthesizedType(type) {
|
|
21641
21659
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -22765,19 +22783,19 @@ ${lanes.join("\n")}
|
|
|
22765
22783
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
22766
22784
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
22767
22785
|
}
|
|
22768
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
22786
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
22769
22787
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
22770
22788
|
node.modifiers = asNodeArray(modifiers);
|
|
22771
22789
|
node.importClause = importClause;
|
|
22772
22790
|
node.moduleSpecifier = moduleSpecifier;
|
|
22773
|
-
node.assertClause =
|
|
22791
|
+
node.attributes = node.assertClause = attributes;
|
|
22774
22792
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
22775
22793
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22776
22794
|
node.jsDoc = void 0;
|
|
22777
22795
|
return node;
|
|
22778
22796
|
}
|
|
22779
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
22780
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
22797
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
|
|
22798
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
|
|
22781
22799
|
}
|
|
22782
22800
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
22783
22801
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -22798,6 +22816,7 @@ ${lanes.join("\n")}
|
|
|
22798
22816
|
const node = createBaseNode(300 /* AssertClause */);
|
|
22799
22817
|
node.elements = createNodeArray(elements);
|
|
22800
22818
|
node.multiLine = multiLine;
|
|
22819
|
+
node.token = 132 /* AssertKeyword */;
|
|
22801
22820
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
22802
22821
|
return node;
|
|
22803
22822
|
}
|
|
@@ -22823,6 +22842,27 @@ ${lanes.join("\n")}
|
|
|
22823
22842
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
22824
22843
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
22825
22844
|
}
|
|
22845
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
22846
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
22847
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
22848
|
+
node.elements = createNodeArray(elements);
|
|
22849
|
+
node.multiLine = multiLine;
|
|
22850
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
22851
|
+
return node;
|
|
22852
|
+
}
|
|
22853
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
22854
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
22855
|
+
}
|
|
22856
|
+
function createImportAttribute(name, value) {
|
|
22857
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
22858
|
+
node.name = name;
|
|
22859
|
+
node.value = value;
|
|
22860
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
22861
|
+
return node;
|
|
22862
|
+
}
|
|
22863
|
+
function updateImportAttribute(node, name, value) {
|
|
22864
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
22865
|
+
}
|
|
22826
22866
|
function createNamespaceImport(name) {
|
|
22827
22867
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
22828
22868
|
node.name = name;
|
|
@@ -22883,20 +22923,20 @@ ${lanes.join("\n")}
|
|
|
22883
22923
|
function updateExportAssignment(node, modifiers, expression) {
|
|
22884
22924
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node;
|
|
22885
22925
|
}
|
|
22886
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
22926
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
22887
22927
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
22888
22928
|
node.modifiers = asNodeArray(modifiers);
|
|
22889
22929
|
node.isTypeOnly = isTypeOnly;
|
|
22890
22930
|
node.exportClause = exportClause;
|
|
22891
22931
|
node.moduleSpecifier = moduleSpecifier;
|
|
22892
|
-
node.assertClause =
|
|
22932
|
+
node.attributes = node.assertClause = attributes;
|
|
22893
22933
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
22894
22934
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22895
22935
|
node.jsDoc = void 0;
|
|
22896
22936
|
return node;
|
|
22897
22937
|
}
|
|
22898
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
22899
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
22938
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
22939
|
+
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
22940
|
}
|
|
22901
22941
|
function finishUpdateExportDeclaration(updated, original) {
|
|
22902
22942
|
if (updated !== original) {
|
|
@@ -24223,7 +24263,7 @@ ${lanes.join("\n")}
|
|
|
24223
24263
|
} else {
|
|
24224
24264
|
modifierArray = modifiers;
|
|
24225
24265
|
}
|
|
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.
|
|
24266
|
+
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
24267
|
}
|
|
24228
24268
|
function updateModifierLike(node, modifierArray) {
|
|
24229
24269
|
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 +26639,12 @@ ${lanes.join("\n")}
|
|
|
26599
26639
|
function isAssertEntry(node) {
|
|
26600
26640
|
return node.kind === 301 /* AssertEntry */;
|
|
26601
26641
|
}
|
|
26642
|
+
function isImportAttributes(node) {
|
|
26643
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
26644
|
+
}
|
|
26645
|
+
function isImportAttribute(node) {
|
|
26646
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
26647
|
+
}
|
|
26602
26648
|
function isNamespaceImport(node) {
|
|
26603
26649
|
return node.kind === 274 /* NamespaceImport */;
|
|
26604
26650
|
}
|
|
@@ -27326,7 +27372,7 @@ ${lanes.join("\n")}
|
|
|
27326
27372
|
namedBindings
|
|
27327
27373
|
),
|
|
27328
27374
|
nodeFactory.createStringLiteral(externalHelpersModuleNameText),
|
|
27329
|
-
/*
|
|
27375
|
+
/*attributes*/
|
|
27330
27376
|
void 0
|
|
27331
27377
|
);
|
|
27332
27378
|
addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */);
|
|
@@ -28503,7 +28549,7 @@ ${lanes.join("\n")}
|
|
|
28503
28549
|
return visitNode2(cbNode, node.typeParameter);
|
|
28504
28550
|
},
|
|
28505
28551
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
28506
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
28552
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
28507
28553
|
},
|
|
28508
28554
|
[302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {
|
|
28509
28555
|
return visitNode2(cbNode, node.assertClause);
|
|
@@ -28677,15 +28723,15 @@ ${lanes.join("\n")}
|
|
|
28677
28723
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
28678
28724
|
},
|
|
28679
28725
|
[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.
|
|
28726
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
28681
28727
|
},
|
|
28682
28728
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
28683
28729
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
28684
28730
|
},
|
|
28685
|
-
[300 /*
|
|
28731
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
28686
28732
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
28687
28733
|
},
|
|
28688
|
-
[301 /*
|
|
28734
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
28689
28735
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
28690
28736
|
},
|
|
28691
28737
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -28700,7 +28746,7 @@ ${lanes.join("\n")}
|
|
|
28700
28746
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
28701
28747
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
28702
28748
|
[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.
|
|
28749
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
28704
28750
|
},
|
|
28705
28751
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
28706
28752
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -29794,7 +29840,7 @@ ${lanes.join("\n")}
|
|
|
29794
29840
|
function isLiteralPropertyName() {
|
|
29795
29841
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
29796
29842
|
}
|
|
29797
|
-
function
|
|
29843
|
+
function isImportAttributeName2() {
|
|
29798
29844
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
29799
29845
|
}
|
|
29800
29846
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -29913,8 +29959,8 @@ ${lanes.join("\n")}
|
|
|
29913
29959
|
return isLiteralPropertyName();
|
|
29914
29960
|
case 9 /* ObjectBindingElements */:
|
|
29915
29961
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
29916
|
-
case 24 /*
|
|
29917
|
-
return
|
|
29962
|
+
case 24 /* ImportAttributes */:
|
|
29963
|
+
return isImportAttributeName2();
|
|
29918
29964
|
case 7 /* HeritageClauseElement */:
|
|
29919
29965
|
if (token() === 19 /* OpenBraceToken */) {
|
|
29920
29966
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -30017,7 +30063,7 @@ ${lanes.join("\n")}
|
|
|
30017
30063
|
case 12 /* ObjectLiteralMembers */:
|
|
30018
30064
|
case 9 /* ObjectBindingElements */:
|
|
30019
30065
|
case 23 /* ImportOrExportSpecifiers */:
|
|
30020
|
-
case 24 /*
|
|
30066
|
+
case 24 /* ImportAttributes */:
|
|
30021
30067
|
return token() === 20 /* CloseBraceToken */;
|
|
30022
30068
|
case 3 /* SwitchClauseStatements */:
|
|
30023
30069
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -30323,7 +30369,7 @@ ${lanes.join("\n")}
|
|
|
30323
30369
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
30324
30370
|
case 14 /* JsxChildren */:
|
|
30325
30371
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
30326
|
-
case 24 /*
|
|
30372
|
+
case 24 /* ImportAttributes */:
|
|
30327
30373
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
30328
30374
|
case 25 /* JSDocComment */:
|
|
30329
30375
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -31198,28 +31244,6 @@ ${lanes.join("\n")}
|
|
|
31198
31244
|
nextToken();
|
|
31199
31245
|
return token() === 102 /* ImportKeyword */;
|
|
31200
31246
|
}
|
|
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
31247
|
function parseImportType() {
|
|
31224
31248
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
31225
31249
|
const pos = getNodePos();
|
|
@@ -31227,14 +31251,36 @@ ${lanes.join("\n")}
|
|
|
31227
31251
|
parseExpected(102 /* ImportKeyword */);
|
|
31228
31252
|
parseExpected(21 /* OpenParenToken */);
|
|
31229
31253
|
const type = parseType();
|
|
31230
|
-
let
|
|
31254
|
+
let attributes;
|
|
31231
31255
|
if (parseOptional(28 /* CommaToken */)) {
|
|
31232
|
-
|
|
31256
|
+
const openBracePosition = scanner2.getTokenStart();
|
|
31257
|
+
parseExpected(19 /* OpenBraceToken */);
|
|
31258
|
+
const currentToken2 = token();
|
|
31259
|
+
if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {
|
|
31260
|
+
nextToken();
|
|
31261
|
+
} else {
|
|
31262
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
31263
|
+
}
|
|
31264
|
+
parseExpected(59 /* ColonToken */);
|
|
31265
|
+
attributes = parseImportAttributes(
|
|
31266
|
+
currentToken2,
|
|
31267
|
+
/*skipKeyword*/
|
|
31268
|
+
true
|
|
31269
|
+
);
|
|
31270
|
+
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
31271
|
+
const lastError = lastOrUndefined(parseDiagnostics);
|
|
31272
|
+
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
31273
|
+
addRelatedInfo(
|
|
31274
|
+
lastError,
|
|
31275
|
+
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
31276
|
+
);
|
|
31277
|
+
}
|
|
31278
|
+
}
|
|
31233
31279
|
}
|
|
31234
31280
|
parseExpected(22 /* CloseParenToken */);
|
|
31235
31281
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
31236
31282
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
31237
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
31283
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
31238
31284
|
}
|
|
31239
31285
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
31240
31286
|
nextToken();
|
|
@@ -34296,15 +34342,16 @@ ${lanes.join("\n")}
|
|
|
34296
34342
|
parseExpected(161 /* FromKeyword */);
|
|
34297
34343
|
}
|
|
34298
34344
|
const moduleSpecifier = parseModuleSpecifier();
|
|
34299
|
-
|
|
34300
|
-
|
|
34301
|
-
|
|
34345
|
+
const currentToken2 = token();
|
|
34346
|
+
let attributes;
|
|
34347
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
|
|
34348
|
+
attributes = parseImportAttributes(currentToken2);
|
|
34302
34349
|
}
|
|
34303
34350
|
parseSemicolon();
|
|
34304
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
34351
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
34305
34352
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
34306
34353
|
}
|
|
34307
|
-
function
|
|
34354
|
+
function parseImportAttribute() {
|
|
34308
34355
|
const pos = getNodePos();
|
|
34309
34356
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
34310
34357
|
parseExpected(59 /* ColonToken */);
|
|
@@ -34312,19 +34359,19 @@ ${lanes.join("\n")}
|
|
|
34312
34359
|
/*allowReturnTypeInArrowFunction*/
|
|
34313
34360
|
true
|
|
34314
34361
|
);
|
|
34315
|
-
return finishNode(factory2.
|
|
34362
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
34316
34363
|
}
|
|
34317
|
-
function
|
|
34364
|
+
function parseImportAttributes(token2, skipKeyword) {
|
|
34318
34365
|
const pos = getNodePos();
|
|
34319
|
-
if (!
|
|
34320
|
-
parseExpected(
|
|
34366
|
+
if (!skipKeyword) {
|
|
34367
|
+
parseExpected(token2);
|
|
34321
34368
|
}
|
|
34322
34369
|
const openBracePosition = scanner2.getTokenStart();
|
|
34323
34370
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
34324
34371
|
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
34325
34372
|
const elements = parseDelimitedList(
|
|
34326
|
-
24 /*
|
|
34327
|
-
|
|
34373
|
+
24 /* ImportAttributes */,
|
|
34374
|
+
parseImportAttribute,
|
|
34328
34375
|
/*considerSemicolonAsDelimiter*/
|
|
34329
34376
|
true
|
|
34330
34377
|
);
|
|
@@ -34337,7 +34384,7 @@ ${lanes.join("\n")}
|
|
|
34337
34384
|
);
|
|
34338
34385
|
}
|
|
34339
34386
|
}
|
|
34340
|
-
return finishNode(factory2.
|
|
34387
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
34341
34388
|
} else {
|
|
34342
34389
|
const elements = createNodeArray(
|
|
34343
34390
|
[],
|
|
@@ -34347,10 +34394,11 @@ ${lanes.join("\n")}
|
|
|
34347
34394
|
/*hasTrailingComma*/
|
|
34348
34395
|
false
|
|
34349
34396
|
);
|
|
34350
|
-
return finishNode(factory2.
|
|
34397
|
+
return finishNode(factory2.createImportAttributes(
|
|
34351
34398
|
elements,
|
|
34352
34399
|
/*multiLine*/
|
|
34353
|
-
false
|
|
34400
|
+
false,
|
|
34401
|
+
token2
|
|
34354
34402
|
), pos);
|
|
34355
34403
|
}
|
|
34356
34404
|
}
|
|
@@ -34482,7 +34530,7 @@ ${lanes.join("\n")}
|
|
|
34482
34530
|
);
|
|
34483
34531
|
let exportClause;
|
|
34484
34532
|
let moduleSpecifier;
|
|
34485
|
-
let
|
|
34533
|
+
let attributes;
|
|
34486
34534
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
34487
34535
|
const namespaceExportPos = getNodePos();
|
|
34488
34536
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -34498,12 +34546,13 @@ ${lanes.join("\n")}
|
|
|
34498
34546
|
moduleSpecifier = parseModuleSpecifier();
|
|
34499
34547
|
}
|
|
34500
34548
|
}
|
|
34501
|
-
|
|
34502
|
-
|
|
34549
|
+
const currentToken2 = token();
|
|
34550
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
|
|
34551
|
+
attributes = parseImportAttributes(currentToken2);
|
|
34503
34552
|
}
|
|
34504
34553
|
parseSemicolon();
|
|
34505
34554
|
setAwaitContext(savedAwaitContext);
|
|
34506
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
34555
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
34507
34556
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
34508
34557
|
}
|
|
34509
34558
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -34553,7 +34602,7 @@ ${lanes.join("\n")}
|
|
|
34553
34602
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
34554
34603
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
34555
34604
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
34556
|
-
ParsingContext2[ParsingContext2["
|
|
34605
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
34557
34606
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
34558
34607
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
34559
34608
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -39407,10 +39456,15 @@ ${lanes.join("\n")}
|
|
|
39407
39456
|
const failedLookupLocations = [];
|
|
39408
39457
|
const affectingLocations = [];
|
|
39409
39458
|
let features = getNodeResolutionFeatures(options);
|
|
39410
|
-
if (resolutionMode
|
|
39459
|
+
if (resolutionMode !== void 0) {
|
|
39460
|
+
features |= 30 /* AllFeatures */;
|
|
39461
|
+
}
|
|
39462
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
39463
|
+
if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
|
|
39411
39464
|
features |= 32 /* EsmMode */;
|
|
39412
39465
|
}
|
|
39413
|
-
const
|
|
39466
|
+
const useImportCondition = resolutionMode === 99 /* ESNext */ || (resolutionMode !== void 0 ? false : void 0);
|
|
39467
|
+
const conditions = features & 8 /* Exports */ ? getConditions(options, useImportCondition) : [];
|
|
39414
39468
|
const diagnostics = [];
|
|
39415
39469
|
const moduleResolutionState = {
|
|
39416
39470
|
compilerOptions: options,
|
|
@@ -39579,11 +39633,19 @@ ${lanes.join("\n")}
|
|
|
39579
39633
|
return features;
|
|
39580
39634
|
}
|
|
39581
39635
|
function getConditions(options, esmMode) {
|
|
39582
|
-
const
|
|
39636
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
39637
|
+
if (esmMode === void 0) {
|
|
39638
|
+
if (moduleResolution === 100 /* Bundler */) {
|
|
39639
|
+
esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
|
|
39640
|
+
} else if (moduleResolution === 2 /* Node10 */) {
|
|
39641
|
+
return [];
|
|
39642
|
+
}
|
|
39643
|
+
}
|
|
39644
|
+
const conditions = esmMode ? ["import"] : ["require"];
|
|
39583
39645
|
if (!options.noDtsResolution) {
|
|
39584
39646
|
conditions.push("types");
|
|
39585
39647
|
}
|
|
39586
|
-
if (
|
|
39648
|
+
if (moduleResolution !== 100 /* Bundler */) {
|
|
39587
39649
|
conditions.push("node");
|
|
39588
39650
|
}
|
|
39589
39651
|
return concatenate(conditions, options.customConditions);
|
|
@@ -40026,13 +40088,13 @@ ${lanes.join("\n")}
|
|
|
40026
40088
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
40027
40089
|
break;
|
|
40028
40090
|
case 2 /* Node10 */:
|
|
40029
|
-
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
40091
|
+
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
40030
40092
|
break;
|
|
40031
40093
|
case 1 /* Classic */:
|
|
40032
40094
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
40033
40095
|
break;
|
|
40034
40096
|
case 100 /* Bundler */:
|
|
40035
|
-
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
40097
|
+
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
40036
40098
|
break;
|
|
40037
40099
|
default:
|
|
40038
40100
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
@@ -40197,7 +40259,7 @@ ${lanes.join("\n")}
|
|
|
40197
40259
|
resolutionMode
|
|
40198
40260
|
);
|
|
40199
40261
|
}
|
|
40200
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
40262
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {
|
|
40201
40263
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
40202
40264
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
40203
40265
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
@@ -40214,7 +40276,8 @@ ${lanes.join("\n")}
|
|
|
40214
40276
|
extensions,
|
|
40215
40277
|
/*isConfigLookup*/
|
|
40216
40278
|
false,
|
|
40217
|
-
redirectedReference
|
|
40279
|
+
redirectedReference,
|
|
40280
|
+
conditions
|
|
40218
40281
|
);
|
|
40219
40282
|
}
|
|
40220
40283
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
@@ -40230,10 +40293,12 @@ ${lanes.join("\n")}
|
|
|
40230
40293
|
/*isConfigLookup*/
|
|
40231
40294
|
false,
|
|
40232
40295
|
/*redirectedReference*/
|
|
40296
|
+
void 0,
|
|
40297
|
+
/*conditions*/
|
|
40233
40298
|
void 0
|
|
40234
40299
|
);
|
|
40235
40300
|
}
|
|
40236
|
-
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
40301
|
+
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {
|
|
40237
40302
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
40238
40303
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
40239
40304
|
if (getResolveJsonModule(compilerOptions)) {
|
|
@@ -40249,10 +40314,11 @@ ${lanes.join("\n")}
|
|
|
40249
40314
|
extensions,
|
|
40250
40315
|
/*isConfigLookup*/
|
|
40251
40316
|
false,
|
|
40252
|
-
redirectedReference
|
|
40317
|
+
redirectedReference,
|
|
40318
|
+
conditions
|
|
40253
40319
|
);
|
|
40254
40320
|
}
|
|
40255
|
-
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
40321
|
+
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {
|
|
40256
40322
|
let extensions;
|
|
40257
40323
|
if (isConfigLookup) {
|
|
40258
40324
|
extensions = 8 /* Json */;
|
|
@@ -40263,7 +40329,7 @@ ${lanes.join("\n")}
|
|
|
40263
40329
|
} else {
|
|
40264
40330
|
extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
40265
40331
|
}
|
|
40266
|
-
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
40332
|
+
return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
|
|
40267
40333
|
}
|
|
40268
40334
|
function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
40269
40335
|
return nodeModuleNameResolverWorker(
|
|
@@ -40278,15 +40344,21 @@ ${lanes.join("\n")}
|
|
|
40278
40344
|
/*isConfigLookup*/
|
|
40279
40345
|
true,
|
|
40280
40346
|
/*redirectedReference*/
|
|
40347
|
+
void 0,
|
|
40348
|
+
/*conditions*/
|
|
40281
40349
|
void 0
|
|
40282
40350
|
);
|
|
40283
40351
|
}
|
|
40284
|
-
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
40352
|
+
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
|
|
40285
40353
|
var _a, _b, _c, _d;
|
|
40286
40354
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
40287
40355
|
const failedLookupLocations = [];
|
|
40288
40356
|
const affectingLocations = [];
|
|
40289
|
-
const
|
|
40357
|
+
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
40358
|
+
conditions ?? (conditions = getConditions(
|
|
40359
|
+
compilerOptions,
|
|
40360
|
+
moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
|
|
40361
|
+
));
|
|
40290
40362
|
const diagnostics = [];
|
|
40291
40363
|
const state = {
|
|
40292
40364
|
compilerOptions,
|
|
@@ -40296,17 +40368,17 @@ ${lanes.join("\n")}
|
|
|
40296
40368
|
affectingLocations,
|
|
40297
40369
|
packageJsonInfoCache: cache,
|
|
40298
40370
|
features,
|
|
40299
|
-
conditions,
|
|
40371
|
+
conditions: conditions ?? emptyArray,
|
|
40300
40372
|
requestContainingDirectory: containingDirectory,
|
|
40301
40373
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
40302
40374
|
isConfigLookup,
|
|
40303
40375
|
candidateIsFromPackageJsonField: false
|
|
40304
40376
|
};
|
|
40305
|
-
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(
|
|
40306
|
-
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
40377
|
+
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
40378
|
+
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
|
|
40307
40379
|
}
|
|
40308
40380
|
let result;
|
|
40309
|
-
if (
|
|
40381
|
+
if (moduleResolution === 2 /* Node10 */) {
|
|
40310
40382
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
40311
40383
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
40312
40384
|
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
@@ -40314,7 +40386,7 @@ ${lanes.join("\n")}
|
|
|
40314
40386
|
result = tryResolve(extensions, state);
|
|
40315
40387
|
}
|
|
40316
40388
|
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")) {
|
|
40389
|
+
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
40390
|
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
40391
|
const diagnosticState = {
|
|
40320
40392
|
...state,
|
|
@@ -41111,7 +41183,8 @@ ${lanes.join("\n")}
|
|
|
41111
41183
|
extensions,
|
|
41112
41184
|
/*isConfigLookup*/
|
|
41113
41185
|
false,
|
|
41114
|
-
redirectedReference
|
|
41186
|
+
redirectedReference,
|
|
41187
|
+
state.conditions
|
|
41115
41188
|
);
|
|
41116
41189
|
return toSearchResult(
|
|
41117
41190
|
result.resolvedModule ? {
|
|
@@ -48789,7 +48862,7 @@ ${lanes.join("\n")}
|
|
|
48789
48862
|
return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0;
|
|
48790
48863
|
}
|
|
48791
48864
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
|
|
48792
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
48865
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
48793
48866
|
if (startsWith(moduleReference, "@types/")) {
|
|
48794
48867
|
const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
48795
48868
|
const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
|
|
@@ -48844,9 +48917,8 @@ ${lanes.join("\n")}
|
|
|
48844
48917
|
}
|
|
48845
48918
|
if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
|
|
48846
48919
|
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
|
|
48847
|
-
const
|
|
48848
|
-
|
|
48849
|
-
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) {
|
|
48920
|
+
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
|
|
48921
|
+
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
|
|
48850
48922
|
if (findAncestor(location, isImportEqualsDeclaration)) {
|
|
48851
48923
|
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
48924
|
} else {
|
|
@@ -48952,7 +49024,7 @@ ${lanes.join("\n")}
|
|
|
48952
49024
|
error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
48953
49025
|
} else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
48954
49026
|
const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
|
|
48955
|
-
const suggestedExt = (
|
|
49027
|
+
const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
|
|
48956
49028
|
if (suggestedExt) {
|
|
48957
49029
|
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
49030
|
} else {
|
|
@@ -50717,7 +50789,7 @@ ${lanes.join("\n")}
|
|
|
50717
50789
|
return factory.updateImportTypeNode(
|
|
50718
50790
|
root,
|
|
50719
50791
|
root.argument,
|
|
50720
|
-
root.
|
|
50792
|
+
root.attributes,
|
|
50721
50793
|
qualifier,
|
|
50722
50794
|
typeArguments,
|
|
50723
50795
|
root.isTypeOf
|
|
@@ -51450,7 +51522,6 @@ ${lanes.join("\n")}
|
|
|
51450
51522
|
return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
|
|
51451
51523
|
}
|
|
51452
51524
|
function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
|
|
51453
|
-
var _a, _b, _c, _d;
|
|
51454
51525
|
const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */));
|
|
51455
51526
|
const isTypeOf = meaning === 111551 /* Value */;
|
|
51456
51527
|
if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
@@ -51459,17 +51530,18 @@ ${lanes.join("\n")}
|
|
|
51459
51530
|
const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration));
|
|
51460
51531
|
const targetFile = getSourceFileOfModule(chain[0]);
|
|
51461
51532
|
let specifier;
|
|
51462
|
-
let
|
|
51533
|
+
let attributes;
|
|
51463
51534
|
if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
|
|
51464
51535
|
if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) {
|
|
51465
51536
|
specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */);
|
|
51466
|
-
|
|
51467
|
-
factory.
|
|
51468
|
-
factory.
|
|
51469
|
-
|
|
51470
|
-
|
|
51471
|
-
|
|
51472
|
-
|
|
51537
|
+
attributes = factory.createImportAttributes(
|
|
51538
|
+
factory.createNodeArray([
|
|
51539
|
+
factory.createImportAttribute(
|
|
51540
|
+
factory.createStringLiteral("resolution-mode"),
|
|
51541
|
+
factory.createStringLiteral("import")
|
|
51542
|
+
)
|
|
51543
|
+
])
|
|
51544
|
+
);
|
|
51473
51545
|
}
|
|
51474
51546
|
}
|
|
51475
51547
|
if (!specifier) {
|
|
@@ -51483,16 +51555,17 @@ ${lanes.join("\n")}
|
|
|
51483
51555
|
if (specifier.includes("/node_modules/")) {
|
|
51484
51556
|
specifier = oldSpecifier;
|
|
51485
51557
|
} else {
|
|
51486
|
-
|
|
51487
|
-
factory.
|
|
51488
|
-
factory.
|
|
51489
|
-
|
|
51490
|
-
|
|
51491
|
-
|
|
51492
|
-
|
|
51558
|
+
attributes = factory.createImportAttributes(
|
|
51559
|
+
factory.createNodeArray([
|
|
51560
|
+
factory.createImportAttribute(
|
|
51561
|
+
factory.createStringLiteral("resolution-mode"),
|
|
51562
|
+
factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require")
|
|
51563
|
+
)
|
|
51564
|
+
])
|
|
51565
|
+
);
|
|
51493
51566
|
}
|
|
51494
51567
|
}
|
|
51495
|
-
if (!
|
|
51568
|
+
if (!attributes) {
|
|
51496
51569
|
context.encounteredError = true;
|
|
51497
51570
|
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
51498
51571
|
context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
|
|
@@ -51512,11 +51585,11 @@ ${lanes.join("\n")}
|
|
|
51512
51585
|
void 0
|
|
51513
51586
|
);
|
|
51514
51587
|
}
|
|
51515
|
-
return factory.createImportTypeNode(lit,
|
|
51588
|
+
return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf);
|
|
51516
51589
|
} else {
|
|
51517
51590
|
const splitNode = getTopmostIndexedAccessType(nonRootParts);
|
|
51518
51591
|
const qualifier = splitNode.objectType.typeName;
|
|
51519
|
-
return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit,
|
|
51592
|
+
return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
51520
51593
|
}
|
|
51521
51594
|
}
|
|
51522
51595
|
const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
|
|
@@ -51992,7 +52065,7 @@ ${lanes.join("\n")}
|
|
|
51992
52065
|
return factory.updateImportTypeNode(
|
|
51993
52066
|
node,
|
|
51994
52067
|
factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)),
|
|
51995
|
-
node.
|
|
52068
|
+
node.attributes,
|
|
51996
52069
|
node.qualifier,
|
|
51997
52070
|
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
|
51998
52071
|
node.isTypeOf
|
|
@@ -52212,7 +52285,7 @@ ${lanes.join("\n")}
|
|
|
52212
52285
|
return statements;
|
|
52213
52286
|
}
|
|
52214
52287
|
function inlineExportModifiers(statements) {
|
|
52215
|
-
const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.
|
|
52288
|
+
const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause));
|
|
52216
52289
|
if (index >= 0) {
|
|
52217
52290
|
const exportDecl = statements[index];
|
|
52218
52291
|
const replacements = mapDefined(exportDecl.exportClause.elements, (e) => {
|
|
@@ -52240,7 +52313,7 @@ ${lanes.join("\n")}
|
|
|
52240
52313
|
replacements
|
|
52241
52314
|
),
|
|
52242
52315
|
exportDecl.moduleSpecifier,
|
|
52243
|
-
exportDecl.
|
|
52316
|
+
exportDecl.attributes
|
|
52244
52317
|
);
|
|
52245
52318
|
}
|
|
52246
52319
|
}
|
|
@@ -52891,7 +52964,7 @@ ${lanes.join("\n")}
|
|
|
52891
52964
|
)])
|
|
52892
52965
|
),
|
|
52893
52966
|
factory.createStringLiteral(specifier2),
|
|
52894
|
-
/*
|
|
52967
|
+
/*attributes*/
|
|
52895
52968
|
void 0
|
|
52896
52969
|
),
|
|
52897
52970
|
0 /* None */
|
|
@@ -52979,7 +53052,7 @@ ${lanes.join("\n")}
|
|
|
52979
53052
|
void 0
|
|
52980
53053
|
),
|
|
52981
53054
|
specifier2,
|
|
52982
|
-
node.parent.
|
|
53055
|
+
node.parent.attributes
|
|
52983
53056
|
),
|
|
52984
53057
|
0 /* None */
|
|
52985
53058
|
);
|
|
@@ -53000,7 +53073,7 @@ ${lanes.join("\n")}
|
|
|
53000
53073
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
53001
53074
|
),
|
|
53002
53075
|
specifier2,
|
|
53003
|
-
node.parent.
|
|
53076
|
+
node.parent.attributes
|
|
53004
53077
|
),
|
|
53005
53078
|
0 /* None */
|
|
53006
53079
|
);
|
|
@@ -53041,7 +53114,7 @@ ${lanes.join("\n")}
|
|
|
53041
53114
|
])
|
|
53042
53115
|
),
|
|
53043
53116
|
specifier2,
|
|
53044
|
-
node.parent.parent.parent.
|
|
53117
|
+
node.parent.parent.parent.attributes
|
|
53045
53118
|
),
|
|
53046
53119
|
0 /* None */
|
|
53047
53120
|
);
|
|
@@ -62500,6 +62573,7 @@ ${lanes.join("\n")}
|
|
|
62500
62573
|
let skipParentCounter = 0;
|
|
62501
62574
|
let lastSkippedInfo;
|
|
62502
62575
|
let incompatibleStack;
|
|
62576
|
+
let relationCount = 16e6 - relation.size >> 3;
|
|
62503
62577
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
62504
62578
|
const result = isRelatedTo(
|
|
62505
62579
|
source,
|
|
@@ -62513,8 +62587,19 @@ ${lanes.join("\n")}
|
|
|
62513
62587
|
reportIncompatibleStack();
|
|
62514
62588
|
}
|
|
62515
62589
|
if (overflow) {
|
|
62590
|
+
const id = getRelationKey(
|
|
62591
|
+
source,
|
|
62592
|
+
target,
|
|
62593
|
+
/*intersectionState*/
|
|
62594
|
+
0 /* None */,
|
|
62595
|
+
relation,
|
|
62596
|
+
/*ignoreConstraints*/
|
|
62597
|
+
false
|
|
62598
|
+
);
|
|
62599
|
+
relation.set(id, 4 /* Reported */ | 2 /* Failed */);
|
|
62516
62600
|
(_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth });
|
|
62517
|
-
const
|
|
62601
|
+
const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;
|
|
62602
|
+
const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target));
|
|
62518
62603
|
if (errorOutputContainer) {
|
|
62519
62604
|
(errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
|
|
62520
62605
|
}
|
|
@@ -63045,6 +63130,16 @@ ${lanes.join("\n")}
|
|
|
63045
63130
|
}
|
|
63046
63131
|
function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) {
|
|
63047
63132
|
if (source2.flags & 1048576 /* Union */) {
|
|
63133
|
+
if (target2.flags & 1048576 /* Union */) {
|
|
63134
|
+
const sourceOrigin = source2.origin;
|
|
63135
|
+
if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) {
|
|
63136
|
+
return -1 /* True */;
|
|
63137
|
+
}
|
|
63138
|
+
const targetOrigin = target2.origin;
|
|
63139
|
+
if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) {
|
|
63140
|
+
return -1 /* True */;
|
|
63141
|
+
}
|
|
63142
|
+
}
|
|
63048
63143
|
return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState);
|
|
63049
63144
|
}
|
|
63050
63145
|
if (target2.flags & 1048576 /* Union */) {
|
|
@@ -63358,6 +63453,10 @@ ${lanes.join("\n")}
|
|
|
63358
63453
|
return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;
|
|
63359
63454
|
}
|
|
63360
63455
|
}
|
|
63456
|
+
if (relationCount <= 0) {
|
|
63457
|
+
overflow = true;
|
|
63458
|
+
return 0 /* False */;
|
|
63459
|
+
}
|
|
63361
63460
|
if (!maybeKeys) {
|
|
63362
63461
|
maybeKeys = [];
|
|
63363
63462
|
maybeKeysSet = /* @__PURE__ */ new Set();
|
|
@@ -63451,6 +63550,7 @@ ${lanes.join("\n")}
|
|
|
63451
63550
|
}
|
|
63452
63551
|
} else {
|
|
63453
63552
|
relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
|
|
63553
|
+
relationCount--;
|
|
63454
63554
|
resetMaybeStack(
|
|
63455
63555
|
/*markAllAsSucceeded*/
|
|
63456
63556
|
false
|
|
@@ -63462,6 +63562,7 @@ ${lanes.join("\n")}
|
|
|
63462
63562
|
maybeKeysSet.delete(maybeKeys[i]);
|
|
63463
63563
|
if (markAllAsSucceeded) {
|
|
63464
63564
|
relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
|
|
63565
|
+
relationCount--;
|
|
63465
63566
|
}
|
|
63466
63567
|
}
|
|
63467
63568
|
maybeCount = maybeStart;
|
|
@@ -78294,16 +78395,8 @@ ${lanes.join("\n")}
|
|
|
78294
78395
|
}
|
|
78295
78396
|
function checkImportType(node) {
|
|
78296
78397
|
checkSourceElement(node.argument);
|
|
78297
|
-
if (node.
|
|
78298
|
-
|
|
78299
|
-
if (override) {
|
|
78300
|
-
if (!isNightly()) {
|
|
78301
|
-
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);
|
|
78302
|
-
}
|
|
78303
|
-
if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
|
|
78304
|
-
grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
78305
|
-
}
|
|
78306
|
-
}
|
|
78398
|
+
if (node.attributes) {
|
|
78399
|
+
getResolutionModeOverride(node.attributes, grammarErrorOnNode);
|
|
78307
78400
|
}
|
|
78308
78401
|
checkTypeReferenceOrImport(node);
|
|
78309
78402
|
}
|
|
@@ -82267,12 +82360,13 @@ ${lanes.join("\n")}
|
|
|
82267
82360
|
return false;
|
|
82268
82361
|
}
|
|
82269
82362
|
}
|
|
82270
|
-
if (!isImportEqualsDeclaration(node) && node.
|
|
82363
|
+
if (!isImportEqualsDeclaration(node) && node.attributes) {
|
|
82364
|
+
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;
|
|
82271
82365
|
let hasError = false;
|
|
82272
|
-
for (const
|
|
82273
|
-
if (!isStringLiteral(
|
|
82366
|
+
for (const attr of node.attributes.elements) {
|
|
82367
|
+
if (!isStringLiteral(attr.value)) {
|
|
82274
82368
|
hasError = true;
|
|
82275
|
-
error2(
|
|
82369
|
+
error2(attr.value, diagnostic);
|
|
82276
82370
|
}
|
|
82277
82371
|
}
|
|
82278
82372
|
return !hasError;
|
|
@@ -82404,32 +82498,26 @@ ${lanes.join("\n")}
|
|
|
82404
82498
|
checkExternalEmitHelpers(node, 131072 /* ImportDefault */);
|
|
82405
82499
|
}
|
|
82406
82500
|
}
|
|
82407
|
-
function
|
|
82501
|
+
function checkImportAttributes(declaration) {
|
|
82408
82502
|
var _a;
|
|
82409
|
-
|
|
82410
|
-
|
|
82411
|
-
const
|
|
82412
|
-
|
|
82413
|
-
|
|
82414
|
-
|
|
82415
|
-
}
|
|
82416
|
-
if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
|
|
82417
|
-
return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
82418
|
-
}
|
|
82503
|
+
const node = declaration.attributes;
|
|
82504
|
+
if (node) {
|
|
82505
|
+
const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
82506
|
+
const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0);
|
|
82507
|
+
const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */;
|
|
82508
|
+
if (validForTypeAttributes && override) {
|
|
82419
82509
|
return;
|
|
82420
82510
|
}
|
|
82421
82511
|
const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
82422
82512
|
if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) {
|
|
82423
|
-
|
|
82424
|
-
|
|
82425
|
-
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
|
|
82426
|
-
);
|
|
82513
|
+
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;
|
|
82514
|
+
return grammarErrorOnNode(node, message);
|
|
82427
82515
|
}
|
|
82428
82516
|
if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
82429
|
-
return grammarErrorOnNode(
|
|
82517
|
+
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);
|
|
82430
82518
|
}
|
|
82431
82519
|
if (override) {
|
|
82432
|
-
return grammarErrorOnNode(
|
|
82520
|
+
return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
|
|
82433
82521
|
}
|
|
82434
82522
|
}
|
|
82435
82523
|
}
|
|
@@ -82461,7 +82549,7 @@ ${lanes.join("\n")}
|
|
|
82461
82549
|
}
|
|
82462
82550
|
}
|
|
82463
82551
|
}
|
|
82464
|
-
|
|
82552
|
+
checkImportAttributes(node);
|
|
82465
82553
|
}
|
|
82466
82554
|
function checkImportEqualsDeclaration(node) {
|
|
82467
82555
|
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)) {
|
|
@@ -82534,7 +82622,7 @@ ${lanes.join("\n")}
|
|
|
82534
82622
|
}
|
|
82535
82623
|
}
|
|
82536
82624
|
}
|
|
82537
|
-
|
|
82625
|
+
checkImportAttributes(node);
|
|
82538
82626
|
}
|
|
82539
82627
|
function checkGrammarExportDeclaration(node) {
|
|
82540
82628
|
var _a;
|
|
@@ -86324,12 +86412,12 @@ ${lanes.join("\n")}
|
|
|
86324
86412
|
if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) {
|
|
86325
86413
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
86326
86414
|
if (nodeArguments.length > 1) {
|
|
86327
|
-
const
|
|
86328
|
-
return grammarErrorOnNode(
|
|
86415
|
+
const importAttributesArgument = nodeArguments[1];
|
|
86416
|
+
return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
|
|
86329
86417
|
}
|
|
86330
86418
|
}
|
|
86331
86419
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
86332
|
-
return grammarErrorOnNode(node, Diagnostics.
|
|
86420
|
+
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);
|
|
86333
86421
|
}
|
|
86334
86422
|
const spreadElement = find(nodeArguments, isSpreadElement);
|
|
86335
86423
|
if (spreadElement) {
|
|
@@ -86728,13 +86816,6 @@ ${lanes.join("\n")}
|
|
|
86728
86816
|
this.inner.reportNonSerializableProperty(propertyName);
|
|
86729
86817
|
}
|
|
86730
86818
|
}
|
|
86731
|
-
reportImportTypeNodeResolutionModeOverride() {
|
|
86732
|
-
var _a;
|
|
86733
|
-
if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) {
|
|
86734
|
-
this.onDiagnosticReported();
|
|
86735
|
-
this.inner.reportImportTypeNodeResolutionModeOverride();
|
|
86736
|
-
}
|
|
86737
|
-
}
|
|
86738
86819
|
onDiagnosticReported() {
|
|
86739
86820
|
this.context.reportedDiagnostic = true;
|
|
86740
86821
|
}
|
|
@@ -87254,7 +87335,7 @@ ${lanes.join("\n")}
|
|
|
87254
87335
|
return context.factory.updateImportTypeNode(
|
|
87255
87336
|
node,
|
|
87256
87337
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
87257
|
-
nodeVisitor(node.
|
|
87338
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes),
|
|
87258
87339
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
87259
87340
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
87260
87341
|
node.isTypeOf
|
|
@@ -87805,20 +87886,20 @@ ${lanes.join("\n")}
|
|
|
87805
87886
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
87806
87887
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
87807
87888
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
87808
|
-
nodeVisitor(node.
|
|
87889
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
87809
87890
|
);
|
|
87810
87891
|
},
|
|
87811
|
-
[300 /*
|
|
87812
|
-
return context.factory.
|
|
87892
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
87893
|
+
return context.factory.updateImportAttributes(
|
|
87813
87894
|
node,
|
|
87814
|
-
nodesVisitor(node.elements, visitor,
|
|
87895
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
87815
87896
|
node.multiLine
|
|
87816
87897
|
);
|
|
87817
87898
|
},
|
|
87818
|
-
[301 /*
|
|
87819
|
-
return context.factory.
|
|
87899
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87900
|
+
return context.factory.updateImportAttribute(
|
|
87820
87901
|
node,
|
|
87821
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
87902
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
87822
87903
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
87823
87904
|
);
|
|
87824
87905
|
},
|
|
@@ -87870,7 +87951,7 @@ ${lanes.join("\n")}
|
|
|
87870
87951
|
node.isTypeOnly,
|
|
87871
87952
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
87872
87953
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
87873
|
-
nodeVisitor(node.
|
|
87954
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
87874
87955
|
);
|
|
87875
87956
|
},
|
|
87876
87957
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -91398,7 +91479,7 @@ ${lanes.join("\n")}
|
|
|
91398
91479
|
void 0,
|
|
91399
91480
|
importClause,
|
|
91400
91481
|
node.moduleSpecifier,
|
|
91401
|
-
node.
|
|
91482
|
+
node.attributes
|
|
91402
91483
|
) : void 0;
|
|
91403
91484
|
}
|
|
91404
91485
|
function visitImportClause(node) {
|
|
@@ -91448,7 +91529,7 @@ ${lanes.join("\n")}
|
|
|
91448
91529
|
node.isTypeOnly,
|
|
91449
91530
|
exportClause,
|
|
91450
91531
|
node.moduleSpecifier,
|
|
91451
|
-
node.
|
|
91532
|
+
node.attributes
|
|
91452
91533
|
) : void 0;
|
|
91453
91534
|
}
|
|
91454
91535
|
function visitNamedExports(node, allowEmpty) {
|
|
@@ -91482,7 +91563,7 @@ ${lanes.join("\n")}
|
|
|
91482
91563
|
/*importClause*/
|
|
91483
91564
|
void 0,
|
|
91484
91565
|
node.moduleReference.expression,
|
|
91485
|
-
/*
|
|
91566
|
+
/*attributes*/
|
|
91486
91567
|
void 0
|
|
91487
91568
|
),
|
|
91488
91569
|
node
|
|
@@ -99720,7 +99801,7 @@ ${lanes.join("\n")}
|
|
|
99720
99801
|
factory2.createNamedImports(arrayFrom(importSpecifiersMap.values()))
|
|
99721
99802
|
),
|
|
99722
99803
|
factory2.createStringLiteral(importSource),
|
|
99723
|
-
/*
|
|
99804
|
+
/*attributes*/
|
|
99724
99805
|
void 0
|
|
99725
99806
|
);
|
|
99726
99807
|
setParentRecursive(
|
|
@@ -109171,7 +109252,9 @@ ${lanes.join("\n")}
|
|
|
109171
109252
|
)
|
|
109172
109253
|
])
|
|
109173
109254
|
),
|
|
109174
|
-
factory2.createStringLiteral("module")
|
|
109255
|
+
factory2.createStringLiteral("module"),
|
|
109256
|
+
/*attributes*/
|
|
109257
|
+
void 0
|
|
109175
109258
|
);
|
|
109176
109259
|
const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
109177
109260
|
const requireStatement = factory2.createVariableStatement(
|
|
@@ -109288,7 +109371,7 @@ ${lanes.join("\n")}
|
|
|
109288
109371
|
)
|
|
109289
109372
|
),
|
|
109290
109373
|
node.moduleSpecifier,
|
|
109291
|
-
node.
|
|
109374
|
+
node.attributes
|
|
109292
109375
|
);
|
|
109293
109376
|
setOriginalNode(importDecl, node.exportClause);
|
|
109294
109377
|
const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration(
|
|
@@ -109758,8 +109841,7 @@ ${lanes.join("\n")}
|
|
|
109758
109841
|
trackReferencedAmbientModule,
|
|
109759
109842
|
trackExternalModuleSymbolOfImportTypeNode,
|
|
109760
109843
|
reportNonlocalAugmentation,
|
|
109761
|
-
reportNonSerializableProperty
|
|
109762
|
-
reportImportTypeNodeResolutionModeOverride
|
|
109844
|
+
reportNonSerializableProperty
|
|
109763
109845
|
};
|
|
109764
109846
|
let errorNameNode;
|
|
109765
109847
|
let errorFallbackNode;
|
|
@@ -109883,11 +109965,6 @@ ${lanes.join("\n")}
|
|
|
109883
109965
|
context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
|
|
109884
109966
|
}
|
|
109885
109967
|
}
|
|
109886
|
-
function reportImportTypeNodeResolutionModeOverride() {
|
|
109887
|
-
if (!isNightly() && (errorNameNode || errorFallbackNode)) {
|
|
109888
|
-
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));
|
|
109889
|
-
}
|
|
109890
|
-
}
|
|
109891
109968
|
function transformDeclarationsForJS(sourceFile, bundled) {
|
|
109892
109969
|
const oldDiag = getSymbolAccessibilityDiagnostic;
|
|
109893
109970
|
getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : {
|
|
@@ -110392,7 +110469,7 @@ ${lanes.join("\n")}
|
|
|
110392
110469
|
decl.modifiers,
|
|
110393
110470
|
decl.importClause,
|
|
110394
110471
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110395
|
-
|
|
110472
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110396
110473
|
);
|
|
110397
110474
|
}
|
|
110398
110475
|
const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0;
|
|
@@ -110408,7 +110485,7 @@ ${lanes.join("\n")}
|
|
|
110408
110485
|
void 0
|
|
110409
110486
|
),
|
|
110410
110487
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110411
|
-
|
|
110488
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110412
110489
|
);
|
|
110413
110490
|
}
|
|
110414
110491
|
if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) {
|
|
@@ -110426,7 +110503,7 @@ ${lanes.join("\n")}
|
|
|
110426
110503
|
namedBindings
|
|
110427
110504
|
),
|
|
110428
110505
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110429
|
-
|
|
110506
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110430
110507
|
) : void 0;
|
|
110431
110508
|
}
|
|
110432
110509
|
const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0);
|
|
@@ -110441,7 +110518,7 @@ ${lanes.join("\n")}
|
|
|
110441
110518
|
bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0
|
|
110442
110519
|
),
|
|
110443
110520
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110444
|
-
|
|
110521
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110445
110522
|
);
|
|
110446
110523
|
}
|
|
110447
110524
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
@@ -110451,19 +110528,13 @@ ${lanes.join("\n")}
|
|
|
110451
110528
|
/*importClause*/
|
|
110452
110529
|
void 0,
|
|
110453
110530
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110454
|
-
|
|
110531
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110455
110532
|
);
|
|
110456
110533
|
}
|
|
110457
110534
|
}
|
|
110458
|
-
function
|
|
110459
|
-
const mode =
|
|
110460
|
-
|
|
110461
|
-
if (!isNightly()) {
|
|
110462
|
-
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));
|
|
110463
|
-
}
|
|
110464
|
-
return assertClause;
|
|
110465
|
-
}
|
|
110466
|
-
return void 0;
|
|
110535
|
+
function tryGetResolutionModeOverride(node) {
|
|
110536
|
+
const mode = getResolutionModeOverride(node);
|
|
110537
|
+
return node && mode !== void 0 ? node : void 0;
|
|
110467
110538
|
}
|
|
110468
110539
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
110469
110540
|
while (length(lateMarkedStatements)) {
|
|
@@ -110749,7 +110820,7 @@ ${lanes.join("\n")}
|
|
|
110749
110820
|
return cleanup(factory2.updateImportTypeNode(
|
|
110750
110821
|
input,
|
|
110751
110822
|
factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
|
|
110752
|
-
input.
|
|
110823
|
+
input.attributes,
|
|
110753
110824
|
input.qualifier,
|
|
110754
110825
|
visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode),
|
|
110755
110826
|
input.isTypeOf
|
|
@@ -110803,7 +110874,7 @@ ${lanes.join("\n")}
|
|
|
110803
110874
|
input.isTypeOnly,
|
|
110804
110875
|
input.exportClause,
|
|
110805
110876
|
rewriteModuleSpecifier(input, input.moduleSpecifier),
|
|
110806
|
-
|
|
110877
|
+
tryGetResolutionModeOverride(input.attributes)
|
|
110807
110878
|
);
|
|
110808
110879
|
}
|
|
110809
110880
|
case 277 /* ExportAssignment */: {
|
|
@@ -113277,10 +113348,10 @@ ${lanes.join("\n")}
|
|
|
113277
113348
|
return emitNamedExports(node);
|
|
113278
113349
|
case 281 /* ExportSpecifier */:
|
|
113279
113350
|
return emitExportSpecifier(node);
|
|
113280
|
-
case 300 /*
|
|
113281
|
-
return
|
|
113282
|
-
case 301 /*
|
|
113283
|
-
return
|
|
113351
|
+
case 300 /* ImportAttributes */:
|
|
113352
|
+
return emitImportAttributes(node);
|
|
113353
|
+
case 301 /* ImportAttribute */:
|
|
113354
|
+
return emitImportAttribute(node);
|
|
113284
113355
|
case 282 /* MissingDeclaration */:
|
|
113285
113356
|
return;
|
|
113286
113357
|
case 283 /* ExternalModuleReference */:
|
|
@@ -114055,16 +114126,16 @@ ${lanes.join("\n")}
|
|
|
114055
114126
|
writeKeyword("import");
|
|
114056
114127
|
writePunctuation("(");
|
|
114057
114128
|
emit(node.argument);
|
|
114058
|
-
if (node.
|
|
114129
|
+
if (node.attributes) {
|
|
114059
114130
|
writePunctuation(",");
|
|
114060
114131
|
writeSpace();
|
|
114061
114132
|
writePunctuation("{");
|
|
114062
114133
|
writeSpace();
|
|
114063
|
-
writeKeyword("assert");
|
|
114134
|
+
writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
|
|
114064
114135
|
writePunctuation(":");
|
|
114065
114136
|
writeSpace();
|
|
114066
|
-
const elements = node.
|
|
114067
|
-
emitList(node.
|
|
114137
|
+
const elements = node.attributes.elements;
|
|
114138
|
+
emitList(node.attributes, elements, 526226 /* ImportAttributes */);
|
|
114068
114139
|
writeSpace();
|
|
114069
114140
|
writePunctuation("}");
|
|
114070
114141
|
}
|
|
@@ -115053,8 +115124,8 @@ ${lanes.join("\n")}
|
|
|
115053
115124
|
writeSpace();
|
|
115054
115125
|
}
|
|
115055
115126
|
emitExpression(node.moduleSpecifier);
|
|
115056
|
-
if (node.
|
|
115057
|
-
emitWithLeadingSpace(node.
|
|
115127
|
+
if (node.attributes) {
|
|
115128
|
+
emitWithLeadingSpace(node.attributes);
|
|
115058
115129
|
}
|
|
115059
115130
|
writeTrailingSemicolon();
|
|
115060
115131
|
}
|
|
@@ -115123,18 +115194,18 @@ ${lanes.join("\n")}
|
|
|
115123
115194
|
writeSpace();
|
|
115124
115195
|
emitExpression(node.moduleSpecifier);
|
|
115125
115196
|
}
|
|
115126
|
-
if (node.
|
|
115127
|
-
emitWithLeadingSpace(node.
|
|
115197
|
+
if (node.attributes) {
|
|
115198
|
+
emitWithLeadingSpace(node.attributes);
|
|
115128
115199
|
}
|
|
115129
115200
|
writeTrailingSemicolon();
|
|
115130
115201
|
}
|
|
115131
|
-
function
|
|
115132
|
-
emitTokenWithComment(
|
|
115202
|
+
function emitImportAttributes(node) {
|
|
115203
|
+
emitTokenWithComment(node.token, node.pos, writeKeyword, node);
|
|
115133
115204
|
writeSpace();
|
|
115134
115205
|
const elements = node.elements;
|
|
115135
|
-
emitList(node, elements, 526226 /*
|
|
115206
|
+
emitList(node, elements, 526226 /* ImportAttributes */);
|
|
115136
115207
|
}
|
|
115137
|
-
function
|
|
115208
|
+
function emitImportAttribute(node) {
|
|
115138
115209
|
emit(node.name);
|
|
115139
115210
|
writePunctuation(":");
|
|
115140
115211
|
writeSpace();
|
|
@@ -118272,8 +118343,6 @@ ${lanes.join("\n")}
|
|
|
118272
118343
|
return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
|
|
118273
118344
|
}
|
|
118274
118345
|
function getModeForResolutionAtIndex(file, index) {
|
|
118275
|
-
if (file.impliedNodeFormat === void 0)
|
|
118276
|
-
return void 0;
|
|
118277
118346
|
return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
|
|
118278
118347
|
}
|
|
118279
118348
|
function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
@@ -118287,42 +118356,48 @@ ${lanes.join("\n")}
|
|
|
118287
118356
|
return false;
|
|
118288
118357
|
}
|
|
118289
118358
|
function getModeForUsageLocation(file, usage) {
|
|
118290
|
-
var _a
|
|
118291
|
-
if (file.impliedNodeFormat === void 0)
|
|
118292
|
-
return void 0;
|
|
118359
|
+
var _a;
|
|
118293
118360
|
if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) {
|
|
118294
118361
|
const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
|
|
118295
118362
|
if (isTypeOnly) {
|
|
118296
|
-
const override =
|
|
118363
|
+
const override = getResolutionModeOverride(usage.parent.attributes);
|
|
118297
118364
|
if (override) {
|
|
118298
118365
|
return override;
|
|
118299
118366
|
}
|
|
118300
118367
|
}
|
|
118301
118368
|
}
|
|
118302
118369
|
if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) {
|
|
118303
|
-
const override =
|
|
118370
|
+
const override = getResolutionModeOverride(usage.parent.parent.attributes);
|
|
118304
118371
|
if (override) {
|
|
118305
118372
|
return override;
|
|
118306
118373
|
}
|
|
118307
118374
|
}
|
|
118375
|
+
if (file.impliedNodeFormat === void 0)
|
|
118376
|
+
return void 0;
|
|
118308
118377
|
if (file.impliedNodeFormat !== 99 /* ESNext */) {
|
|
118309
118378
|
return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
118310
118379
|
}
|
|
118311
|
-
const exprParentParent = (
|
|
118380
|
+
const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent;
|
|
118312
118381
|
return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */;
|
|
118313
118382
|
}
|
|
118314
|
-
function
|
|
118315
|
-
if (!
|
|
118383
|
+
function getResolutionModeOverride(node, grammarErrorOnNode) {
|
|
118384
|
+
if (!node)
|
|
118316
118385
|
return void 0;
|
|
118317
|
-
if (length(
|
|
118318
|
-
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118386
|
+
if (length(node.elements) !== 1) {
|
|
118387
|
+
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118388
|
+
node,
|
|
118389
|
+
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
|
|
118390
|
+
);
|
|
118319
118391
|
return void 0;
|
|
118320
118392
|
}
|
|
118321
|
-
const elem =
|
|
118393
|
+
const elem = node.elements[0];
|
|
118322
118394
|
if (!isStringLiteralLike(elem.name))
|
|
118323
118395
|
return void 0;
|
|
118324
118396
|
if (elem.name.text !== "resolution-mode") {
|
|
118325
|
-
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118397
|
+
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118398
|
+
elem.name,
|
|
118399
|
+
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
|
|
118400
|
+
);
|
|
118326
118401
|
return void 0;
|
|
118327
118402
|
}
|
|
118328
118403
|
if (!isStringLiteralLike(elem.value))
|
|
@@ -120045,7 +120120,7 @@ ${lanes.join("\n")}
|
|
|
120045
120120
|
/*importClause*/
|
|
120046
120121
|
void 0,
|
|
120047
120122
|
externalHelpersModuleReference,
|
|
120048
|
-
/*
|
|
120123
|
+
/*attributes*/
|
|
120049
120124
|
void 0
|
|
120050
120125
|
);
|
|
120051
120126
|
addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */);
|
|
@@ -120521,14 +120596,6 @@ ${lanes.join("\n")}
|
|
|
120521
120596
|
const fileName = toFileNameLowerCase(ref.fileName);
|
|
120522
120597
|
resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective);
|
|
120523
120598
|
const mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
120524
|
-
if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) {
|
|
120525
|
-
(fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({
|
|
120526
|
-
kind: 2 /* ResolutionDiagnostics */,
|
|
120527
|
-
diagnostics: [
|
|
120528
|
-
createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext)
|
|
120529
|
-
]
|
|
120530
|
-
});
|
|
120531
|
-
}
|
|
120532
120599
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index });
|
|
120533
120600
|
}
|
|
120534
120601
|
}
|
|
@@ -121924,7 +121991,7 @@ ${lanes.join("\n")}
|
|
|
121924
121991
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
121925
121992
|
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,
|
|
121926
121993
|
Diagnostics.Duplicate_label_0.code,
|
|
121927
|
-
Diagnostics.
|
|
121994
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
121928
121995
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
121929
121996
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
121930
121997
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|
|
@@ -130455,7 +130522,7 @@ ${lanes.join("\n")}
|
|
|
130455
130522
|
void 0,
|
|
130456
130523
|
defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0,
|
|
130457
130524
|
typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,
|
|
130458
|
-
/*
|
|
130525
|
+
/*attributes*/
|
|
130459
130526
|
void 0
|
|
130460
130527
|
);
|
|
130461
130528
|
}
|
|
@@ -136222,7 +136289,7 @@ ${lanes.join("\n")}
|
|
|
136222
136289
|
}
|
|
136223
136290
|
case 205 /* ImportType */:
|
|
136224
136291
|
const importTypeNode = parent2;
|
|
136225
|
-
changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.
|
|
136292
|
+
changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf));
|
|
136226
136293
|
break;
|
|
136227
136294
|
default:
|
|
136228
136295
|
Debug.failBadSyntaxKind(parent2);
|
|
@@ -136506,7 +136573,7 @@ ${lanes.join("\n")}
|
|
|
136506
136573
|
elements && elements.length ? factory.createNamedImports(elements) : void 0
|
|
136507
136574
|
),
|
|
136508
136575
|
old.moduleSpecifier,
|
|
136509
|
-
/*
|
|
136576
|
+
/*attributes*/
|
|
136510
136577
|
void 0
|
|
136511
136578
|
);
|
|
136512
136579
|
}
|
|
@@ -137392,7 +137459,7 @@ ${lanes.join("\n")}
|
|
|
137392
137459
|
factory.createNamespaceImport(newNamespaceId)
|
|
137393
137460
|
),
|
|
137394
137461
|
newModuleString,
|
|
137395
|
-
/*
|
|
137462
|
+
/*attributes*/
|
|
137396
137463
|
void 0
|
|
137397
137464
|
);
|
|
137398
137465
|
case 271 /* ImportEqualsDeclaration */:
|
|
@@ -137681,7 +137748,7 @@ ${lanes.join("\n")}
|
|
|
137681
137748
|
void 0,
|
|
137682
137749
|
factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings),
|
|
137683
137750
|
getSynthesizedDeepClone(moduleSpecifier),
|
|
137684
|
-
/*
|
|
137751
|
+
/*attributes*/
|
|
137685
137752
|
void 0
|
|
137686
137753
|
) : void 0;
|
|
137687
137754
|
}
|
|
@@ -138005,7 +138072,7 @@ ${lanes.join("\n")}
|
|
|
138005
138072
|
continue;
|
|
138006
138073
|
}
|
|
138007
138074
|
if (length(updatedElements) < length(elements)) {
|
|
138008
|
-
changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.
|
|
138075
|
+
changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes));
|
|
138009
138076
|
}
|
|
138010
138077
|
}
|
|
138011
138078
|
}
|
|
@@ -148487,7 +148554,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148487
148554
|
false,
|
|
148488
148555
|
factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))),
|
|
148489
148556
|
exportDeclaration.moduleSpecifier,
|
|
148490
|
-
/*
|
|
148557
|
+
/*attributes*/
|
|
148491
148558
|
void 0
|
|
148492
148559
|
);
|
|
148493
148560
|
const typeExportDeclaration = factory.createExportDeclaration(
|
|
@@ -148497,7 +148564,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148497
148564
|
true,
|
|
148498
148565
|
factory.createNamedExports(typeExportSpecifiers),
|
|
148499
148566
|
exportDeclaration.moduleSpecifier,
|
|
148500
|
-
/*
|
|
148567
|
+
/*attributes*/
|
|
148501
148568
|
void 0
|
|
148502
148569
|
);
|
|
148503
148570
|
changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, {
|
|
@@ -148612,7 +148679,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148612
148679
|
true
|
|
148613
148680
|
),
|
|
148614
148681
|
getSynthesizedDeepClone(
|
|
148615
|
-
declaration.
|
|
148682
|
+
declaration.attributes,
|
|
148616
148683
|
/*includeTrivia*/
|
|
148617
148684
|
true
|
|
148618
148685
|
)
|
|
@@ -148640,7 +148707,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148640
148707
|
true
|
|
148641
148708
|
),
|
|
148642
148709
|
getSynthesizedDeepClone(
|
|
148643
|
-
declaration.
|
|
148710
|
+
declaration.attributes,
|
|
148644
148711
|
/*includeTrivia*/
|
|
148645
148712
|
true
|
|
148646
148713
|
)
|
|
@@ -148663,7 +148730,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148663
148730
|
true,
|
|
148664
148731
|
importClause.name,
|
|
148665
148732
|
newNamedBindings
|
|
148666
|
-
), declaration.moduleSpecifier, declaration.
|
|
148733
|
+
), declaration.moduleSpecifier, declaration.attributes);
|
|
148667
148734
|
changes.replaceNode(sourceFile, declaration, importDeclaration);
|
|
148668
148735
|
}
|
|
148669
148736
|
}
|
|
@@ -150186,7 +150253,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150186
150253
|
factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name))
|
|
150187
150254
|
),
|
|
150188
150255
|
quotedModuleSpecifier,
|
|
150189
|
-
/*
|
|
150256
|
+
/*attributes*/
|
|
150190
150257
|
void 0
|
|
150191
150258
|
);
|
|
150192
150259
|
statements = combine(statements, declaration);
|
|
@@ -150804,7 +150871,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150804
150871
|
)
|
|
150805
150872
|
),
|
|
150806
150873
|
node.moduleSpecifier,
|
|
150807
|
-
node.
|
|
150874
|
+
node.attributes
|
|
150808
150875
|
)
|
|
150809
150876
|
);
|
|
150810
150877
|
}
|
|
@@ -150821,7 +150888,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150821
150888
|
)),
|
|
150822
150889
|
/*moduleSpecifier*/
|
|
150823
150890
|
void 0,
|
|
150824
|
-
/*
|
|
150891
|
+
/*attributes*/
|
|
150825
150892
|
void 0
|
|
150826
150893
|
));
|
|
150827
150894
|
}
|
|
@@ -155792,7 +155859,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155792
155859
|
namedImports
|
|
155793
155860
|
),
|
|
155794
155861
|
required,
|
|
155795
|
-
/*
|
|
155862
|
+
/*attributes*/
|
|
155796
155863
|
void 0
|
|
155797
155864
|
)
|
|
155798
155865
|
);
|
|
@@ -155961,7 +156028,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155961
156028
|
const newTypeNode = factory.updateImportTypeNode(
|
|
155962
156029
|
importType,
|
|
155963
156030
|
importType.argument,
|
|
155964
|
-
importType.
|
|
156031
|
+
importType.attributes,
|
|
155965
156032
|
importType.qualifier,
|
|
155966
156033
|
importType.typeArguments,
|
|
155967
156034
|
/*isTypeOf*/
|
|
@@ -156229,7 +156296,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156229
156296
|
void 0
|
|
156230
156297
|
),
|
|
156231
156298
|
importDeclaration.moduleSpecifier,
|
|
156232
|
-
importDeclaration.
|
|
156299
|
+
importDeclaration.attributes
|
|
156233
156300
|
)
|
|
156234
156301
|
);
|
|
156235
156302
|
changes.insertNodeAfter(
|
|
@@ -156246,7 +156313,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156246
156313
|
importClause.namedBindings
|
|
156247
156314
|
),
|
|
156248
156315
|
importDeclaration.moduleSpecifier,
|
|
156249
|
-
importDeclaration.
|
|
156316
|
+
importDeclaration.attributes
|
|
156250
156317
|
)
|
|
156251
156318
|
);
|
|
156252
156319
|
}
|
|
@@ -165574,7 +165641,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165574
165641
|
/*importClause*/
|
|
165575
165642
|
void 0,
|
|
165576
165643
|
moduleSpecifier,
|
|
165577
|
-
/*
|
|
165644
|
+
/*attributes*/
|
|
165578
165645
|
void 0
|
|
165579
165646
|
));
|
|
165580
165647
|
} else {
|
|
@@ -165740,7 +165807,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165740
165807
|
exportDecl.isTypeOnly,
|
|
165741
165808
|
exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)),
|
|
165742
165809
|
exportDecl.moduleSpecifier,
|
|
165743
|
-
exportDecl.
|
|
165810
|
+
exportDecl.attributes
|
|
165744
165811
|
)
|
|
165745
165812
|
);
|
|
165746
165813
|
}
|
|
@@ -165772,7 +165839,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165772
165839
|
factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings),
|
|
165773
165840
|
// TODO: GH#18217
|
|
165774
165841
|
importDeclaration.moduleSpecifier,
|
|
165775
|
-
importDeclaration.
|
|
165842
|
+
importDeclaration.attributes
|
|
165776
165843
|
);
|
|
165777
165844
|
}
|
|
165778
165845
|
function sortSpecifiers(specifiers, comparer) {
|
|
@@ -166290,10 +166357,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166290
166357
|
return spanForParenthesizedExpression(n);
|
|
166291
166358
|
case 275 /* NamedImports */:
|
|
166292
166359
|
case 279 /* NamedExports */:
|
|
166360
|
+
case 300 /* ImportAttributes */:
|
|
166293
166361
|
case 300 /* AssertClause */:
|
|
166294
|
-
return
|
|
166362
|
+
return spanForImportExportElements(n);
|
|
166295
166363
|
}
|
|
166296
|
-
function
|
|
166364
|
+
function spanForImportExportElements(node) {
|
|
166297
166365
|
if (!node.elements.length) {
|
|
166298
166366
|
return void 0;
|
|
166299
166367
|
}
|
|
@@ -184912,7 +184980,7 @@ ${e.message}`;
|
|
|
184912
184980
|
getRenameLocation: () => getRenameLocation,
|
|
184913
184981
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
184914
184982
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
184915
|
-
|
|
184983
|
+
getResolutionModeOverride: () => getResolutionModeOverride,
|
|
184916
184984
|
getResolveJsonModule: () => getResolveJsonModule,
|
|
184917
184985
|
getResolvePackageJsonExports: () => getResolvePackageJsonExports,
|
|
184918
184986
|
getResolvePackageJsonImports: () => getResolvePackageJsonImports,
|
|
@@ -185044,6 +185112,7 @@ ${e.message}`;
|
|
|
185044
185112
|
hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
|
|
185045
185113
|
hasQuestionToken: () => hasQuestionToken,
|
|
185046
185114
|
hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
|
|
185115
|
+
hasResolutionModeOverride: () => hasResolutionModeOverride,
|
|
185047
185116
|
hasRestParameter: () => hasRestParameter,
|
|
185048
185117
|
hasScopeMarker: () => hasScopeMarker,
|
|
185049
185118
|
hasStaticModifier: () => hasStaticModifier,
|
|
@@ -185117,7 +185186,6 @@ ${e.message}`;
|
|
|
185117
185186
|
isAssertClause: () => isAssertClause,
|
|
185118
185187
|
isAssertEntry: () => isAssertEntry,
|
|
185119
185188
|
isAssertionExpression: () => isAssertionExpression,
|
|
185120
|
-
isAssertionKey: () => isAssertionKey,
|
|
185121
185189
|
isAssertsKeyword: () => isAssertsKeyword,
|
|
185122
185190
|
isAssignmentDeclaration: () => isAssignmentDeclaration,
|
|
185123
185191
|
isAssignmentExpression: () => isAssignmentExpression,
|
|
@@ -185327,6 +185395,9 @@ ${e.message}`;
|
|
|
185327
185395
|
isIfStatement: () => isIfStatement,
|
|
185328
185396
|
isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
|
|
185329
185397
|
isImplicitGlob: () => isImplicitGlob,
|
|
185398
|
+
isImportAttribute: () => isImportAttribute,
|
|
185399
|
+
isImportAttributeName: () => isImportAttributeName,
|
|
185400
|
+
isImportAttributes: () => isImportAttributes,
|
|
185330
185401
|
isImportCall: () => isImportCall,
|
|
185331
185402
|
isImportClause: () => isImportClause,
|
|
185332
185403
|
isImportDeclaration: () => isImportDeclaration,
|
|
@@ -185518,7 +185589,6 @@ ${e.message}`;
|
|
|
185518
185589
|
isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
|
|
185519
185590
|
isNewExpression: () => isNewExpression,
|
|
185520
185591
|
isNewExpressionTarget: () => isNewExpressionTarget,
|
|
185521
|
-
isNightly: () => isNightly,
|
|
185522
185592
|
isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
|
|
185523
185593
|
isNode: () => isNode,
|
|
185524
185594
|
isNodeArray: () => isNodeArray,
|
|
@@ -187319,7 +187389,7 @@ ${e.message}`;
|
|
|
187319
187389
|
getRenameLocation: () => getRenameLocation,
|
|
187320
187390
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
187321
187391
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
187322
|
-
|
|
187392
|
+
getResolutionModeOverride: () => getResolutionModeOverride,
|
|
187323
187393
|
getResolveJsonModule: () => getResolveJsonModule,
|
|
187324
187394
|
getResolvePackageJsonExports: () => getResolvePackageJsonExports,
|
|
187325
187395
|
getResolvePackageJsonImports: () => getResolvePackageJsonImports,
|
|
@@ -187451,6 +187521,7 @@ ${e.message}`;
|
|
|
187451
187521
|
hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
|
|
187452
187522
|
hasQuestionToken: () => hasQuestionToken,
|
|
187453
187523
|
hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
|
|
187524
|
+
hasResolutionModeOverride: () => hasResolutionModeOverride,
|
|
187454
187525
|
hasRestParameter: () => hasRestParameter,
|
|
187455
187526
|
hasScopeMarker: () => hasScopeMarker,
|
|
187456
187527
|
hasStaticModifier: () => hasStaticModifier,
|
|
@@ -187524,7 +187595,6 @@ ${e.message}`;
|
|
|
187524
187595
|
isAssertClause: () => isAssertClause,
|
|
187525
187596
|
isAssertEntry: () => isAssertEntry,
|
|
187526
187597
|
isAssertionExpression: () => isAssertionExpression,
|
|
187527
|
-
isAssertionKey: () => isAssertionKey,
|
|
187528
187598
|
isAssertsKeyword: () => isAssertsKeyword,
|
|
187529
187599
|
isAssignmentDeclaration: () => isAssignmentDeclaration,
|
|
187530
187600
|
isAssignmentExpression: () => isAssignmentExpression,
|
|
@@ -187734,6 +187804,9 @@ ${e.message}`;
|
|
|
187734
187804
|
isIfStatement: () => isIfStatement,
|
|
187735
187805
|
isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
|
|
187736
187806
|
isImplicitGlob: () => isImplicitGlob,
|
|
187807
|
+
isImportAttribute: () => isImportAttribute,
|
|
187808
|
+
isImportAttributeName: () => isImportAttributeName,
|
|
187809
|
+
isImportAttributes: () => isImportAttributes,
|
|
187737
187810
|
isImportCall: () => isImportCall,
|
|
187738
187811
|
isImportClause: () => isImportClause,
|
|
187739
187812
|
isImportDeclaration: () => isImportDeclaration,
|
|
@@ -187925,7 +187998,6 @@ ${e.message}`;
|
|
|
187925
187998
|
isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
|
|
187926
187999
|
isNewExpression: () => isNewExpression,
|
|
187927
188000
|
isNewExpressionTarget: () => isNewExpressionTarget,
|
|
187928
|
-
isNightly: () => isNightly,
|
|
187929
188001
|
isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
|
|
187930
188002
|
isNode: () => isNode,
|
|
187931
188003
|
isNodeArray: () => isNodeArray,
|