@typescript-deploys/pr-build 5.3.0-pr-55880-5 → 5.3.0-pr-55887-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es5.d.ts +9 -1
- package/lib/tsc.js +424 -311
- package/lib/tsserver.js +468 -341
- package/lib/typescript.d.ts +51 -29
- package/lib/typescript.js +463 -338
- package/lib/typingsInstaller.js +166 -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-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230927`;
|
|
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) {
|
|
@@ -11079,6 +11086,7 @@ function Symbol4(flags, name) {
|
|
|
11079
11086
|
this.exportSymbol = void 0;
|
|
11080
11087
|
this.constEnumOnlyModule = void 0;
|
|
11081
11088
|
this.isReferenced = void 0;
|
|
11089
|
+
this.isInitialized = void 0;
|
|
11082
11090
|
this.isAssigned = void 0;
|
|
11083
11091
|
this.links = void 0;
|
|
11084
11092
|
}
|
|
@@ -12575,6 +12583,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12575
12583
|
updateAssertEntry,
|
|
12576
12584
|
createImportTypeAssertionContainer,
|
|
12577
12585
|
updateImportTypeAssertionContainer,
|
|
12586
|
+
createImportAttributes,
|
|
12587
|
+
updateImportAttributes,
|
|
12588
|
+
createImportAttribute,
|
|
12589
|
+
updateImportAttribute,
|
|
12578
12590
|
createNamespaceImport,
|
|
12579
12591
|
updateNamespaceImport,
|
|
12580
12592
|
createNamespaceExport,
|
|
@@ -13843,18 +13855,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13843
13855
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
13844
13856
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
13845
13857
|
}
|
|
13846
|
-
function createImportTypeNode(argument,
|
|
13858
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
13847
13859
|
const node = createBaseNode(205 /* ImportType */);
|
|
13848
13860
|
node.argument = argument;
|
|
13849
|
-
node.
|
|
13861
|
+
node.attributes = attributes;
|
|
13862
|
+
if (node.assertions && node.assertions.assertClause && node.attributes) {
|
|
13863
|
+
node.assertions.assertClause = node.attributes;
|
|
13864
|
+
}
|
|
13850
13865
|
node.qualifier = qualifier;
|
|
13851
13866
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
13852
13867
|
node.isTypeOf = isTypeOf;
|
|
13853
13868
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13854
13869
|
return node;
|
|
13855
13870
|
}
|
|
13856
|
-
function updateImportTypeNode(node, argument,
|
|
13857
|
-
return node.argument !== argument || node.
|
|
13871
|
+
function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
|
|
13872
|
+
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
13873
|
}
|
|
13859
13874
|
function createParenthesizedType(type) {
|
|
13860
13875
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -14984,19 +14999,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14984
14999
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
14985
15000
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
14986
15001
|
}
|
|
14987
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
15002
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
14988
15003
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
14989
15004
|
node.modifiers = asNodeArray(modifiers);
|
|
14990
15005
|
node.importClause = importClause;
|
|
14991
15006
|
node.moduleSpecifier = moduleSpecifier;
|
|
14992
|
-
node.assertClause =
|
|
15007
|
+
node.attributes = node.assertClause = attributes;
|
|
14993
15008
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14994
15009
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14995
15010
|
node.jsDoc = void 0;
|
|
14996
15011
|
return node;
|
|
14997
15012
|
}
|
|
14998
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
14999
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15013
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
|
|
15014
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
|
|
15000
15015
|
}
|
|
15001
15016
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
15002
15017
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -15017,6 +15032,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15017
15032
|
const node = createBaseNode(300 /* AssertClause */);
|
|
15018
15033
|
node.elements = createNodeArray(elements);
|
|
15019
15034
|
node.multiLine = multiLine;
|
|
15035
|
+
node.token = 132 /* AssertKeyword */;
|
|
15020
15036
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15021
15037
|
return node;
|
|
15022
15038
|
}
|
|
@@ -15042,6 +15058,27 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15042
15058
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
15043
15059
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
15044
15060
|
}
|
|
15061
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
15062
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
15063
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
15064
|
+
node.elements = createNodeArray(elements);
|
|
15065
|
+
node.multiLine = multiLine;
|
|
15066
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15067
|
+
return node;
|
|
15068
|
+
}
|
|
15069
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
15070
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
15071
|
+
}
|
|
15072
|
+
function createImportAttribute(name, value) {
|
|
15073
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
15074
|
+
node.name = name;
|
|
15075
|
+
node.value = value;
|
|
15076
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15077
|
+
return node;
|
|
15078
|
+
}
|
|
15079
|
+
function updateImportAttribute(node, name, value) {
|
|
15080
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
15081
|
+
}
|
|
15045
15082
|
function createNamespaceImport(name) {
|
|
15046
15083
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
15047
15084
|
node.name = name;
|
|
@@ -15102,20 +15139,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15102
15139
|
function updateExportAssignment(node, modifiers, expression) {
|
|
15103
15140
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node;
|
|
15104
15141
|
}
|
|
15105
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15142
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15106
15143
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
15107
15144
|
node.modifiers = asNodeArray(modifiers);
|
|
15108
15145
|
node.isTypeOnly = isTypeOnly;
|
|
15109
15146
|
node.exportClause = exportClause;
|
|
15110
15147
|
node.moduleSpecifier = moduleSpecifier;
|
|
15111
|
-
node.assertClause =
|
|
15148
|
+
node.attributes = node.assertClause = attributes;
|
|
15112
15149
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15113
15150
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15114
15151
|
node.jsDoc = void 0;
|
|
15115
15152
|
return node;
|
|
15116
15153
|
}
|
|
15117
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15118
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15154
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15155
|
+
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
15156
|
}
|
|
15120
15157
|
function finishUpdateExportDeclaration(updated, original) {
|
|
15121
15158
|
if (updated !== original) {
|
|
@@ -16442,7 +16479,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16442
16479
|
} else {
|
|
16443
16480
|
modifierArray = modifiers;
|
|
16444
16481
|
}
|
|
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.
|
|
16482
|
+
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
16483
|
}
|
|
16447
16484
|
function updateModifierLike(node, modifierArray) {
|
|
16448
16485
|
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 +17207,14 @@ function isImportDeclaration(node) {
|
|
|
17170
17207
|
function isImportClause(node) {
|
|
17171
17208
|
return node.kind === 273 /* ImportClause */;
|
|
17172
17209
|
}
|
|
17173
|
-
function isImportTypeAssertionContainer(node) {
|
|
17174
|
-
return node.kind === 302 /* ImportTypeAssertionContainer */;
|
|
17175
|
-
}
|
|
17176
17210
|
function isAssertClause(node) {
|
|
17177
17211
|
return node.kind === 300 /* AssertClause */;
|
|
17178
17212
|
}
|
|
17179
|
-
function
|
|
17180
|
-
return node.kind ===
|
|
17213
|
+
function isImportAttributes(node) {
|
|
17214
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
17215
|
+
}
|
|
17216
|
+
function isImportAttribute(node) {
|
|
17217
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
17181
17218
|
}
|
|
17182
17219
|
function isImportSpecifier(node) {
|
|
17183
17220
|
return node.kind === 276 /* ImportSpecifier */;
|
|
@@ -17755,7 +17792,7 @@ var forEachChildTable = {
|
|
|
17755
17792
|
return visitNode2(cbNode, node.typeParameter);
|
|
17756
17793
|
},
|
|
17757
17794
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
17758
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
17795
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
17759
17796
|
},
|
|
17760
17797
|
[302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {
|
|
17761
17798
|
return visitNode2(cbNode, node.assertClause);
|
|
@@ -17929,15 +17966,15 @@ var forEachChildTable = {
|
|
|
17929
17966
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
17930
17967
|
},
|
|
17931
17968
|
[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.
|
|
17969
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17933
17970
|
},
|
|
17934
17971
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
17935
17972
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
17936
17973
|
},
|
|
17937
|
-
[300 /*
|
|
17974
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
17938
17975
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
17939
17976
|
},
|
|
17940
|
-
[301 /*
|
|
17977
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
17941
17978
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
17942
17979
|
},
|
|
17943
17980
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -17952,7 +17989,7 @@ var forEachChildTable = {
|
|
|
17952
17989
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
17953
17990
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
17954
17991
|
[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.
|
|
17992
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17956
17993
|
},
|
|
17957
17994
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
17958
17995
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -19161,7 +19198,7 @@ var Parser;
|
|
|
19161
19198
|
function isLiteralPropertyName() {
|
|
19162
19199
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
19163
19200
|
}
|
|
19164
|
-
function
|
|
19201
|
+
function isImportAttributeName2() {
|
|
19165
19202
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
19166
19203
|
}
|
|
19167
19204
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -19280,8 +19317,8 @@ var Parser;
|
|
|
19280
19317
|
return isLiteralPropertyName();
|
|
19281
19318
|
case 9 /* ObjectBindingElements */:
|
|
19282
19319
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
19283
|
-
case 24 /*
|
|
19284
|
-
return
|
|
19320
|
+
case 24 /* ImportAttributes */:
|
|
19321
|
+
return isImportAttributeName2();
|
|
19285
19322
|
case 7 /* HeritageClauseElement */:
|
|
19286
19323
|
if (token() === 19 /* OpenBraceToken */) {
|
|
19287
19324
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -19384,7 +19421,7 @@ var Parser;
|
|
|
19384
19421
|
case 12 /* ObjectLiteralMembers */:
|
|
19385
19422
|
case 9 /* ObjectBindingElements */:
|
|
19386
19423
|
case 23 /* ImportOrExportSpecifiers */:
|
|
19387
|
-
case 24 /*
|
|
19424
|
+
case 24 /* ImportAttributes */:
|
|
19388
19425
|
return token() === 20 /* CloseBraceToken */;
|
|
19389
19426
|
case 3 /* SwitchClauseStatements */:
|
|
19390
19427
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -19690,7 +19727,7 @@ var Parser;
|
|
|
19690
19727
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19691
19728
|
case 14 /* JsxChildren */:
|
|
19692
19729
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19693
|
-
case 24 /*
|
|
19730
|
+
case 24 /* ImportAttributes */:
|
|
19694
19731
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
19695
19732
|
case 25 /* JSDocComment */:
|
|
19696
19733
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -20565,28 +20602,6 @@ var Parser;
|
|
|
20565
20602
|
nextToken();
|
|
20566
20603
|
return token() === 102 /* ImportKeyword */;
|
|
20567
20604
|
}
|
|
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
20605
|
function parseImportType() {
|
|
20591
20606
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
20592
20607
|
const pos = getNodePos();
|
|
@@ -20594,14 +20609,36 @@ var Parser;
|
|
|
20594
20609
|
parseExpected(102 /* ImportKeyword */);
|
|
20595
20610
|
parseExpected(21 /* OpenParenToken */);
|
|
20596
20611
|
const type = parseType();
|
|
20597
|
-
let
|
|
20612
|
+
let attributes;
|
|
20598
20613
|
if (parseOptional(28 /* CommaToken */)) {
|
|
20599
|
-
|
|
20614
|
+
const openBracePosition = scanner.getTokenStart();
|
|
20615
|
+
parseExpected(19 /* OpenBraceToken */);
|
|
20616
|
+
const currentToken2 = token();
|
|
20617
|
+
if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {
|
|
20618
|
+
nextToken();
|
|
20619
|
+
} else {
|
|
20620
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
20621
|
+
}
|
|
20622
|
+
parseExpected(59 /* ColonToken */);
|
|
20623
|
+
attributes = parseImportAttributes(
|
|
20624
|
+
currentToken2,
|
|
20625
|
+
/*skipKeyword*/
|
|
20626
|
+
true
|
|
20627
|
+
);
|
|
20628
|
+
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
20629
|
+
const lastError = lastOrUndefined(parseDiagnostics);
|
|
20630
|
+
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
20631
|
+
addRelatedInfo(
|
|
20632
|
+
lastError,
|
|
20633
|
+
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
20634
|
+
);
|
|
20635
|
+
}
|
|
20636
|
+
}
|
|
20600
20637
|
}
|
|
20601
20638
|
parseExpected(22 /* CloseParenToken */);
|
|
20602
20639
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
20603
20640
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
20604
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
20641
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
20605
20642
|
}
|
|
20606
20643
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
20607
20644
|
nextToken();
|
|
@@ -23663,15 +23700,16 @@ var Parser;
|
|
|
23663
23700
|
parseExpected(161 /* FromKeyword */);
|
|
23664
23701
|
}
|
|
23665
23702
|
const moduleSpecifier = parseModuleSpecifier();
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23703
|
+
const currentToken2 = token();
|
|
23704
|
+
let attributes;
|
|
23705
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23706
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23669
23707
|
}
|
|
23670
23708
|
parseSemicolon();
|
|
23671
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
23709
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
23672
23710
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23673
23711
|
}
|
|
23674
|
-
function
|
|
23712
|
+
function parseImportAttribute() {
|
|
23675
23713
|
const pos = getNodePos();
|
|
23676
23714
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
23677
23715
|
parseExpected(59 /* ColonToken */);
|
|
@@ -23679,19 +23717,19 @@ var Parser;
|
|
|
23679
23717
|
/*allowReturnTypeInArrowFunction*/
|
|
23680
23718
|
true
|
|
23681
23719
|
);
|
|
23682
|
-
return finishNode(factory2.
|
|
23720
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
23683
23721
|
}
|
|
23684
|
-
function
|
|
23722
|
+
function parseImportAttributes(token2, skipKeyword) {
|
|
23685
23723
|
const pos = getNodePos();
|
|
23686
|
-
if (!
|
|
23687
|
-
parseExpected(
|
|
23724
|
+
if (!skipKeyword) {
|
|
23725
|
+
parseExpected(token2);
|
|
23688
23726
|
}
|
|
23689
23727
|
const openBracePosition = scanner.getTokenStart();
|
|
23690
23728
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
23691
23729
|
const multiLine = scanner.hasPrecedingLineBreak();
|
|
23692
23730
|
const elements = parseDelimitedList(
|
|
23693
|
-
24 /*
|
|
23694
|
-
|
|
23731
|
+
24 /* ImportAttributes */,
|
|
23732
|
+
parseImportAttribute,
|
|
23695
23733
|
/*considerSemicolonAsDelimiter*/
|
|
23696
23734
|
true
|
|
23697
23735
|
);
|
|
@@ -23704,7 +23742,7 @@ var Parser;
|
|
|
23704
23742
|
);
|
|
23705
23743
|
}
|
|
23706
23744
|
}
|
|
23707
|
-
return finishNode(factory2.
|
|
23745
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
23708
23746
|
} else {
|
|
23709
23747
|
const elements = createNodeArray(
|
|
23710
23748
|
[],
|
|
@@ -23714,10 +23752,11 @@ var Parser;
|
|
|
23714
23752
|
/*hasTrailingComma*/
|
|
23715
23753
|
false
|
|
23716
23754
|
);
|
|
23717
|
-
return finishNode(factory2.
|
|
23755
|
+
return finishNode(factory2.createImportAttributes(
|
|
23718
23756
|
elements,
|
|
23719
23757
|
/*multiLine*/
|
|
23720
|
-
false
|
|
23758
|
+
false,
|
|
23759
|
+
token2
|
|
23721
23760
|
), pos);
|
|
23722
23761
|
}
|
|
23723
23762
|
}
|
|
@@ -23849,7 +23888,7 @@ var Parser;
|
|
|
23849
23888
|
);
|
|
23850
23889
|
let exportClause;
|
|
23851
23890
|
let moduleSpecifier;
|
|
23852
|
-
let
|
|
23891
|
+
let attributes;
|
|
23853
23892
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
23854
23893
|
const namespaceExportPos = getNodePos();
|
|
23855
23894
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -23865,12 +23904,13 @@ var Parser;
|
|
|
23865
23904
|
moduleSpecifier = parseModuleSpecifier();
|
|
23866
23905
|
}
|
|
23867
23906
|
}
|
|
23868
|
-
|
|
23869
|
-
|
|
23907
|
+
const currentToken2 = token();
|
|
23908
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23909
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23870
23910
|
}
|
|
23871
23911
|
parseSemicolon();
|
|
23872
23912
|
setAwaitContext(savedAwaitContext);
|
|
23873
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
23913
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
23874
23914
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23875
23915
|
}
|
|
23876
23916
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -23920,7 +23960,7 @@ var Parser;
|
|
|
23920
23960
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
23921
23961
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
23922
23962
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
23923
|
-
ParsingContext2[ParsingContext2["
|
|
23963
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
23924
23964
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
23925
23965
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
23926
23966
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -27513,11 +27553,19 @@ function getNodeResolutionFeatures(options) {
|
|
|
27513
27553
|
return features;
|
|
27514
27554
|
}
|
|
27515
27555
|
function getConditions(options, esmMode) {
|
|
27516
|
-
const
|
|
27556
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
27557
|
+
if (esmMode === void 0) {
|
|
27558
|
+
if (moduleResolution === 100 /* Bundler */) {
|
|
27559
|
+
esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
|
|
27560
|
+
} else if (moduleResolution === 2 /* Node10 */) {
|
|
27561
|
+
return [];
|
|
27562
|
+
}
|
|
27563
|
+
}
|
|
27564
|
+
const conditions = esmMode ? ["import"] : ["require"];
|
|
27517
27565
|
if (!options.noDtsResolution) {
|
|
27518
27566
|
conditions.push("types");
|
|
27519
27567
|
}
|
|
27520
|
-
if (
|
|
27568
|
+
if (moduleResolution !== 100 /* Bundler */) {
|
|
27521
27569
|
conditions.push("node");
|
|
27522
27570
|
}
|
|
27523
27571
|
return concatenate(conditions, options.customConditions);
|
|
@@ -27574,13 +27622,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27574
27622
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
27575
27623
|
break;
|
|
27576
27624
|
case 2 /* Node10 */:
|
|
27577
|
-
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27625
|
+
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
27578
27626
|
break;
|
|
27579
27627
|
case 1 /* Classic */:
|
|
27580
27628
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27581
27629
|
break;
|
|
27582
27630
|
case 100 /* Bundler */:
|
|
27583
|
-
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27631
|
+
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
27584
27632
|
break;
|
|
27585
27633
|
default:
|
|
27586
27634
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
@@ -27745,7 +27793,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
27745
27793
|
resolutionMode
|
|
27746
27794
|
);
|
|
27747
27795
|
}
|
|
27748
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27796
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {
|
|
27749
27797
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
27750
27798
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
27751
27799
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
@@ -27762,7 +27810,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile,
|
|
|
27762
27810
|
extensions,
|
|
27763
27811
|
/*isConfigLookup*/
|
|
27764
27812
|
false,
|
|
27765
|
-
redirectedReference
|
|
27813
|
+
redirectedReference,
|
|
27814
|
+
conditions
|
|
27766
27815
|
);
|
|
27767
27816
|
}
|
|
27768
27817
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
@@ -27778,10 +27827,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
27778
27827
|
/*isConfigLookup*/
|
|
27779
27828
|
false,
|
|
27780
27829
|
/*redirectedReference*/
|
|
27830
|
+
void 0,
|
|
27831
|
+
/*conditions*/
|
|
27781
27832
|
void 0
|
|
27782
27833
|
);
|
|
27783
27834
|
}
|
|
27784
|
-
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
27835
|
+
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {
|
|
27785
27836
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
27786
27837
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
27787
27838
|
if (getResolveJsonModule(compilerOptions)) {
|
|
@@ -27797,10 +27848,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
27797
27848
|
extensions,
|
|
27798
27849
|
/*isConfigLookup*/
|
|
27799
27850
|
false,
|
|
27800
|
-
redirectedReference
|
|
27851
|
+
redirectedReference,
|
|
27852
|
+
conditions
|
|
27801
27853
|
);
|
|
27802
27854
|
}
|
|
27803
|
-
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
27855
|
+
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {
|
|
27804
27856
|
let extensions;
|
|
27805
27857
|
if (isConfigLookup) {
|
|
27806
27858
|
extensions = 8 /* Json */;
|
|
@@ -27811,14 +27863,18 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
27811
27863
|
} else {
|
|
27812
27864
|
extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
27813
27865
|
}
|
|
27814
|
-
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
27866
|
+
return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
|
|
27815
27867
|
}
|
|
27816
|
-
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
27868
|
+
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
|
|
27817
27869
|
var _a, _b, _c, _d;
|
|
27818
27870
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
27819
27871
|
const failedLookupLocations = [];
|
|
27820
27872
|
const affectingLocations = [];
|
|
27821
|
-
const
|
|
27873
|
+
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
27874
|
+
conditions ?? (conditions = getConditions(
|
|
27875
|
+
compilerOptions,
|
|
27876
|
+
moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
|
|
27877
|
+
));
|
|
27822
27878
|
const diagnostics = [];
|
|
27823
27879
|
const state = {
|
|
27824
27880
|
compilerOptions,
|
|
@@ -27828,17 +27884,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27828
27884
|
affectingLocations,
|
|
27829
27885
|
packageJsonInfoCache: cache,
|
|
27830
27886
|
features,
|
|
27831
|
-
conditions,
|
|
27887
|
+
conditions: conditions ?? emptyArray,
|
|
27832
27888
|
requestContainingDirectory: containingDirectory,
|
|
27833
27889
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
27834
27890
|
isConfigLookup,
|
|
27835
27891
|
candidateIsFromPackageJsonField: false
|
|
27836
27892
|
};
|
|
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(", "));
|
|
27893
|
+
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
27894
|
+
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
|
|
27839
27895
|
}
|
|
27840
27896
|
let result;
|
|
27841
|
-
if (
|
|
27897
|
+
if (moduleResolution === 2 /* Node10 */) {
|
|
27842
27898
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
27843
27899
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
27844
27900
|
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
@@ -27846,7 +27902,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27846
27902
|
result = tryResolve(extensions, state);
|
|
27847
27903
|
}
|
|
27848
27904
|
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")) {
|
|
27905
|
+
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
27906
|
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
27907
|
const diagnosticState = {
|
|
27852
27908
|
...state,
|
|
@@ -28506,7 +28562,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28506
28562
|
extensions,
|
|
28507
28563
|
/*isConfigLookup*/
|
|
28508
28564
|
false,
|
|
28509
|
-
redirectedReference
|
|
28565
|
+
redirectedReference,
|
|
28566
|
+
state.conditions
|
|
28510
28567
|
);
|
|
28511
28568
|
return toSearchResult(
|
|
28512
28569
|
result.resolvedModule ? {
|
|
@@ -29646,7 +29703,7 @@ var visitEachChildTable = {
|
|
|
29646
29703
|
return context.factory.updateImportTypeNode(
|
|
29647
29704
|
node,
|
|
29648
29705
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
29649
|
-
nodeVisitor(node.
|
|
29706
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes),
|
|
29650
29707
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
29651
29708
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
29652
29709
|
node.isTypeOf
|
|
@@ -30197,20 +30254,20 @@ var visitEachChildTable = {
|
|
|
30197
30254
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
30198
30255
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
30199
30256
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
30200
|
-
nodeVisitor(node.
|
|
30257
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30201
30258
|
);
|
|
30202
30259
|
},
|
|
30203
|
-
[300 /*
|
|
30204
|
-
return context.factory.
|
|
30260
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
30261
|
+
return context.factory.updateImportAttributes(
|
|
30205
30262
|
node,
|
|
30206
|
-
nodesVisitor(node.elements, visitor,
|
|
30263
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
30207
30264
|
node.multiLine
|
|
30208
30265
|
);
|
|
30209
30266
|
},
|
|
30210
|
-
[301 /*
|
|
30211
|
-
return context.factory.
|
|
30267
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
30268
|
+
return context.factory.updateImportAttribute(
|
|
30212
30269
|
node,
|
|
30213
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
30270
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
30214
30271
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
30215
30272
|
);
|
|
30216
30273
|
},
|
|
@@ -30262,7 +30319,7 @@ var visitEachChildTable = {
|
|
|
30262
30319
|
node.isTypeOnly,
|
|
30263
30320
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
30264
30321
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
30265
|
-
nodeVisitor(node.
|
|
30322
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30266
30323
|
);
|
|
30267
30324
|
},
|
|
30268
30325
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -30823,7 +30880,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
30823
30880
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
30824
30881
|
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
30882
|
Diagnostics.Duplicate_label_0.code,
|
|
30826
|
-
Diagnostics.
|
|
30883
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
30827
30884
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
30828
30885
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
30829
30886
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|