typescript 5.3.0-dev.20230926 → 5.3.0-dev.20230928
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/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230928`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2773,8 +2773,10 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
2773
2773
|
SyntaxKind4[SyntaxKind4["DefaultClause"] = 297] = "DefaultClause";
|
|
2774
2774
|
SyntaxKind4[SyntaxKind4["HeritageClause"] = 298] = "HeritageClause";
|
|
2775
2775
|
SyntaxKind4[SyntaxKind4["CatchClause"] = 299] = "CatchClause";
|
|
2776
|
-
SyntaxKind4[SyntaxKind4["
|
|
2777
|
-
SyntaxKind4[SyntaxKind4["
|
|
2776
|
+
SyntaxKind4[SyntaxKind4["ImportAttributes"] = 300] = "ImportAttributes";
|
|
2777
|
+
SyntaxKind4[SyntaxKind4["ImportAttribute"] = 301] = "ImportAttribute";
|
|
2778
|
+
SyntaxKind4[SyntaxKind4["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause";
|
|
2779
|
+
SyntaxKind4[SyntaxKind4["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry";
|
|
2778
2780
|
SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer";
|
|
2779
2781
|
SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment";
|
|
2780
2782
|
SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
|
|
@@ -5431,9 +5433,8 @@ var Diagnostics = {
|
|
|
5431
5433
|
_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."),
|
|
5432
5434
|
_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."),
|
|
5433
5435
|
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."),
|
|
5434
|
-
|
|
5436
|
+
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"),
|
|
5435
5437
|
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"),
|
|
5436
|
-
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`."),
|
|
5437
5438
|
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`."),
|
|
5438
5439
|
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."),
|
|
5439
5440
|
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."),
|
|
@@ -5443,6 +5444,8 @@ var Diagnostics = {
|
|
|
5443
5444
|
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"`),
|
|
5444
5445
|
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"`),
|
|
5445
5446
|
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"),
|
|
5447
|
+
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."),
|
|
5448
|
+
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'."),
|
|
5446
5449
|
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."),
|
|
5447
5450
|
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."),
|
|
5448
5451
|
catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -5469,6 +5472,7 @@ var Diagnostics = {
|
|
|
5469
5472
|
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."),
|
|
5470
5473
|
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."),
|
|
5471
5474
|
_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."),
|
|
5475
|
+
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."),
|
|
5472
5476
|
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."),
|
|
5473
5477
|
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."),
|
|
5474
5478
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -5998,15 +6002,15 @@ var Diagnostics = {
|
|
|
5998
6002
|
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}'?"),
|
|
5999
6003
|
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'."),
|
|
6000
6004
|
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."),
|
|
6005
|
+
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'."),
|
|
6001
6006
|
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}'?"),
|
|
6002
6007
|
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."),
|
|
6003
6008
|
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}'?"),
|
|
6004
|
-
|
|
6009
|
+
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."),
|
|
6005
6010
|
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."),
|
|
6006
6011
|
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."),
|
|
6007
6012
|
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."),
|
|
6008
6013
|
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"),
|
|
6009
|
-
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'."),
|
|
6010
6014
|
_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?"),
|
|
6011
6015
|
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."),
|
|
6012
6016
|
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."),
|
|
@@ -6020,6 +6024,10 @@ var Diagnostics = {
|
|
|
6020
6024
|
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."),
|
|
6021
6025
|
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."),
|
|
6022
6026
|
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."),
|
|
6027
|
+
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."),
|
|
6028
|
+
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."),
|
|
6029
|
+
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."),
|
|
6030
|
+
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}'."),
|
|
6023
6031
|
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}'."),
|
|
6024
6032
|
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}'."),
|
|
6025
6033
|
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}'."),
|
|
@@ -6128,7 +6136,6 @@ var Diagnostics = {
|
|
|
6128
6136
|
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}'."),
|
|
6129
6137
|
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}'?"),
|
|
6130
6138
|
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'."),
|
|
6131
|
-
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'."),
|
|
6132
6139
|
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."),
|
|
6133
6140
|
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."),
|
|
6134
6141
|
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}'."),
|
|
@@ -9675,7 +9682,7 @@ function isTemplateMiddleOrTemplateTail(node) {
|
|
|
9675
9682
|
const kind = node.kind;
|
|
9676
9683
|
return kind === 17 /* TemplateMiddle */ || kind === 18 /* TemplateTail */;
|
|
9677
9684
|
}
|
|
9678
|
-
function
|
|
9685
|
+
function isImportAttributeName(node) {
|
|
9679
9686
|
return isStringLiteral(node) || isIdentifier(node);
|
|
9680
9687
|
}
|
|
9681
9688
|
function isGeneratedIdentifier(node) {
|
|
@@ -12575,6 +12582,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12575
12582
|
updateAssertEntry,
|
|
12576
12583
|
createImportTypeAssertionContainer,
|
|
12577
12584
|
updateImportTypeAssertionContainer,
|
|
12585
|
+
createImportAttributes,
|
|
12586
|
+
updateImportAttributes,
|
|
12587
|
+
createImportAttribute,
|
|
12588
|
+
updateImportAttribute,
|
|
12578
12589
|
createNamespaceImport,
|
|
12579
12590
|
updateNamespaceImport,
|
|
12580
12591
|
createNamespaceExport,
|
|
@@ -13843,18 +13854,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13843
13854
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
13844
13855
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
13845
13856
|
}
|
|
13846
|
-
function createImportTypeNode(argument,
|
|
13857
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
13847
13858
|
const node = createBaseNode(205 /* ImportType */);
|
|
13848
13859
|
node.argument = argument;
|
|
13849
|
-
node.
|
|
13860
|
+
node.attributes = attributes;
|
|
13861
|
+
if (node.assertions && node.assertions.assertClause && node.attributes) {
|
|
13862
|
+
node.assertions.assertClause = node.attributes;
|
|
13863
|
+
}
|
|
13850
13864
|
node.qualifier = qualifier;
|
|
13851
13865
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
13852
13866
|
node.isTypeOf = isTypeOf;
|
|
13853
13867
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13854
13868
|
return node;
|
|
13855
13869
|
}
|
|
13856
|
-
function updateImportTypeNode(node, argument,
|
|
13857
|
-
return node.argument !== argument || node.
|
|
13870
|
+
function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
|
|
13871
|
+
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;
|
|
13858
13872
|
}
|
|
13859
13873
|
function createParenthesizedType(type) {
|
|
13860
13874
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -14984,19 +14998,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14984
14998
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
14985
14999
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
14986
15000
|
}
|
|
14987
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
15001
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
14988
15002
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
14989
15003
|
node.modifiers = asNodeArray(modifiers);
|
|
14990
15004
|
node.importClause = importClause;
|
|
14991
15005
|
node.moduleSpecifier = moduleSpecifier;
|
|
14992
|
-
node.assertClause =
|
|
15006
|
+
node.attributes = node.assertClause = attributes;
|
|
14993
15007
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14994
15008
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14995
15009
|
node.jsDoc = void 0;
|
|
14996
15010
|
return node;
|
|
14997
15011
|
}
|
|
14998
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
14999
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15012
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
|
|
15013
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
|
|
15000
15014
|
}
|
|
15001
15015
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
15002
15016
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -15017,6 +15031,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15017
15031
|
const node = createBaseNode(300 /* AssertClause */);
|
|
15018
15032
|
node.elements = createNodeArray(elements);
|
|
15019
15033
|
node.multiLine = multiLine;
|
|
15034
|
+
node.token = 132 /* AssertKeyword */;
|
|
15020
15035
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15021
15036
|
return node;
|
|
15022
15037
|
}
|
|
@@ -15042,6 +15057,27 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15042
15057
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
15043
15058
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
15044
15059
|
}
|
|
15060
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
15061
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
15062
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
15063
|
+
node.elements = createNodeArray(elements);
|
|
15064
|
+
node.multiLine = multiLine;
|
|
15065
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15066
|
+
return node;
|
|
15067
|
+
}
|
|
15068
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
15069
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
15070
|
+
}
|
|
15071
|
+
function createImportAttribute(name, value) {
|
|
15072
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
15073
|
+
node.name = name;
|
|
15074
|
+
node.value = value;
|
|
15075
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15076
|
+
return node;
|
|
15077
|
+
}
|
|
15078
|
+
function updateImportAttribute(node, name, value) {
|
|
15079
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
15080
|
+
}
|
|
15045
15081
|
function createNamespaceImport(name) {
|
|
15046
15082
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
15047
15083
|
node.name = name;
|
|
@@ -15102,20 +15138,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15102
15138
|
function updateExportAssignment(node, modifiers, expression) {
|
|
15103
15139
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node;
|
|
15104
15140
|
}
|
|
15105
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15141
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15106
15142
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
15107
15143
|
node.modifiers = asNodeArray(modifiers);
|
|
15108
15144
|
node.isTypeOnly = isTypeOnly;
|
|
15109
15145
|
node.exportClause = exportClause;
|
|
15110
15146
|
node.moduleSpecifier = moduleSpecifier;
|
|
15111
|
-
node.assertClause =
|
|
15147
|
+
node.attributes = node.assertClause = attributes;
|
|
15112
15148
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15113
15149
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15114
15150
|
node.jsDoc = void 0;
|
|
15115
15151
|
return node;
|
|
15116
15152
|
}
|
|
15117
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15118
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15153
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15154
|
+
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;
|
|
15119
15155
|
}
|
|
15120
15156
|
function finishUpdateExportDeclaration(updated, original) {
|
|
15121
15157
|
if (updated !== original) {
|
|
@@ -16442,7 +16478,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16442
16478
|
} else {
|
|
16443
16479
|
modifierArray = modifiers;
|
|
16444
16480
|
}
|
|
16445
|
-
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) ? updatePropertyDeclaration(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.
|
|
16481
|
+
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) ? updatePropertyDeclaration(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);
|
|
16446
16482
|
}
|
|
16447
16483
|
function updateModifierLike(node, modifierArray) {
|
|
16448
16484
|
return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration(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);
|
|
@@ -17170,14 +17206,14 @@ function isImportDeclaration(node) {
|
|
|
17170
17206
|
function isImportClause(node) {
|
|
17171
17207
|
return node.kind === 273 /* ImportClause */;
|
|
17172
17208
|
}
|
|
17173
|
-
function isImportTypeAssertionContainer(node) {
|
|
17174
|
-
return node.kind === 302 /* ImportTypeAssertionContainer */;
|
|
17175
|
-
}
|
|
17176
17209
|
function isAssertClause(node) {
|
|
17177
17210
|
return node.kind === 300 /* AssertClause */;
|
|
17178
17211
|
}
|
|
17179
|
-
function
|
|
17180
|
-
return node.kind ===
|
|
17212
|
+
function isImportAttributes(node) {
|
|
17213
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
17214
|
+
}
|
|
17215
|
+
function isImportAttribute(node) {
|
|
17216
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
17181
17217
|
}
|
|
17182
17218
|
function isImportSpecifier(node) {
|
|
17183
17219
|
return node.kind === 276 /* ImportSpecifier */;
|
|
@@ -17755,7 +17791,7 @@ var forEachChildTable = {
|
|
|
17755
17791
|
return visitNode2(cbNode, node.typeParameter);
|
|
17756
17792
|
},
|
|
17757
17793
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
17758
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
17794
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
17759
17795
|
},
|
|
17760
17796
|
[302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {
|
|
17761
17797
|
return visitNode2(cbNode, node.assertClause);
|
|
@@ -17929,15 +17965,15 @@ var forEachChildTable = {
|
|
|
17929
17965
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
17930
17966
|
},
|
|
17931
17967
|
[272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
17932
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
17968
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17933
17969
|
},
|
|
17934
17970
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
17935
17971
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
17936
17972
|
},
|
|
17937
|
-
[300 /*
|
|
17973
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
17938
17974
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
17939
17975
|
},
|
|
17940
|
-
[301 /*
|
|
17976
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
17941
17977
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
17942
17978
|
},
|
|
17943
17979
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -17952,7 +17988,7 @@ var forEachChildTable = {
|
|
|
17952
17988
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
17953
17989
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
17954
17990
|
[278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
17955
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
17991
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17956
17992
|
},
|
|
17957
17993
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
17958
17994
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -19161,7 +19197,7 @@ var Parser;
|
|
|
19161
19197
|
function isLiteralPropertyName() {
|
|
19162
19198
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
19163
19199
|
}
|
|
19164
|
-
function
|
|
19200
|
+
function isImportAttributeName2() {
|
|
19165
19201
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
19166
19202
|
}
|
|
19167
19203
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -19280,8 +19316,8 @@ var Parser;
|
|
|
19280
19316
|
return isLiteralPropertyName();
|
|
19281
19317
|
case 9 /* ObjectBindingElements */:
|
|
19282
19318
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
19283
|
-
case 24 /*
|
|
19284
|
-
return
|
|
19319
|
+
case 24 /* ImportAttributes */:
|
|
19320
|
+
return isImportAttributeName2();
|
|
19285
19321
|
case 7 /* HeritageClauseElement */:
|
|
19286
19322
|
if (token() === 19 /* OpenBraceToken */) {
|
|
19287
19323
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -19384,7 +19420,7 @@ var Parser;
|
|
|
19384
19420
|
case 12 /* ObjectLiteralMembers */:
|
|
19385
19421
|
case 9 /* ObjectBindingElements */:
|
|
19386
19422
|
case 23 /* ImportOrExportSpecifiers */:
|
|
19387
|
-
case 24 /*
|
|
19423
|
+
case 24 /* ImportAttributes */:
|
|
19388
19424
|
return token() === 20 /* CloseBraceToken */;
|
|
19389
19425
|
case 3 /* SwitchClauseStatements */:
|
|
19390
19426
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -19690,7 +19726,7 @@ var Parser;
|
|
|
19690
19726
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19691
19727
|
case 14 /* JsxChildren */:
|
|
19692
19728
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19693
|
-
case 24 /*
|
|
19729
|
+
case 24 /* ImportAttributes */:
|
|
19694
19730
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
19695
19731
|
case 25 /* JSDocComment */:
|
|
19696
19732
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -20565,28 +20601,6 @@ var Parser;
|
|
|
20565
20601
|
nextToken();
|
|
20566
20602
|
return token() === 102 /* ImportKeyword */;
|
|
20567
20603
|
}
|
|
20568
|
-
function parseImportTypeAssertions() {
|
|
20569
|
-
const pos = getNodePos();
|
|
20570
|
-
const openBracePosition = scanner.getTokenStart();
|
|
20571
|
-
parseExpected(19 /* OpenBraceToken */);
|
|
20572
|
-
const multiLine = scanner.hasPrecedingLineBreak();
|
|
20573
|
-
parseExpected(132 /* AssertKeyword */);
|
|
20574
|
-
parseExpected(59 /* ColonToken */);
|
|
20575
|
-
const clause = parseAssertClause(
|
|
20576
|
-
/*skipAssertKeyword*/
|
|
20577
|
-
true
|
|
20578
|
-
);
|
|
20579
|
-
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
20580
|
-
const lastError = lastOrUndefined(parseDiagnostics);
|
|
20581
|
-
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
20582
|
-
addRelatedInfo(
|
|
20583
|
-
lastError,
|
|
20584
|
-
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
20585
|
-
);
|
|
20586
|
-
}
|
|
20587
|
-
}
|
|
20588
|
-
return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos);
|
|
20589
|
-
}
|
|
20590
20604
|
function parseImportType() {
|
|
20591
20605
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
20592
20606
|
const pos = getNodePos();
|
|
@@ -20594,14 +20608,36 @@ var Parser;
|
|
|
20594
20608
|
parseExpected(102 /* ImportKeyword */);
|
|
20595
20609
|
parseExpected(21 /* OpenParenToken */);
|
|
20596
20610
|
const type = parseType();
|
|
20597
|
-
let
|
|
20611
|
+
let attributes;
|
|
20598
20612
|
if (parseOptional(28 /* CommaToken */)) {
|
|
20599
|
-
|
|
20613
|
+
const openBracePosition = scanner.getTokenStart();
|
|
20614
|
+
parseExpected(19 /* OpenBraceToken */);
|
|
20615
|
+
const currentToken2 = token();
|
|
20616
|
+
if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {
|
|
20617
|
+
nextToken();
|
|
20618
|
+
} else {
|
|
20619
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
20620
|
+
}
|
|
20621
|
+
parseExpected(59 /* ColonToken */);
|
|
20622
|
+
attributes = parseImportAttributes(
|
|
20623
|
+
currentToken2,
|
|
20624
|
+
/*skipKeyword*/
|
|
20625
|
+
true
|
|
20626
|
+
);
|
|
20627
|
+
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
20628
|
+
const lastError = lastOrUndefined(parseDiagnostics);
|
|
20629
|
+
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
20630
|
+
addRelatedInfo(
|
|
20631
|
+
lastError,
|
|
20632
|
+
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
20633
|
+
);
|
|
20634
|
+
}
|
|
20635
|
+
}
|
|
20600
20636
|
}
|
|
20601
20637
|
parseExpected(22 /* CloseParenToken */);
|
|
20602
20638
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
20603
20639
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
20604
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
20640
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
20605
20641
|
}
|
|
20606
20642
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
20607
20643
|
nextToken();
|
|
@@ -23663,15 +23699,16 @@ var Parser;
|
|
|
23663
23699
|
parseExpected(161 /* FromKeyword */);
|
|
23664
23700
|
}
|
|
23665
23701
|
const moduleSpecifier = parseModuleSpecifier();
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23702
|
+
const currentToken2 = token();
|
|
23703
|
+
let attributes;
|
|
23704
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23705
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23669
23706
|
}
|
|
23670
23707
|
parseSemicolon();
|
|
23671
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
23708
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
23672
23709
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23673
23710
|
}
|
|
23674
|
-
function
|
|
23711
|
+
function parseImportAttribute() {
|
|
23675
23712
|
const pos = getNodePos();
|
|
23676
23713
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
23677
23714
|
parseExpected(59 /* ColonToken */);
|
|
@@ -23679,19 +23716,19 @@ var Parser;
|
|
|
23679
23716
|
/*allowReturnTypeInArrowFunction*/
|
|
23680
23717
|
true
|
|
23681
23718
|
);
|
|
23682
|
-
return finishNode(factory2.
|
|
23719
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
23683
23720
|
}
|
|
23684
|
-
function
|
|
23721
|
+
function parseImportAttributes(token2, skipKeyword) {
|
|
23685
23722
|
const pos = getNodePos();
|
|
23686
|
-
if (!
|
|
23687
|
-
parseExpected(
|
|
23723
|
+
if (!skipKeyword) {
|
|
23724
|
+
parseExpected(token2);
|
|
23688
23725
|
}
|
|
23689
23726
|
const openBracePosition = scanner.getTokenStart();
|
|
23690
23727
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
23691
23728
|
const multiLine = scanner.hasPrecedingLineBreak();
|
|
23692
23729
|
const elements = parseDelimitedList(
|
|
23693
|
-
24 /*
|
|
23694
|
-
|
|
23730
|
+
24 /* ImportAttributes */,
|
|
23731
|
+
parseImportAttribute,
|
|
23695
23732
|
/*considerSemicolonAsDelimiter*/
|
|
23696
23733
|
true
|
|
23697
23734
|
);
|
|
@@ -23704,7 +23741,7 @@ var Parser;
|
|
|
23704
23741
|
);
|
|
23705
23742
|
}
|
|
23706
23743
|
}
|
|
23707
|
-
return finishNode(factory2.
|
|
23744
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
23708
23745
|
} else {
|
|
23709
23746
|
const elements = createNodeArray(
|
|
23710
23747
|
[],
|
|
@@ -23714,10 +23751,11 @@ var Parser;
|
|
|
23714
23751
|
/*hasTrailingComma*/
|
|
23715
23752
|
false
|
|
23716
23753
|
);
|
|
23717
|
-
return finishNode(factory2.
|
|
23754
|
+
return finishNode(factory2.createImportAttributes(
|
|
23718
23755
|
elements,
|
|
23719
23756
|
/*multiLine*/
|
|
23720
|
-
false
|
|
23757
|
+
false,
|
|
23758
|
+
token2
|
|
23721
23759
|
), pos);
|
|
23722
23760
|
}
|
|
23723
23761
|
}
|
|
@@ -23849,7 +23887,7 @@ var Parser;
|
|
|
23849
23887
|
);
|
|
23850
23888
|
let exportClause;
|
|
23851
23889
|
let moduleSpecifier;
|
|
23852
|
-
let
|
|
23890
|
+
let attributes;
|
|
23853
23891
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
23854
23892
|
const namespaceExportPos = getNodePos();
|
|
23855
23893
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -23865,12 +23903,13 @@ var Parser;
|
|
|
23865
23903
|
moduleSpecifier = parseModuleSpecifier();
|
|
23866
23904
|
}
|
|
23867
23905
|
}
|
|
23868
|
-
|
|
23869
|
-
|
|
23906
|
+
const currentToken2 = token();
|
|
23907
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23908
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23870
23909
|
}
|
|
23871
23910
|
parseSemicolon();
|
|
23872
23911
|
setAwaitContext(savedAwaitContext);
|
|
23873
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
23912
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
23874
23913
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23875
23914
|
}
|
|
23876
23915
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -23920,7 +23959,7 @@ var Parser;
|
|
|
23920
23959
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
23921
23960
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
23922
23961
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
23923
|
-
ParsingContext2[ParsingContext2["
|
|
23962
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
23924
23963
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
23925
23964
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
23926
23965
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -27513,11 +27552,19 @@ function getNodeResolutionFeatures(options) {
|
|
|
27513
27552
|
return features;
|
|
27514
27553
|
}
|
|
27515
27554
|
function getConditions(options, esmMode) {
|
|
27516
|
-
const
|
|
27555
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
27556
|
+
if (esmMode === void 0) {
|
|
27557
|
+
if (moduleResolution === 100 /* Bundler */) {
|
|
27558
|
+
esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
|
|
27559
|
+
} else if (moduleResolution === 2 /* Node10 */) {
|
|
27560
|
+
return [];
|
|
27561
|
+
}
|
|
27562
|
+
}
|
|
27563
|
+
const conditions = esmMode ? ["import"] : ["require"];
|
|
27517
27564
|
if (!options.noDtsResolution) {
|
|
27518
27565
|
conditions.push("types");
|
|
27519
27566
|
}
|
|
27520
|
-
if (
|
|
27567
|
+
if (moduleResolution !== 100 /* Bundler */) {
|
|
27521
27568
|
conditions.push("node");
|
|
27522
27569
|
}
|
|
27523
27570
|
return concatenate(conditions, options.customConditions);
|
|
@@ -27574,13 +27621,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27574
27621
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
27575
27622
|
break;
|
|
27576
27623
|
case 2 /* Node10 */:
|
|
27577
|
-
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27624
|
+
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
27578
27625
|
break;
|
|
27579
27626
|
case 1 /* Classic */:
|
|
27580
27627
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27581
27628
|
break;
|
|
27582
27629
|
case 100 /* Bundler */:
|
|
27583
|
-
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27630
|
+
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
27584
27631
|
break;
|
|
27585
27632
|
default:
|
|
27586
27633
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
@@ -27745,7 +27792,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
27745
27792
|
resolutionMode
|
|
27746
27793
|
);
|
|
27747
27794
|
}
|
|
27748
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27795
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {
|
|
27749
27796
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
27750
27797
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
27751
27798
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
@@ -27762,7 +27809,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile,
|
|
|
27762
27809
|
extensions,
|
|
27763
27810
|
/*isConfigLookup*/
|
|
27764
27811
|
false,
|
|
27765
|
-
redirectedReference
|
|
27812
|
+
redirectedReference,
|
|
27813
|
+
conditions
|
|
27766
27814
|
);
|
|
27767
27815
|
}
|
|
27768
27816
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
@@ -27778,10 +27826,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
27778
27826
|
/*isConfigLookup*/
|
|
27779
27827
|
false,
|
|
27780
27828
|
/*redirectedReference*/
|
|
27829
|
+
void 0,
|
|
27830
|
+
/*conditions*/
|
|
27781
27831
|
void 0
|
|
27782
27832
|
);
|
|
27783
27833
|
}
|
|
27784
|
-
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
27834
|
+
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {
|
|
27785
27835
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
27786
27836
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
27787
27837
|
if (getResolveJsonModule(compilerOptions)) {
|
|
@@ -27797,10 +27847,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
27797
27847
|
extensions,
|
|
27798
27848
|
/*isConfigLookup*/
|
|
27799
27849
|
false,
|
|
27800
|
-
redirectedReference
|
|
27850
|
+
redirectedReference,
|
|
27851
|
+
conditions
|
|
27801
27852
|
);
|
|
27802
27853
|
}
|
|
27803
|
-
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
27854
|
+
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {
|
|
27804
27855
|
let extensions;
|
|
27805
27856
|
if (isConfigLookup) {
|
|
27806
27857
|
extensions = 8 /* Json */;
|
|
@@ -27811,14 +27862,18 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
27811
27862
|
} else {
|
|
27812
27863
|
extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
27813
27864
|
}
|
|
27814
|
-
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
27865
|
+
return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
|
|
27815
27866
|
}
|
|
27816
|
-
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
27867
|
+
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
|
|
27817
27868
|
var _a, _b, _c, _d;
|
|
27818
27869
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
27819
27870
|
const failedLookupLocations = [];
|
|
27820
27871
|
const affectingLocations = [];
|
|
27821
|
-
const
|
|
27872
|
+
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
27873
|
+
conditions ?? (conditions = getConditions(
|
|
27874
|
+
compilerOptions,
|
|
27875
|
+
moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
|
|
27876
|
+
));
|
|
27822
27877
|
const diagnostics = [];
|
|
27823
27878
|
const state = {
|
|
27824
27879
|
compilerOptions,
|
|
@@ -27828,17 +27883,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27828
27883
|
affectingLocations,
|
|
27829
27884
|
packageJsonInfoCache: cache,
|
|
27830
27885
|
features,
|
|
27831
|
-
conditions,
|
|
27886
|
+
conditions: conditions ?? emptyArray,
|
|
27832
27887
|
requestContainingDirectory: containingDirectory,
|
|
27833
27888
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
27834
27889
|
isConfigLookup,
|
|
27835
27890
|
candidateIsFromPackageJsonField: false
|
|
27836
27891
|
};
|
|
27837
|
-
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(
|
|
27838
|
-
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
27892
|
+
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
27893
|
+
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
|
|
27839
27894
|
}
|
|
27840
27895
|
let result;
|
|
27841
|
-
if (
|
|
27896
|
+
if (moduleResolution === 2 /* Node10 */) {
|
|
27842
27897
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
27843
27898
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
27844
27899
|
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
@@ -27846,7 +27901,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27846
27901
|
result = tryResolve(extensions, state);
|
|
27847
27902
|
}
|
|
27848
27903
|
let legacyResult;
|
|
27849
|
-
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")) {
|
|
27904
|
+
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"))) {
|
|
27850
27905
|
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
27851
27906
|
const diagnosticState = {
|
|
27852
27907
|
...state,
|
|
@@ -28506,7 +28561,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28506
28561
|
extensions,
|
|
28507
28562
|
/*isConfigLookup*/
|
|
28508
28563
|
false,
|
|
28509
|
-
redirectedReference
|
|
28564
|
+
redirectedReference,
|
|
28565
|
+
state.conditions
|
|
28510
28566
|
);
|
|
28511
28567
|
return toSearchResult(
|
|
28512
28568
|
result.resolvedModule ? {
|
|
@@ -29646,7 +29702,7 @@ var visitEachChildTable = {
|
|
|
29646
29702
|
return context.factory.updateImportTypeNode(
|
|
29647
29703
|
node,
|
|
29648
29704
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
29649
|
-
nodeVisitor(node.
|
|
29705
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes),
|
|
29650
29706
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
29651
29707
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
29652
29708
|
node.isTypeOf
|
|
@@ -30197,20 +30253,20 @@ var visitEachChildTable = {
|
|
|
30197
30253
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
30198
30254
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
30199
30255
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
30200
|
-
nodeVisitor(node.
|
|
30256
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30201
30257
|
);
|
|
30202
30258
|
},
|
|
30203
|
-
[300 /*
|
|
30204
|
-
return context.factory.
|
|
30259
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
30260
|
+
return context.factory.updateImportAttributes(
|
|
30205
30261
|
node,
|
|
30206
|
-
nodesVisitor(node.elements, visitor,
|
|
30262
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
30207
30263
|
node.multiLine
|
|
30208
30264
|
);
|
|
30209
30265
|
},
|
|
30210
|
-
[301 /*
|
|
30211
|
-
return context.factory.
|
|
30266
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
30267
|
+
return context.factory.updateImportAttribute(
|
|
30212
30268
|
node,
|
|
30213
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
30269
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
30214
30270
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
30215
30271
|
);
|
|
30216
30272
|
},
|
|
@@ -30262,7 +30318,7 @@ var visitEachChildTable = {
|
|
|
30262
30318
|
node.isTypeOnly,
|
|
30263
30319
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
30264
30320
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
30265
|
-
nodeVisitor(node.
|
|
30321
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30266
30322
|
);
|
|
30267
30323
|
},
|
|
30268
30324
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -30823,7 +30879,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
30823
30879
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
30824
30880
|
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,
|
|
30825
30881
|
Diagnostics.Duplicate_label_0.code,
|
|
30826
|
-
Diagnostics.
|
|
30882
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
30827
30883
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
30828
30884
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
30829
30885
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|