@typescript-deploys/pr-build 5.3.0-pr-55820-7 → 5.3.0-pr-54242-4
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 +582 -487
- package/lib/tsserver.js +715 -561
- package/lib/typescript.d.ts +96 -32
- package/lib/typescript.js +709 -561
- package/lib/typingsInstaller.js +187 -125
- 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.20230922`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2773,9 +2773,12 @@ 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["
|
|
2778
|
-
SyntaxKind4[SyntaxKind4["
|
|
2776
|
+
SyntaxKind4[SyntaxKind4["ImportAttributes"] = 300] = "ImportAttributes";
|
|
2777
|
+
SyntaxKind4[SyntaxKind4["ImportAttribute"] = 301] = "ImportAttribute";
|
|
2778
|
+
SyntaxKind4[SyntaxKind4["ImportTypeAttributes"] = 302] = "ImportTypeAttributes";
|
|
2779
|
+
SyntaxKind4[SyntaxKind4["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause";
|
|
2780
|
+
SyntaxKind4[SyntaxKind4["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry";
|
|
2781
|
+
SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302 /* ImportTypeAttributes */] = "ImportTypeAssertionContainer";
|
|
2779
2782
|
SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment";
|
|
2780
2783
|
SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
|
|
2781
2784
|
SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 305] = "SpreadAssignment";
|
|
@@ -5068,6 +5071,7 @@ var Diagnostics = {
|
|
|
5068
5071
|
_0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."),
|
|
5069
5072
|
A_file_cannot_have_a_reference_to_itself: diag(1006, 1 /* Error */, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."),
|
|
5070
5073
|
The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, 1 /* Error */, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."),
|
|
5074
|
+
The_assert_keyword_in_import_attributes_is_deprecated_and_has_been_replaced_by_the_with_keyword: diag(1008, 1 /* Error */, "The_assert_keyword_in_import_attributes_is_deprecated_and_has_been_replaced_by_the_with_keyword_1008", "The 'assert' keyword in import attributes is deprecated and has been replaced by the 'with' keyword."),
|
|
5071
5075
|
Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
|
|
5072
5076
|
Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."),
|
|
5073
5077
|
An_element_access_expression_should_take_an_argument: diag(1011, 1 /* Error */, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."),
|
|
@@ -5431,7 +5435,7 @@ var Diagnostics = {
|
|
|
5431
5435
|
_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
5436
|
_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
5437
|
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
|
-
|
|
5438
|
+
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
5439
|
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
5440
|
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
5441
|
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`."),
|
|
@@ -5443,6 +5447,9 @@ var Diagnostics = {
|
|
|
5443
5447
|
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
5448
|
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
5449
|
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"),
|
|
5450
|
+
resolution_mode_attribute_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1462, 1 /* Error */, "resolution_mode_attribute_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1462", "'resolution-mode' attribute are only supported when `moduleResolution` is `node16` or `nodenext`."),
|
|
5451
|
+
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."),
|
|
5452
|
+
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
5453
|
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
5454
|
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
5455
|
catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -5469,6 +5476,7 @@ var Diagnostics = {
|
|
|
5469
5476
|
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
5477
|
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
5478
|
_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."),
|
|
5479
|
+
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
5480
|
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
5481
|
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
5482
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -5998,6 +6006,7 @@ var Diagnostics = {
|
|
|
5998
6006
|
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
6007
|
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
6008
|
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."),
|
|
6009
|
+
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
6010
|
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
6011
|
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
6012
|
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}'?"),
|
|
@@ -6006,7 +6015,6 @@ var Diagnostics = {
|
|
|
6006
6015
|
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
6016
|
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
6017
|
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
6018
|
_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
6019
|
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
6020
|
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."),
|
|
@@ -6019,6 +6027,9 @@ var Diagnostics = {
|
|
|
6019
6027
|
await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."),
|
|
6020
6028
|
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
6029
|
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."),
|
|
6030
|
+
Import_attributes_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls: diag(2855, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls_2855", "Import attributes are not allowed on statements that transpile to CommonJS 'require' calls."),
|
|
6031
|
+
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2856, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2856", "Import attributes cannot be used with type-only imports or exports."),
|
|
6032
|
+
Import_attribute_values_must_be_string_literal_expressions: diag(2857, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2857", "Import attribute values must be string literal expressions."),
|
|
6022
6033
|
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}'."),
|
|
6023
6034
|
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}'."),
|
|
6024
6035
|
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}'."),
|
|
@@ -6127,7 +6138,6 @@ var Diagnostics = {
|
|
|
6127
6138
|
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}'."),
|
|
6128
6139
|
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}'?"),
|
|
6129
6140
|
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'."),
|
|
6130
|
-
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'."),
|
|
6131
6141
|
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."),
|
|
6132
6142
|
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."),
|
|
6133
6143
|
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}'."),
|
|
@@ -7310,7 +7320,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18
|
|
|
7310
7320
|
var unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999];
|
|
7311
7321
|
var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
7312
7322
|
var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
7313
|
-
var
|
|
7323
|
+
var jsDocSeeOrLink = /@(?:see|link)/i;
|
|
7314
7324
|
function lookupInUnicodeMap(code, map2) {
|
|
7315
7325
|
if (code < map2[0]) {
|
|
7316
7326
|
return false;
|
|
@@ -7739,7 +7749,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
7739
7749
|
var tokenFlags;
|
|
7740
7750
|
var commentDirectives;
|
|
7741
7751
|
var inJSDocType = 0;
|
|
7742
|
-
var
|
|
7752
|
+
var scriptKind = 0 /* Unknown */;
|
|
7753
|
+
var jsDocParsingMode = 0 /* ParseAll */;
|
|
7743
7754
|
setText(text, start, length2);
|
|
7744
7755
|
var scanner = {
|
|
7745
7756
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -7783,14 +7794,15 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
7783
7794
|
setText,
|
|
7784
7795
|
setScriptTarget,
|
|
7785
7796
|
setLanguageVariant,
|
|
7797
|
+
setScriptKind,
|
|
7798
|
+
setJSDocParsingMode,
|
|
7786
7799
|
setOnError,
|
|
7787
7800
|
resetTokenState,
|
|
7788
7801
|
setTextPos: resetTokenState,
|
|
7789
7802
|
setInJSDocType,
|
|
7790
7803
|
tryScan,
|
|
7791
7804
|
lookAhead,
|
|
7792
|
-
scanRange
|
|
7793
|
-
setSkipNonSemanticJSDoc
|
|
7805
|
+
scanRange
|
|
7794
7806
|
};
|
|
7795
7807
|
if (Debug.isDebugging) {
|
|
7796
7808
|
Object.defineProperty(scanner, "__debugShowCurrentPositionInText", {
|
|
@@ -8578,7 +8590,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8578
8590
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
8579
8591
|
}
|
|
8580
8592
|
}
|
|
8581
|
-
if (isJSDoc2 && (
|
|
8593
|
+
if (isJSDoc2 && shouldParseJSDoc()) {
|
|
8582
8594
|
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
8583
8595
|
}
|
|
8584
8596
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
@@ -8837,6 +8849,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8837
8849
|
}
|
|
8838
8850
|
}
|
|
8839
8851
|
}
|
|
8852
|
+
function shouldParseJSDoc() {
|
|
8853
|
+
switch (jsDocParsingMode) {
|
|
8854
|
+
case 0 /* ParseAll */:
|
|
8855
|
+
return true;
|
|
8856
|
+
case 1 /* ParseNone */:
|
|
8857
|
+
return false;
|
|
8858
|
+
}
|
|
8859
|
+
if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {
|
|
8860
|
+
return true;
|
|
8861
|
+
}
|
|
8862
|
+
if (jsDocParsingMode === 3 /* ParseForTypeInfo */) {
|
|
8863
|
+
return false;
|
|
8864
|
+
}
|
|
8865
|
+
return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));
|
|
8866
|
+
}
|
|
8840
8867
|
function reScanInvalidIdentifier() {
|
|
8841
8868
|
Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.");
|
|
8842
8869
|
pos = tokenStart = fullStartPos;
|
|
@@ -9251,8 +9278,11 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9251
9278
|
function setLanguageVariant(variant) {
|
|
9252
9279
|
languageVariant = variant;
|
|
9253
9280
|
}
|
|
9254
|
-
function
|
|
9255
|
-
|
|
9281
|
+
function setScriptKind(kind) {
|
|
9282
|
+
scriptKind = kind;
|
|
9283
|
+
}
|
|
9284
|
+
function setJSDocParsingMode(kind) {
|
|
9285
|
+
jsDocParsingMode = kind;
|
|
9256
9286
|
}
|
|
9257
9287
|
function resetTokenState(position) {
|
|
9258
9288
|
Debug.assert(position >= 0);
|
|
@@ -9654,7 +9684,7 @@ function isTemplateMiddleOrTemplateTail(node) {
|
|
|
9654
9684
|
const kind = node.kind;
|
|
9655
9685
|
return kind === 17 /* TemplateMiddle */ || kind === 18 /* TemplateTail */;
|
|
9656
9686
|
}
|
|
9657
|
-
function
|
|
9687
|
+
function isImportAttributeName(node) {
|
|
9658
9688
|
return isStringLiteral(node) || isIdentifier(node);
|
|
9659
9689
|
}
|
|
9660
9690
|
function isGeneratedIdentifier(node) {
|
|
@@ -12554,6 +12584,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12554
12584
|
updateAssertEntry,
|
|
12555
12585
|
createImportTypeAssertionContainer,
|
|
12556
12586
|
updateImportTypeAssertionContainer,
|
|
12587
|
+
createImportTypeAttributes,
|
|
12588
|
+
updateImportTypeAttributes,
|
|
12589
|
+
createImportAttributes,
|
|
12590
|
+
updateImportAttributes,
|
|
12591
|
+
createImportAttribute,
|
|
12592
|
+
updateImportAttribute,
|
|
12557
12593
|
createNamespaceImport,
|
|
12558
12594
|
updateNamespaceImport,
|
|
12559
12595
|
createNamespaceExport,
|
|
@@ -13822,18 +13858,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13822
13858
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
13823
13859
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
13824
13860
|
}
|
|
13825
|
-
function createImportTypeNode(argument,
|
|
13861
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
13826
13862
|
const node = createBaseNode(205 /* ImportType */);
|
|
13827
13863
|
node.argument = argument;
|
|
13828
|
-
node.assertions =
|
|
13864
|
+
node.attributes = node.assertions = attributes;
|
|
13829
13865
|
node.qualifier = qualifier;
|
|
13830
13866
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
13831
13867
|
node.isTypeOf = isTypeOf;
|
|
13832
13868
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13833
13869
|
return node;
|
|
13834
13870
|
}
|
|
13835
|
-
function updateImportTypeNode(node, argument,
|
|
13836
|
-
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;
|
|
13837
13873
|
}
|
|
13838
13874
|
function createParenthesizedType(type) {
|
|
13839
13875
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -14963,19 +14999,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14963
14999
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
14964
15000
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
14965
15001
|
}
|
|
14966
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
15002
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
14967
15003
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
14968
15004
|
node.modifiers = asNodeArray(modifiers);
|
|
14969
15005
|
node.importClause = importClause;
|
|
14970
15006
|
node.moduleSpecifier = moduleSpecifier;
|
|
14971
|
-
node.assertClause =
|
|
15007
|
+
node.attributes = node.assertClause = attributes;
|
|
14972
15008
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14973
15009
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14974
15010
|
node.jsDoc = void 0;
|
|
14975
15011
|
return node;
|
|
14976
15012
|
}
|
|
14977
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
14978
|
-
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;
|
|
14979
15015
|
}
|
|
14980
15016
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
14981
15017
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -14996,6 +15032,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14996
15032
|
const node = createBaseNode(300 /* AssertClause */);
|
|
14997
15033
|
node.elements = createNodeArray(elements);
|
|
14998
15034
|
node.multiLine = multiLine;
|
|
15035
|
+
node.token = 132 /* AssertKeyword */;
|
|
14999
15036
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15000
15037
|
return node;
|
|
15001
15038
|
}
|
|
@@ -15021,6 +15058,36 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15021
15058
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
15022
15059
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
15023
15060
|
}
|
|
15061
|
+
function createImportTypeAttributes(attributes, multiLine) {
|
|
15062
|
+
const node = createBaseNode(302 /* ImportTypeAttributes */);
|
|
15063
|
+
node.attributes = node.assertClause = attributes;
|
|
15064
|
+
node.multiLine = multiLine;
|
|
15065
|
+
return node;
|
|
15066
|
+
}
|
|
15067
|
+
function updateImportTypeAttributes(node, attributes, multiLine) {
|
|
15068
|
+
return node.attributes !== attributes || node.multiLine !== multiLine ? update(createImportTypeAttributes(attributes, multiLine), node) : node;
|
|
15069
|
+
}
|
|
15070
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
15071
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
15072
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
15073
|
+
node.elements = createNodeArray(elements);
|
|
15074
|
+
node.multiLine = multiLine;
|
|
15075
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15076
|
+
return node;
|
|
15077
|
+
}
|
|
15078
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
15079
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
15080
|
+
}
|
|
15081
|
+
function createImportAttribute(name, value) {
|
|
15082
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
15083
|
+
node.name = name;
|
|
15084
|
+
node.value = value;
|
|
15085
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15086
|
+
return node;
|
|
15087
|
+
}
|
|
15088
|
+
function updateImportAttribute(node, name, value) {
|
|
15089
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
15090
|
+
}
|
|
15024
15091
|
function createNamespaceImport(name) {
|
|
15025
15092
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
15026
15093
|
node.name = name;
|
|
@@ -15081,20 +15148,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15081
15148
|
function updateExportAssignment(node, modifiers, expression) {
|
|
15082
15149
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node;
|
|
15083
15150
|
}
|
|
15084
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15151
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15085
15152
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
15086
15153
|
node.modifiers = asNodeArray(modifiers);
|
|
15087
15154
|
node.isTypeOnly = isTypeOnly;
|
|
15088
15155
|
node.exportClause = exportClause;
|
|
15089
15156
|
node.moduleSpecifier = moduleSpecifier;
|
|
15090
|
-
node.assertClause =
|
|
15157
|
+
node.attributes = node.assertClause = attributes;
|
|
15091
15158
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15092
15159
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15093
15160
|
node.jsDoc = void 0;
|
|
15094
15161
|
return node;
|
|
15095
15162
|
}
|
|
15096
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15097
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15163
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15164
|
+
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;
|
|
15098
15165
|
}
|
|
15099
15166
|
function finishUpdateExportDeclaration(updated, original) {
|
|
15100
15167
|
if (updated !== original) {
|
|
@@ -16421,7 +16488,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16421
16488
|
} else {
|
|
16422
16489
|
modifierArray = modifiers;
|
|
16423
16490
|
}
|
|
16424
|
-
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.
|
|
16491
|
+
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);
|
|
16425
16492
|
}
|
|
16426
16493
|
function updateModifierLike(node, modifierArray) {
|
|
16427
16494
|
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);
|
|
@@ -17149,14 +17216,14 @@ function isImportDeclaration(node) {
|
|
|
17149
17216
|
function isImportClause(node) {
|
|
17150
17217
|
return node.kind === 273 /* ImportClause */;
|
|
17151
17218
|
}
|
|
17152
|
-
function
|
|
17153
|
-
return node.kind === 302 /*
|
|
17219
|
+
function isImportTypeAttributes(node) {
|
|
17220
|
+
return node.kind === 302 /* ImportTypeAttributes */;
|
|
17154
17221
|
}
|
|
17155
|
-
function
|
|
17156
|
-
return node.kind === 300 /*
|
|
17222
|
+
function isImportAttributes(node) {
|
|
17223
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
17157
17224
|
}
|
|
17158
|
-
function
|
|
17159
|
-
return node.kind === 301 /*
|
|
17225
|
+
function isImportAttribute(node) {
|
|
17226
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
17160
17227
|
}
|
|
17161
17228
|
function isImportSpecifier(node) {
|
|
17162
17229
|
return node.kind === 276 /* ImportSpecifier */;
|
|
@@ -17734,10 +17801,10 @@ var forEachChildTable = {
|
|
|
17734
17801
|
return visitNode2(cbNode, node.typeParameter);
|
|
17735
17802
|
},
|
|
17736
17803
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
17737
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
17804
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
17738
17805
|
},
|
|
17739
|
-
[302 /*
|
|
17740
|
-
return visitNode2(cbNode, node.
|
|
17806
|
+
[302 /* ImportTypeAttributes */]: function forEachChildInImportTypeAttributes(node, cbNode, _cbNodes) {
|
|
17807
|
+
return visitNode2(cbNode, node.attributes);
|
|
17741
17808
|
},
|
|
17742
17809
|
[196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator,
|
|
17743
17810
|
[198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator,
|
|
@@ -17908,15 +17975,15 @@ var forEachChildTable = {
|
|
|
17908
17975
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
17909
17976
|
},
|
|
17910
17977
|
[272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
17911
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
17978
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17912
17979
|
},
|
|
17913
17980
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
17914
17981
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
17915
17982
|
},
|
|
17916
|
-
[300 /*
|
|
17983
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
17917
17984
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
17918
17985
|
},
|
|
17919
|
-
[301 /*
|
|
17986
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
17920
17987
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
17921
17988
|
},
|
|
17922
17989
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -17931,7 +17998,7 @@ var forEachChildTable = {
|
|
|
17931
17998
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
17932
17999
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
17933
18000
|
[278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
17934
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
18001
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17935
18002
|
},
|
|
17936
18003
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
17937
18004
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -18277,7 +18344,7 @@ var Parser;
|
|
|
18277
18344
|
var contextFlags;
|
|
18278
18345
|
var topLevel = true;
|
|
18279
18346
|
var parseErrorBeforeNextFinishedNode = false;
|
|
18280
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride,
|
|
18347
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) {
|
|
18281
18348
|
var _a;
|
|
18282
18349
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
18283
18350
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -18299,9 +18366,8 @@ var Parser;
|
|
|
18299
18366
|
result2.pragmas = emptyMap;
|
|
18300
18367
|
return result2;
|
|
18301
18368
|
}
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
|
|
18369
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);
|
|
18370
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);
|
|
18305
18371
|
clearState();
|
|
18306
18372
|
return result;
|
|
18307
18373
|
}
|
|
@@ -18314,8 +18380,7 @@ var Parser;
|
|
|
18314
18380
|
/*syntaxCursor*/
|
|
18315
18381
|
void 0,
|
|
18316
18382
|
1 /* JS */,
|
|
18317
|
-
/*
|
|
18318
|
-
false
|
|
18383
|
+
0 /* ParseAll */
|
|
18319
18384
|
);
|
|
18320
18385
|
nextToken();
|
|
18321
18386
|
const entityName = parseEntityName(
|
|
@@ -18328,15 +18393,7 @@ var Parser;
|
|
|
18328
18393
|
}
|
|
18329
18394
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
18330
18395
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
18331
|
-
initializeState(
|
|
18332
|
-
fileName2,
|
|
18333
|
-
sourceText2,
|
|
18334
|
-
languageVersion2,
|
|
18335
|
-
syntaxCursor2,
|
|
18336
|
-
6 /* JSON */,
|
|
18337
|
-
/*skipNonSemanticJSDoc*/
|
|
18338
|
-
false
|
|
18339
|
-
);
|
|
18396
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */);
|
|
18340
18397
|
sourceFlags = contextFlags;
|
|
18341
18398
|
nextToken();
|
|
18342
18399
|
const pos = getNodePos();
|
|
@@ -18417,7 +18474,7 @@ var Parser;
|
|
|
18417
18474
|
return result;
|
|
18418
18475
|
}
|
|
18419
18476
|
Parser2.parseJsonText = parseJsonText2;
|
|
18420
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind,
|
|
18477
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
|
|
18421
18478
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
18422
18479
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
18423
18480
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -18453,13 +18510,15 @@ var Parser;
|
|
|
18453
18510
|
scanner.setOnError(scanError);
|
|
18454
18511
|
scanner.setScriptTarget(languageVersion);
|
|
18455
18512
|
scanner.setLanguageVariant(languageVariant);
|
|
18456
|
-
scanner.
|
|
18513
|
+
scanner.setScriptKind(scriptKind);
|
|
18514
|
+
scanner.setJSDocParsingMode(_jsDocParsingMode);
|
|
18457
18515
|
}
|
|
18458
18516
|
function clearState() {
|
|
18459
18517
|
scanner.clearCommentDirectives();
|
|
18460
18518
|
scanner.setText("");
|
|
18461
18519
|
scanner.setOnError(void 0);
|
|
18462
|
-
scanner.
|
|
18520
|
+
scanner.setScriptKind(0 /* Unknown */);
|
|
18521
|
+
scanner.setJSDocParsingMode(0 /* ParseAll */);
|
|
18463
18522
|
sourceText = void 0;
|
|
18464
18523
|
languageVersion = void 0;
|
|
18465
18524
|
syntaxCursor = void 0;
|
|
@@ -18473,7 +18532,7 @@ var Parser;
|
|
|
18473
18532
|
notParenthesizedArrow = void 0;
|
|
18474
18533
|
topLevel = true;
|
|
18475
18534
|
}
|
|
18476
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2,
|
|
18535
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
|
|
18477
18536
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
18478
18537
|
if (isDeclarationFile) {
|
|
18479
18538
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -18492,7 +18551,7 @@ var Parser;
|
|
|
18492
18551
|
sourceFile.identifierCount = identifierCount;
|
|
18493
18552
|
sourceFile.identifiers = identifiers;
|
|
18494
18553
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
18495
|
-
sourceFile.
|
|
18554
|
+
sourceFile.jsDocParsingMode = jsDocParsingMode;
|
|
18496
18555
|
if (jsDocDiagnostics) {
|
|
18497
18556
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
18498
18557
|
}
|
|
@@ -19148,7 +19207,7 @@ var Parser;
|
|
|
19148
19207
|
function isLiteralPropertyName() {
|
|
19149
19208
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
19150
19209
|
}
|
|
19151
|
-
function
|
|
19210
|
+
function isImportAttributeName2() {
|
|
19152
19211
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
19153
19212
|
}
|
|
19154
19213
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -19267,8 +19326,8 @@ var Parser;
|
|
|
19267
19326
|
return isLiteralPropertyName();
|
|
19268
19327
|
case 9 /* ObjectBindingElements */:
|
|
19269
19328
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
19270
|
-
case 24 /*
|
|
19271
|
-
return
|
|
19329
|
+
case 24 /* ImportAttributes */:
|
|
19330
|
+
return isImportAttributeName2();
|
|
19272
19331
|
case 7 /* HeritageClauseElement */:
|
|
19273
19332
|
if (token() === 19 /* OpenBraceToken */) {
|
|
19274
19333
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -19371,7 +19430,7 @@ var Parser;
|
|
|
19371
19430
|
case 12 /* ObjectLiteralMembers */:
|
|
19372
19431
|
case 9 /* ObjectBindingElements */:
|
|
19373
19432
|
case 23 /* ImportOrExportSpecifiers */:
|
|
19374
|
-
case 24 /*
|
|
19433
|
+
case 24 /* ImportAttributes */:
|
|
19375
19434
|
return token() === 20 /* CloseBraceToken */;
|
|
19376
19435
|
case 3 /* SwitchClauseStatements */:
|
|
19377
19436
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -19677,7 +19736,7 @@ var Parser;
|
|
|
19677
19736
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19678
19737
|
case 14 /* JsxChildren */:
|
|
19679
19738
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19680
|
-
case 24 /*
|
|
19739
|
+
case 24 /* ImportAttributes */:
|
|
19681
19740
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
19682
19741
|
case 25 /* JSDocComment */:
|
|
19683
19742
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -20552,16 +20611,22 @@ var Parser;
|
|
|
20552
20611
|
nextToken();
|
|
20553
20612
|
return token() === 102 /* ImportKeyword */;
|
|
20554
20613
|
}
|
|
20555
|
-
function
|
|
20614
|
+
function parseImportTypeAttributes() {
|
|
20556
20615
|
const pos = getNodePos();
|
|
20557
20616
|
const openBracePosition = scanner.getTokenStart();
|
|
20558
20617
|
parseExpected(19 /* OpenBraceToken */);
|
|
20559
20618
|
const multiLine = scanner.hasPrecedingLineBreak();
|
|
20560
|
-
|
|
20619
|
+
const currentToken2 = token();
|
|
20620
|
+
if (currentToken2 !== 118 /* WithKeyword */ && currentToken2 !== 132 /* AssertKeyword */) {
|
|
20621
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
20622
|
+
} else {
|
|
20623
|
+
nextToken();
|
|
20624
|
+
}
|
|
20561
20625
|
parseExpected(59 /* ColonToken */);
|
|
20562
|
-
const
|
|
20563
|
-
|
|
20564
|
-
|
|
20626
|
+
const attributes = parseImportAttributes(
|
|
20627
|
+
currentToken2,
|
|
20628
|
+
/*shouldAdvance*/
|
|
20629
|
+
false
|
|
20565
20630
|
);
|
|
20566
20631
|
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
20567
20632
|
const lastError = lastOrUndefined(parseDiagnostics);
|
|
@@ -20572,7 +20637,7 @@ var Parser;
|
|
|
20572
20637
|
);
|
|
20573
20638
|
}
|
|
20574
20639
|
}
|
|
20575
|
-
return finishNode(factory2.
|
|
20640
|
+
return finishNode(factory2.createImportTypeAttributes(attributes, multiLine), pos);
|
|
20576
20641
|
}
|
|
20577
20642
|
function parseImportType() {
|
|
20578
20643
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
@@ -20581,14 +20646,14 @@ var Parser;
|
|
|
20581
20646
|
parseExpected(102 /* ImportKeyword */);
|
|
20582
20647
|
parseExpected(21 /* OpenParenToken */);
|
|
20583
20648
|
const type = parseType();
|
|
20584
|
-
let
|
|
20649
|
+
let attributes;
|
|
20585
20650
|
if (parseOptional(28 /* CommaToken */)) {
|
|
20586
|
-
|
|
20651
|
+
attributes = parseImportTypeAttributes();
|
|
20587
20652
|
}
|
|
20588
20653
|
parseExpected(22 /* CloseParenToken */);
|
|
20589
20654
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
20590
20655
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
20591
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
20656
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
20592
20657
|
}
|
|
20593
20658
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
20594
20659
|
nextToken();
|
|
@@ -23650,15 +23715,16 @@ var Parser;
|
|
|
23650
23715
|
parseExpected(161 /* FromKeyword */);
|
|
23651
23716
|
}
|
|
23652
23717
|
const moduleSpecifier = parseModuleSpecifier();
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
-
|
|
23718
|
+
const currentToken2 = token();
|
|
23719
|
+
let attributes;
|
|
23720
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23721
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23656
23722
|
}
|
|
23657
23723
|
parseSemicolon();
|
|
23658
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
23724
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
23659
23725
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23660
23726
|
}
|
|
23661
|
-
function
|
|
23727
|
+
function parseImportAttribute() {
|
|
23662
23728
|
const pos = getNodePos();
|
|
23663
23729
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
23664
23730
|
parseExpected(59 /* ColonToken */);
|
|
@@ -23666,19 +23732,19 @@ var Parser;
|
|
|
23666
23732
|
/*allowReturnTypeInArrowFunction*/
|
|
23667
23733
|
true
|
|
23668
23734
|
);
|
|
23669
|
-
return finishNode(factory2.
|
|
23735
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
23670
23736
|
}
|
|
23671
|
-
function
|
|
23737
|
+
function parseImportAttributes(token2, shouldAdvance = true) {
|
|
23672
23738
|
const pos = getNodePos();
|
|
23673
|
-
if (
|
|
23674
|
-
|
|
23739
|
+
if (shouldAdvance) {
|
|
23740
|
+
nextToken();
|
|
23675
23741
|
}
|
|
23676
23742
|
const openBracePosition = scanner.getTokenStart();
|
|
23677
23743
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
23678
23744
|
const multiLine = scanner.hasPrecedingLineBreak();
|
|
23679
23745
|
const elements = parseDelimitedList(
|
|
23680
|
-
24 /*
|
|
23681
|
-
|
|
23746
|
+
24 /* ImportAttributes */,
|
|
23747
|
+
parseImportAttribute,
|
|
23682
23748
|
/*considerSemicolonAsDelimiter*/
|
|
23683
23749
|
true
|
|
23684
23750
|
);
|
|
@@ -23691,7 +23757,7 @@ var Parser;
|
|
|
23691
23757
|
);
|
|
23692
23758
|
}
|
|
23693
23759
|
}
|
|
23694
|
-
return finishNode(factory2.
|
|
23760
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
23695
23761
|
} else {
|
|
23696
23762
|
const elements = createNodeArray(
|
|
23697
23763
|
[],
|
|
@@ -23701,10 +23767,11 @@ var Parser;
|
|
|
23701
23767
|
/*hasTrailingComma*/
|
|
23702
23768
|
false
|
|
23703
23769
|
);
|
|
23704
|
-
return finishNode(factory2.
|
|
23770
|
+
return finishNode(factory2.createImportAttributes(
|
|
23705
23771
|
elements,
|
|
23706
23772
|
/*multiLine*/
|
|
23707
|
-
false
|
|
23773
|
+
false,
|
|
23774
|
+
token2
|
|
23708
23775
|
), pos);
|
|
23709
23776
|
}
|
|
23710
23777
|
}
|
|
@@ -23836,7 +23903,7 @@ var Parser;
|
|
|
23836
23903
|
);
|
|
23837
23904
|
let exportClause;
|
|
23838
23905
|
let moduleSpecifier;
|
|
23839
|
-
let
|
|
23906
|
+
let attributes;
|
|
23840
23907
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
23841
23908
|
const namespaceExportPos = getNodePos();
|
|
23842
23909
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -23852,12 +23919,13 @@ var Parser;
|
|
|
23852
23919
|
moduleSpecifier = parseModuleSpecifier();
|
|
23853
23920
|
}
|
|
23854
23921
|
}
|
|
23855
|
-
|
|
23856
|
-
|
|
23922
|
+
const currentToken2 = token();
|
|
23923
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23924
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23857
23925
|
}
|
|
23858
23926
|
parseSemicolon();
|
|
23859
23927
|
setAwaitContext(savedAwaitContext);
|
|
23860
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
23928
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
23861
23929
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23862
23930
|
}
|
|
23863
23931
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -23907,7 +23975,7 @@ var Parser;
|
|
|
23907
23975
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
23908
23976
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
23909
23977
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
23910
|
-
ParsingContext2[ParsingContext2["
|
|
23978
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
23911
23979
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
23912
23980
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
23913
23981
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -23927,8 +23995,7 @@ var Parser;
|
|
|
23927
23995
|
/*syntaxCursor*/
|
|
23928
23996
|
void 0,
|
|
23929
23997
|
1 /* JS */,
|
|
23930
|
-
/*
|
|
23931
|
-
false
|
|
23998
|
+
0 /* ParseAll */
|
|
23932
23999
|
);
|
|
23933
24000
|
scanner.setText(content, start, length2);
|
|
23934
24001
|
currentToken = scanner.scan();
|
|
@@ -23993,8 +24060,7 @@ var Parser;
|
|
|
23993
24060
|
/*syntaxCursor*/
|
|
23994
24061
|
void 0,
|
|
23995
24062
|
1 /* JS */,
|
|
23996
|
-
/*
|
|
23997
|
-
false
|
|
24063
|
+
0 /* ParseAll */
|
|
23998
24064
|
);
|
|
23999
24065
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
|
|
24000
24066
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -24951,7 +25017,7 @@ var IncrementalParser;
|
|
|
24951
25017
|
true,
|
|
24952
25018
|
sourceFile.scriptKind,
|
|
24953
25019
|
sourceFile.setExternalModuleIndicator,
|
|
24954
|
-
sourceFile.
|
|
25020
|
+
sourceFile.jsDocParsingMode
|
|
24955
25021
|
);
|
|
24956
25022
|
}
|
|
24957
25023
|
const incrementalSourceFile = sourceFile;
|
|
@@ -24976,7 +25042,7 @@ var IncrementalParser;
|
|
|
24976
25042
|
true,
|
|
24977
25043
|
sourceFile.scriptKind,
|
|
24978
25044
|
sourceFile.setExternalModuleIndicator,
|
|
24979
|
-
sourceFile.
|
|
25045
|
+
sourceFile.jsDocParsingMode
|
|
24980
25046
|
);
|
|
24981
25047
|
result.commentDirectives = getNewCommentDirectives(
|
|
24982
25048
|
sourceFile.commentDirectives,
|
|
@@ -29635,16 +29701,16 @@ var visitEachChildTable = {
|
|
|
29635
29701
|
return context.factory.updateImportTypeNode(
|
|
29636
29702
|
node,
|
|
29637
29703
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
29638
|
-
nodeVisitor(node.
|
|
29704
|
+
nodeVisitor(node.attributes, visitor, isImportTypeAttributes),
|
|
29639
29705
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
29640
29706
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
29641
29707
|
node.isTypeOf
|
|
29642
29708
|
);
|
|
29643
29709
|
},
|
|
29644
|
-
[302 /*
|
|
29645
|
-
return context.factory.
|
|
29710
|
+
[302 /* ImportTypeAttributes */]: function visitEachChildOfImportTypeAttributes(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
29711
|
+
return context.factory.updateImportTypeAttributes(
|
|
29646
29712
|
node,
|
|
29647
|
-
Debug.checkDefined(nodeVisitor(node.
|
|
29713
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isImportAttributes)),
|
|
29648
29714
|
node.multiLine
|
|
29649
29715
|
);
|
|
29650
29716
|
},
|
|
@@ -30186,20 +30252,20 @@ var visitEachChildTable = {
|
|
|
30186
30252
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
30187
30253
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
30188
30254
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
30189
|
-
nodeVisitor(node.
|
|
30255
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30190
30256
|
);
|
|
30191
30257
|
},
|
|
30192
|
-
[300 /*
|
|
30193
|
-
return context.factory.
|
|
30258
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
30259
|
+
return context.factory.updateImportAttributes(
|
|
30194
30260
|
node,
|
|
30195
|
-
nodesVisitor(node.elements, visitor,
|
|
30261
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
30196
30262
|
node.multiLine
|
|
30197
30263
|
);
|
|
30198
30264
|
},
|
|
30199
|
-
[301 /*
|
|
30200
|
-
return context.factory.
|
|
30265
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
30266
|
+
return context.factory.updateImportAttribute(
|
|
30201
30267
|
node,
|
|
30202
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
30268
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
30203
30269
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
30204
30270
|
);
|
|
30205
30271
|
},
|
|
@@ -30251,7 +30317,7 @@ var visitEachChildTable = {
|
|
|
30251
30317
|
node.isTypeOnly,
|
|
30252
30318
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
30253
30319
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
30254
|
-
nodeVisitor(node.
|
|
30320
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30255
30321
|
);
|
|
30256
30322
|
},
|
|
30257
30323
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -30812,7 +30878,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
30812
30878
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
30813
30879
|
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,
|
|
30814
30880
|
Diagnostics.Duplicate_label_0.code,
|
|
30815
|
-
Diagnostics.
|
|
30881
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
30816
30882
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
30817
30883
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
30818
30884
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|
|
@@ -30934,7 +31000,6 @@ var BuilderState;
|
|
|
30934
31000
|
return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);
|
|
30935
31001
|
}
|
|
30936
31002
|
function getReferencedFiles(program, sourceFile, getCanonicalFileName) {
|
|
30937
|
-
var _a;
|
|
30938
31003
|
let referencedFiles;
|
|
30939
31004
|
if (sourceFile.imports && sourceFile.imports.length > 0) {
|
|
30940
31005
|
const checker = program.getTypeChecker();
|
|
@@ -30950,17 +31015,14 @@ var BuilderState;
|
|
|
30950
31015
|
addReferencedFile(referencedPath);
|
|
30951
31016
|
}
|
|
30952
31017
|
}
|
|
30953
|
-
|
|
30954
|
-
|
|
30955
|
-
|
|
30956
|
-
|
|
30957
|
-
|
|
30958
|
-
|
|
30959
|
-
|
|
30960
|
-
|
|
30961
|
-
addReferencedFile(typeFilePath);
|
|
30962
|
-
});
|
|
30963
|
-
}
|
|
31018
|
+
program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => {
|
|
31019
|
+
if (!resolvedTypeReferenceDirective) {
|
|
31020
|
+
return;
|
|
31021
|
+
}
|
|
31022
|
+
const fileName = resolvedTypeReferenceDirective.resolvedFileName;
|
|
31023
|
+
const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName);
|
|
31024
|
+
addReferencedFile(typeFilePath);
|
|
31025
|
+
}, sourceFile);
|
|
30964
31026
|
if (sourceFile.moduleAugmentations.length) {
|
|
30965
31027
|
const checker = program.getTypeChecker();
|
|
30966
31028
|
for (const moduleName of sourceFile.moduleAugmentations) {
|