typescript 5.0.0-dev.20230119 → 5.0.0-dev.20230120
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.decorators.d.ts +357 -0
- package/lib/lib.decorators.legacy.d.ts +24 -0
- package/lib/lib.es5.d.ts +3 -12
- package/lib/tsc.js +4902 -1603
- package/lib/tsserver.js +5708 -2186
- package/lib/tsserverlibrary.d.ts +106 -40
- package/lib/tsserverlibrary.js +5714 -2231
- package/lib/typescript.d.ts +52 -37
- package/lib/typescript.js +5497 -2052
- package/lib/typingsInstaller.js +243 -277
- package/package.json +1 -1
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.0";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230120`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -3421,11 +3421,6 @@ var EmitFlags = /* @__PURE__ */ ((EmitFlags3) => {
|
|
|
3421
3421
|
EmitFlags3[EmitFlags3["HasEndOfDeclarationMarker"] = 8388608] = "HasEndOfDeclarationMarker";
|
|
3422
3422
|
EmitFlags3[EmitFlags3["Iterator"] = 16777216] = "Iterator";
|
|
3423
3423
|
EmitFlags3[EmitFlags3["NoAsciiEscaping"] = 33554432] = "NoAsciiEscaping";
|
|
3424
|
-
EmitFlags3[EmitFlags3["TypeScriptClassWrapper"] = 67108864] = "TypeScriptClassWrapper";
|
|
3425
|
-
EmitFlags3[EmitFlags3["NeverApplyImportHelper"] = 134217728] = "NeverApplyImportHelper";
|
|
3426
|
-
EmitFlags3[EmitFlags3["IgnoreSourceNewlines"] = 268435456] = "IgnoreSourceNewlines";
|
|
3427
|
-
EmitFlags3[EmitFlags3["Immutable"] = 536870912] = "Immutable";
|
|
3428
|
-
EmitFlags3[EmitFlags3["IndirectCall"] = 1073741824] = "IndirectCall";
|
|
3429
3424
|
return EmitFlags3;
|
|
3430
3425
|
})(EmitFlags || {});
|
|
3431
3426
|
var commentPragmas = {
|
|
@@ -5363,10 +5358,9 @@ var Diagnostics = {
|
|
|
5363
5358
|
Line_terminator_not_permitted_before_arrow: diag(1200, 1 /* Error */, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."),
|
|
5364
5359
|
Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, 1 /* Error */, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", `Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
|
|
5365
5360
|
Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, 1 /* Error */, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),
|
|
5366
|
-
|
|
5361
|
+
Re_exporting_a_type_when_0_is_enabled_requires_using_export_type: diag(1205, 1 /* Error */, "Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205", "Re-exporting a type when '{0}' is enabled requires using 'export type'."),
|
|
5367
5362
|
Decorators_are_not_valid_here: diag(1206, 1 /* Error */, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."),
|
|
5368
5363
|
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, 1 /* Error */, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."),
|
|
5369
|
-
_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, 1 /* Error */, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."),
|
|
5370
5364
|
Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, 1 /* Error */, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"),
|
|
5371
5365
|
Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, 1 /* Error */, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),
|
|
5372
5366
|
A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, 1 /* Error */, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."),
|
|
@@ -5376,7 +5370,6 @@ var Diagnostics = {
|
|
|
5376
5370
|
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, 1 /* Error */, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."),
|
|
5377
5371
|
Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, 1 /* Error */, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),
|
|
5378
5372
|
Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, 1 /* Error */, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."),
|
|
5379
|
-
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning: diag(1219, 1 /* Error */, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."),
|
|
5380
5373
|
Generators_are_not_allowed_in_an_ambient_context: diag(1221, 1 /* Error */, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."),
|
|
5381
5374
|
An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, 1 /* Error */, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."),
|
|
5382
5375
|
_0_tag_already_specified: diag(1223, 1 /* Error */, "_0_tag_already_specified_1223", "'{0}' tag already specified."),
|
|
@@ -5423,7 +5416,7 @@ var Diagnostics = {
|
|
|
5423
5416
|
An_optional_element_cannot_follow_a_rest_element: diag(1266, 1 /* Error */, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."),
|
|
5424
5417
|
Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, 1 /* Error */, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."),
|
|
5425
5418
|
An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, 1 /* Error */, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),
|
|
5426
|
-
|
|
5419
|
+
Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled: diag(1269, 1 /* Error */, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269", "Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),
|
|
5427
5420
|
Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, 1 /* Error */, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."),
|
|
5428
5421
|
Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, 1 /* Error */, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),
|
|
5429
5422
|
A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, 1 /* Error */, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),
|
|
@@ -5432,6 +5425,17 @@ var Diagnostics = {
|
|
|
5432
5425
|
accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, 1 /* Error */, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."),
|
|
5433
5426
|
An_accessor_property_cannot_be_declared_optional: diag(1276, 1 /* Error */, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."),
|
|
5434
5427
|
_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: diag(1277, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"),
|
|
5428
|
+
The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0: diag(1278, 1 /* Error */, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278", "The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),
|
|
5429
|
+
The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0: diag(1279, 1 /* Error */, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279", "The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),
|
|
5430
|
+
Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement: diag(1280, 1 /* Error */, "Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280", "Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),
|
|
5431
|
+
Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead: diag(1281, 1 /* Error */, "Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281", "Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),
|
|
5432
|
+
An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1282, 1 /* Error */, "An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282", "An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),
|
|
5433
|
+
An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1283, 1 /* Error */, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),
|
|
5434
|
+
An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1284, 1 /* Error */, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),
|
|
5435
|
+
An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1285, 1 /* Error */, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),
|
|
5436
|
+
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5437
|
+
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5438
|
+
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
|
|
5435
5439
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5436
5440
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
|
|
5437
5441
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
|
|
@@ -5551,7 +5555,7 @@ var Diagnostics = {
|
|
|
5551
5555
|
The_file_is_in_the_program_because_Colon: diag(1430, 3 /* Message */, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
|
|
5552
5556
|
for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, 1 /* Error */, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
5553
5557
|
Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1 /* Error */, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
|
|
5554
|
-
|
|
5558
|
+
Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: diag(1433, 1 /* Error */, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."),
|
|
5555
5559
|
Unexpected_keyword_or_identifier: diag(1434, 1 /* Error */, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5556
5560
|
Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, 1 /* Error */, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
|
|
5557
5561
|
Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, 1 /* Error */, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."),
|
|
@@ -5564,7 +5568,7 @@ var Diagnostics = {
|
|
|
5564
5568
|
Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, 1 /* Error */, "Module_declaration_names_may_only_use_or_quoted_strings_1443", `Module declaration names may only use ' or " quoted strings.`),
|
|
5565
5569
|
_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),
|
|
5566
5570
|
_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."),
|
|
5567
|
-
|
|
5571
|
+
_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."),
|
|
5568
5572
|
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."),
|
|
5569
5573
|
Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
|
|
5570
5574
|
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"),
|
|
@@ -5592,6 +5596,8 @@ var Diagnostics = {
|
|
|
5592
5596
|
To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", `To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),
|
|
5593
5597
|
To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", 'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),
|
|
5594
5598
|
To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", 'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),
|
|
5599
|
+
_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1484, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
|
|
5600
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1485, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
|
|
5595
5601
|
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."),
|
|
5596
5602
|
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."),
|
|
5597
5603
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -6049,7 +6055,7 @@ var Diagnostics = {
|
|
|
6049
6055
|
This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: diag(2745, 1 /* Error */, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),
|
|
6050
6056
|
This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: diag(2746, 1 /* Error */, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),
|
|
6051
6057
|
_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, 1 /* Error */, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),
|
|
6052
|
-
|
|
6058
|
+
Cannot_access_ambient_const_enums_when_0_is_enabled: diag(2748, 1 /* Error */, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."),
|
|
6053
6059
|
_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, 1 /* Error */, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),
|
|
6054
6060
|
The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
|
|
6055
6061
|
Circularity_originates_in_type_at_this_location: diag(2751, 1 /* Error */, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."),
|
|
@@ -6297,7 +6303,7 @@ var Diagnostics = {
|
|
|
6297
6303
|
The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, 1 /* Error */, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),
|
|
6298
6304
|
Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, 1 /* Error */, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."),
|
|
6299
6305
|
Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, 1 /* Error */, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),
|
|
6300
|
-
|
|
6306
|
+
Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled: diag(5091, 1 /* Error */, "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),
|
|
6301
6307
|
The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."),
|
|
6302
6308
|
Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
|
|
6303
6309
|
Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
|
|
@@ -6310,6 +6316,9 @@ var Diagnostics = {
|
|
|
6310
6316
|
Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_ignoreDeprecations_Colon_2_to_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify 'ignoreDeprecations: "{2}"' to silence this error.`),
|
|
6311
6317
|
Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."),
|
|
6312
6318
|
Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
|
|
6319
|
+
Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."),
|
|
6320
|
+
Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),
|
|
6321
|
+
Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."),
|
|
6313
6322
|
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
|
6314
6323
|
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
|
6315
6324
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -6718,7 +6727,7 @@ var Diagnostics = {
|
|
|
6718
6727
|
Filters_results_from_the_include_option: diag(6627, 3 /* Message */, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."),
|
|
6719
6728
|
Remove_a_list_of_directories_from_the_watch_process: diag(6628, 3 /* Message */, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."),
|
|
6720
6729
|
Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, 3 /* Message */, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."),
|
|
6721
|
-
|
|
6730
|
+
Enable_experimental_support_for_legacy_experimental_decorators: diag(6630, 3 /* Message */, "Enable_experimental_support_for_legacy_experimental_decorators_6630", "Enable experimental support for legacy experimental decorators."),
|
|
6722
6731
|
Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, 3 /* Message */, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."),
|
|
6723
6732
|
Output_more_detailed_compiler_performance_information_after_building: diag(6632, 3 /* Message */, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."),
|
|
6724
6733
|
Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, 3 /* Message */, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."),
|
|
@@ -6804,6 +6813,7 @@ var Diagnostics = {
|
|
|
6804
6813
|
Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, 3 /* Message */, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."),
|
|
6805
6814
|
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
|
|
6806
6815
|
Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
|
|
6816
|
+
Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
|
|
6807
6817
|
one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
|
|
6808
6818
|
one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
|
|
6809
6819
|
type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
|
|
@@ -6939,6 +6949,7 @@ var Diagnostics = {
|
|
|
6939
6949
|
You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."),
|
|
6940
6950
|
You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."),
|
|
6941
6951
|
Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."),
|
|
6952
|
+
Decorators_must_come_after_export_or_export_default_in_JavaScript_files: diag(8038, 1 /* Error */, "Decorators_must_come_after_export_or_export_default_in_JavaScript_files_8038", "Decorators must come after 'export' or 'export default' in JavaScript files."),
|
|
6942
6953
|
Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),
|
|
6943
6954
|
Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),
|
|
6944
6955
|
JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17e3, 1 /* Error */, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."),
|
|
@@ -9336,7 +9347,7 @@ function createTextChangeRange(span, newLength) {
|
|
|
9336
9347
|
}
|
|
9337
9348
|
var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
|
|
9338
9349
|
function isParameterPropertyDeclaration(node, parent) {
|
|
9339
|
-
return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 173 /* Constructor */;
|
|
9350
|
+
return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 173 /* Constructor */;
|
|
9340
9351
|
}
|
|
9341
9352
|
function walkUpBindingElementsAndPatterns(binding) {
|
|
9342
9353
|
let node = binding.parent;
|
|
@@ -9539,6 +9550,11 @@ function getAssignedName(node) {
|
|
|
9539
9550
|
return node.parent.name;
|
|
9540
9551
|
}
|
|
9541
9552
|
}
|
|
9553
|
+
function getModifiers(node) {
|
|
9554
|
+
if (hasSyntacticModifier(node, 126975 /* Modifier */)) {
|
|
9555
|
+
return filter(node.modifiers, isModifier);
|
|
9556
|
+
}
|
|
9557
|
+
}
|
|
9542
9558
|
function getJSDocParameterTagsWorker(param, noCache) {
|
|
9543
9559
|
if (param.name) {
|
|
9544
9560
|
if (isIdentifier(param.name)) {
|
|
@@ -9919,6 +9935,7 @@ function isLeftHandSideExpressionKind(kind) {
|
|
|
9919
9935
|
case 230 /* ExpressionWithTypeArguments */:
|
|
9920
9936
|
case 233 /* MetaProperty */:
|
|
9921
9937
|
case 100 /* ImportKeyword */:
|
|
9938
|
+
case 279 /* MissingDeclaration */:
|
|
9922
9939
|
return true;
|
|
9923
9940
|
default:
|
|
9924
9941
|
return false;
|
|
@@ -12831,7 +12848,7 @@ function createNodeConverters(factory2) {
|
|
|
12831
12848
|
if (!node.body)
|
|
12832
12849
|
return Debug.fail(`Cannot convert a FunctionDeclaration without a body`);
|
|
12833
12850
|
const updated = factory2.createFunctionExpression(
|
|
12834
|
-
node
|
|
12851
|
+
getModifiers(node),
|
|
12835
12852
|
node.asteriskToken,
|
|
12836
12853
|
node.name,
|
|
12837
12854
|
node.typeParameters,
|
|
@@ -13566,6 +13583,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13566
13583
|
createArraySliceCall,
|
|
13567
13584
|
createArrayConcatCall,
|
|
13568
13585
|
createObjectDefinePropertyCall,
|
|
13586
|
+
createObjectGetOwnPropertyDescriptorCall,
|
|
13569
13587
|
createReflectGetCall,
|
|
13570
13588
|
createReflectSetCall,
|
|
13571
13589
|
createPropertyDescriptor,
|
|
@@ -14112,7 +14130,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14112
14130
|
const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */);
|
|
14113
14131
|
node.body = body;
|
|
14114
14132
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */;
|
|
14115
|
-
node.illegalDecorators = void 0;
|
|
14116
14133
|
node.modifiers = void 0;
|
|
14117
14134
|
node.jsDoc = void 0;
|
|
14118
14135
|
node.locals = void 0;
|
|
@@ -14126,7 +14143,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14126
14143
|
}
|
|
14127
14144
|
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
14128
14145
|
if (updated !== original) {
|
|
14129
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
14130
14146
|
updated.modifiers = original.modifiers;
|
|
14131
14147
|
}
|
|
14132
14148
|
return update(updated, original);
|
|
@@ -14137,7 +14153,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14137
14153
|
node.parameters = createNodeArray(parameters);
|
|
14138
14154
|
node.body = body;
|
|
14139
14155
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */;
|
|
14140
|
-
node.illegalDecorators = void 0;
|
|
14141
14156
|
node.typeParameters = void 0;
|
|
14142
14157
|
node.type = void 0;
|
|
14143
14158
|
node.typeArguments = void 0;
|
|
@@ -14153,7 +14168,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14153
14168
|
}
|
|
14154
14169
|
function finishUpdateConstructorDeclaration(updated, original) {
|
|
14155
14170
|
if (updated !== original) {
|
|
14156
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
14157
14171
|
updated.typeParameters = original.typeParameters;
|
|
14158
14172
|
updated.type = original.type;
|
|
14159
14173
|
}
|
|
@@ -14258,7 +14272,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14258
14272
|
node.parameters = asNodeArray(parameters);
|
|
14259
14273
|
node.type = type;
|
|
14260
14274
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14261
|
-
node.illegalDecorators = void 0;
|
|
14262
14275
|
node.jsDoc = void 0;
|
|
14263
14276
|
node.locals = void 0;
|
|
14264
14277
|
node.nextContainer = void 0;
|
|
@@ -15226,7 +15239,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15226
15239
|
if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
15227
15240
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
15228
15241
|
}
|
|
15229
|
-
node.illegalDecorators = void 0;
|
|
15230
15242
|
node.jsDoc = void 0;
|
|
15231
15243
|
node.flowNode = void 0;
|
|
15232
15244
|
return node;
|
|
@@ -15480,7 +15492,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15480
15492
|
const isAsyncGenerator = isAsync && isGenerator;
|
|
15481
15493
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
15482
15494
|
}
|
|
15483
|
-
node.illegalDecorators = void 0;
|
|
15484
15495
|
node.typeArguments = void 0;
|
|
15485
15496
|
node.jsDoc = void 0;
|
|
15486
15497
|
node.locals = void 0;
|
|
@@ -15494,7 +15505,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15494
15505
|
}
|
|
15495
15506
|
function finishUpdateFunctionDeclaration(updated, original) {
|
|
15496
15507
|
if (updated !== original) {
|
|
15497
|
-
updated.
|
|
15508
|
+
if (updated.modifiers === original.modifiers) {
|
|
15509
|
+
updated.modifiers = original.modifiers;
|
|
15510
|
+
}
|
|
15498
15511
|
}
|
|
15499
15512
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
15500
15513
|
}
|
|
@@ -15527,18 +15540,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15527
15540
|
node.heritageClauses = asNodeArray(heritageClauses);
|
|
15528
15541
|
node.members = createNodeArray(members);
|
|
15529
15542
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
15530
|
-
node.illegalDecorators = void 0;
|
|
15531
15543
|
node.jsDoc = void 0;
|
|
15532
15544
|
return node;
|
|
15533
15545
|
}
|
|
15534
15546
|
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
15535
|
-
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ?
|
|
15536
|
-
}
|
|
15537
|
-
function finishUpdateInterfaceDeclaration(updated, original) {
|
|
15538
|
-
if (updated !== original) {
|
|
15539
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15540
|
-
}
|
|
15541
|
-
return update(updated, original);
|
|
15547
|
+
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node;
|
|
15542
15548
|
}
|
|
15543
15549
|
function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
|
|
15544
15550
|
const node = createBaseDeclaration(262 /* TypeAliasDeclaration */);
|
|
@@ -15547,20 +15553,13 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15547
15553
|
node.typeParameters = asNodeArray(typeParameters);
|
|
15548
15554
|
node.type = type;
|
|
15549
15555
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
15550
|
-
node.illegalDecorators = void 0;
|
|
15551
15556
|
node.jsDoc = void 0;
|
|
15552
15557
|
node.locals = void 0;
|
|
15553
15558
|
node.nextContainer = void 0;
|
|
15554
15559
|
return node;
|
|
15555
15560
|
}
|
|
15556
15561
|
function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
|
|
15557
|
-
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ?
|
|
15558
|
-
}
|
|
15559
|
-
function finishUpdateTypeAliasDeclaration(updated, original) {
|
|
15560
|
-
if (updated !== original) {
|
|
15561
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15562
|
-
}
|
|
15563
|
-
return update(updated, original);
|
|
15562
|
+
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node;
|
|
15564
15563
|
}
|
|
15565
15564
|
function createEnumDeclaration(modifiers, name, members) {
|
|
15566
15565
|
const node = createBaseDeclaration(263 /* EnumDeclaration */);
|
|
@@ -15569,18 +15568,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15569
15568
|
node.members = createNodeArray(members);
|
|
15570
15569
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */;
|
|
15571
15570
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15572
|
-
node.illegalDecorators = void 0;
|
|
15573
15571
|
node.jsDoc = void 0;
|
|
15574
15572
|
return node;
|
|
15575
15573
|
}
|
|
15576
15574
|
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
15577
|
-
return node.modifiers !== modifiers || node.name !== name || node.members !== members ?
|
|
15578
|
-
}
|
|
15579
|
-
function finishUpdateEnumDeclaration(updated, original) {
|
|
15580
|
-
if (updated !== original) {
|
|
15581
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15582
|
-
}
|
|
15583
|
-
return update(updated, original);
|
|
15575
|
+
return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node;
|
|
15584
15576
|
}
|
|
15585
15577
|
function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) {
|
|
15586
15578
|
const node = createBaseDeclaration(264 /* ModuleDeclaration */);
|
|
@@ -15594,20 +15586,13 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15594
15586
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */;
|
|
15595
15587
|
}
|
|
15596
15588
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15597
|
-
node.illegalDecorators = void 0;
|
|
15598
15589
|
node.jsDoc = void 0;
|
|
15599
15590
|
node.locals = void 0;
|
|
15600
15591
|
node.nextContainer = void 0;
|
|
15601
15592
|
return node;
|
|
15602
15593
|
}
|
|
15603
15594
|
function updateModuleDeclaration(node, modifiers, name, body) {
|
|
15604
|
-
return node.modifiers !== modifiers || node.name !== name || node.body !== body ?
|
|
15605
|
-
}
|
|
15606
|
-
function finishUpdateModuleDeclaration(updated, original) {
|
|
15607
|
-
if (updated !== original) {
|
|
15608
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15609
|
-
}
|
|
15610
|
-
return update(updated, original);
|
|
15595
|
+
return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node;
|
|
15611
15596
|
}
|
|
15612
15597
|
function createModuleBlock(statements) {
|
|
15613
15598
|
const node = createBaseNode(265 /* ModuleBlock */);
|
|
@@ -15634,7 +15619,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15634
15619
|
const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */);
|
|
15635
15620
|
node.name = asName(name);
|
|
15636
15621
|
node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */;
|
|
15637
|
-
node.illegalDecorators = void 0;
|
|
15638
15622
|
node.modifiers = void 0;
|
|
15639
15623
|
node.jsDoc = void 0;
|
|
15640
15624
|
return node;
|
|
@@ -15644,7 +15628,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15644
15628
|
}
|
|
15645
15629
|
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
15646
15630
|
if (updated !== original) {
|
|
15647
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15648
15631
|
updated.modifiers = original.modifiers;
|
|
15649
15632
|
}
|
|
15650
15633
|
return update(updated, original);
|
|
@@ -15660,18 +15643,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15660
15643
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
15661
15644
|
}
|
|
15662
15645
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15663
|
-
node.illegalDecorators = void 0;
|
|
15664
15646
|
node.jsDoc = void 0;
|
|
15665
15647
|
return node;
|
|
15666
15648
|
}
|
|
15667
15649
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
15668
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ?
|
|
15669
|
-
}
|
|
15670
|
-
function finishUpdateImportEqualsDeclaration(updated, original) {
|
|
15671
|
-
if (updated !== original) {
|
|
15672
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15673
|
-
}
|
|
15674
|
-
return update(updated, original);
|
|
15650
|
+
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
15675
15651
|
}
|
|
15676
15652
|
function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
|
|
15677
15653
|
const node = createBaseNode(269 /* ImportDeclaration */);
|
|
@@ -15681,18 +15657,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15681
15657
|
node.assertClause = assertClause;
|
|
15682
15658
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15683
15659
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15684
|
-
node.illegalDecorators = void 0;
|
|
15685
15660
|
node.jsDoc = void 0;
|
|
15686
15661
|
return node;
|
|
15687
15662
|
}
|
|
15688
15663
|
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
15689
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ?
|
|
15690
|
-
}
|
|
15691
|
-
function finishUpdateImportDeclaration(updated, original) {
|
|
15692
|
-
if (updated !== original) {
|
|
15693
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15694
|
-
}
|
|
15695
|
-
return update(updated, original);
|
|
15664
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node;
|
|
15696
15665
|
}
|
|
15697
15666
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
15698
15667
|
const node = createBaseDeclaration(270 /* ImportClause */);
|
|
@@ -15792,18 +15761,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15792
15761
|
) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);
|
|
15793
15762
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
15794
15763
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15795
|
-
node.illegalDecorators = void 0;
|
|
15796
15764
|
node.jsDoc = void 0;
|
|
15797
15765
|
return node;
|
|
15798
15766
|
}
|
|
15799
15767
|
function updateExportAssignment(node, modifiers, expression) {
|
|
15800
|
-
return node.modifiers !== modifiers || node.expression !== expression ?
|
|
15801
|
-
}
|
|
15802
|
-
function finishUpdateExportAssignment(updated, original) {
|
|
15803
|
-
if (updated !== original) {
|
|
15804
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15805
|
-
}
|
|
15806
|
-
return update(updated, original);
|
|
15768
|
+
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node;
|
|
15807
15769
|
}
|
|
15808
15770
|
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
15809
15771
|
const node = createBaseDeclaration(275 /* ExportDeclaration */);
|
|
@@ -15814,7 +15776,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15814
15776
|
node.assertClause = assertClause;
|
|
15815
15777
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15816
15778
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15817
|
-
node.illegalDecorators = void 0;
|
|
15818
15779
|
node.jsDoc = void 0;
|
|
15819
15780
|
return node;
|
|
15820
15781
|
}
|
|
@@ -15823,7 +15784,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15823
15784
|
}
|
|
15824
15785
|
function finishUpdateExportDeclaration(updated, original) {
|
|
15825
15786
|
if (updated !== original) {
|
|
15826
|
-
updated.
|
|
15787
|
+
if (updated.modifiers === original.modifiers) {
|
|
15788
|
+
updated.modifiers = original.modifiers;
|
|
15789
|
+
}
|
|
15827
15790
|
}
|
|
15828
15791
|
return update(updated, original);
|
|
15829
15792
|
}
|
|
@@ -16302,7 +16265,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16302
16265
|
node.name = asName(name);
|
|
16303
16266
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
16304
16267
|
node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer);
|
|
16305
|
-
node.illegalDecorators = void 0;
|
|
16306
16268
|
node.modifiers = void 0;
|
|
16307
16269
|
node.questionToken = void 0;
|
|
16308
16270
|
node.exclamationToken = void 0;
|
|
@@ -16314,7 +16276,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16314
16276
|
}
|
|
16315
16277
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
16316
16278
|
if (updated !== original) {
|
|
16317
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
16318
16279
|
updated.modifiers = original.modifiers;
|
|
16319
16280
|
updated.questionToken = original.questionToken;
|
|
16320
16281
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -16327,7 +16288,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16327
16288
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
16328
16289
|
node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */;
|
|
16329
16290
|
node.equalsToken = void 0;
|
|
16330
|
-
node.illegalDecorators = void 0;
|
|
16331
16291
|
node.modifiers = void 0;
|
|
16332
16292
|
node.questionToken = void 0;
|
|
16333
16293
|
node.exclamationToken = void 0;
|
|
@@ -16339,11 +16299,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16339
16299
|
}
|
|
16340
16300
|
function finishUpdateShorthandPropertyAssignment(updated, original) {
|
|
16341
16301
|
if (updated !== original) {
|
|
16342
|
-
updated.equalsToken = original.equalsToken;
|
|
16343
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
16344
16302
|
updated.modifiers = original.modifiers;
|
|
16345
16303
|
updated.questionToken = original.questionToken;
|
|
16346
16304
|
updated.exclamationToken = original.exclamationToken;
|
|
16305
|
+
updated.equalsToken = original.equalsToken;
|
|
16347
16306
|
}
|
|
16348
16307
|
return update(updated, original);
|
|
16349
16308
|
}
|
|
@@ -16802,6 +16761,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16802
16761
|
function createObjectDefinePropertyCall(target, propertyName, attributes) {
|
|
16803
16762
|
return createGlobalMethodCall("Object", "defineProperty", [target, asExpression(propertyName), attributes]);
|
|
16804
16763
|
}
|
|
16764
|
+
function createObjectGetOwnPropertyDescriptorCall(target, propertyName) {
|
|
16765
|
+
return createGlobalMethodCall("Object", "getOwnPropertyDescriptor", [target, asExpression(propertyName)]);
|
|
16766
|
+
}
|
|
16805
16767
|
function createReflectGetCall(target, propertyKey, receiver) {
|
|
16806
16768
|
return createGlobalMethodCall("Reflect", "get", receiver ? [target, propertyKey, receiver] : [target, propertyKey]);
|
|
16807
16769
|
}
|
|
@@ -17410,6 +17372,7 @@ function setOriginalNode(node, original) {
|
|
|
17410
17372
|
function mergeEmitNode(sourceEmitNode, destEmitNode) {
|
|
17411
17373
|
const {
|
|
17412
17374
|
flags,
|
|
17375
|
+
internalFlags,
|
|
17413
17376
|
leadingComments,
|
|
17414
17377
|
trailingComments,
|
|
17415
17378
|
commentRange,
|
|
@@ -17427,7 +17390,9 @@ function mergeEmitNode(sourceEmitNode, destEmitNode) {
|
|
|
17427
17390
|
if (trailingComments)
|
|
17428
17391
|
destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments);
|
|
17429
17392
|
if (flags)
|
|
17430
|
-
destEmitNode.flags = flags
|
|
17393
|
+
destEmitNode.flags = flags;
|
|
17394
|
+
if (internalFlags)
|
|
17395
|
+
destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */;
|
|
17431
17396
|
if (commentRange)
|
|
17432
17397
|
destEmitNode.commentRange = commentRange;
|
|
17433
17398
|
if (sourceMapRange)
|
|
@@ -17469,7 +17434,7 @@ function getOrCreateEmitNode(node) {
|
|
|
17469
17434
|
}
|
|
17470
17435
|
node.emitNode = {};
|
|
17471
17436
|
} else {
|
|
17472
|
-
Debug.assert(!(node.emitNode.
|
|
17437
|
+
Debug.assert(!(node.emitNode.internalFlags & 8 /* Immutable */), "Invalid attempt to mutate an immutable node.");
|
|
17473
17438
|
}
|
|
17474
17439
|
return node.emitNode;
|
|
17475
17440
|
}
|
|
@@ -17989,8 +17954,11 @@ function findUseStrictPrologue(statements) {
|
|
|
17989
17954
|
}
|
|
17990
17955
|
return void 0;
|
|
17991
17956
|
}
|
|
17957
|
+
function isCommaExpression(node) {
|
|
17958
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */;
|
|
17959
|
+
}
|
|
17992
17960
|
function isCommaSequence(node) {
|
|
17993
|
-
return node
|
|
17961
|
+
return isCommaExpression(node) || isCommaListExpression(node);
|
|
17994
17962
|
}
|
|
17995
17963
|
function isJSDocTypeAssertion(node) {
|
|
17996
17964
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -18004,6 +17972,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
18004
17972
|
return (kinds & 1 /* Parentheses */) !== 0;
|
|
18005
17973
|
case 213 /* TypeAssertionExpression */:
|
|
18006
17974
|
case 231 /* AsExpression */:
|
|
17975
|
+
case 230 /* ExpressionWithTypeArguments */:
|
|
18007
17976
|
case 235 /* SatisfiesExpression */:
|
|
18008
17977
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
18009
17978
|
case 232 /* NonNullExpression */:
|
|
@@ -18352,7 +18321,7 @@ var forEachChildTable = {
|
|
|
18352
18321
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression);
|
|
18353
18322
|
},
|
|
18354
18323
|
[300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) {
|
|
18355
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18324
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer);
|
|
18356
18325
|
},
|
|
18357
18326
|
[301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) {
|
|
18358
18327
|
return visitNode2(cbNode, node.expression);
|
|
@@ -18367,7 +18336,7 @@ var forEachChildTable = {
|
|
|
18367
18336
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);
|
|
18368
18337
|
},
|
|
18369
18338
|
[299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) {
|
|
18370
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18339
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer);
|
|
18371
18340
|
},
|
|
18372
18341
|
[257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) {
|
|
18373
18342
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);
|
|
@@ -18376,7 +18345,7 @@ var forEachChildTable = {
|
|
|
18376
18345
|
return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);
|
|
18377
18346
|
},
|
|
18378
18347
|
[178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) {
|
|
18379
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18348
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
18380
18349
|
},
|
|
18381
18350
|
[182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) {
|
|
18382
18351
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -18393,7 +18362,7 @@ var forEachChildTable = {
|
|
|
18393
18362
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
18394
18363
|
},
|
|
18395
18364
|
[173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) {
|
|
18396
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18365
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);
|
|
18397
18366
|
},
|
|
18398
18367
|
[174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) {
|
|
18399
18368
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);
|
|
@@ -18402,7 +18371,7 @@ var forEachChildTable = {
|
|
|
18402
18371
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);
|
|
18403
18372
|
},
|
|
18404
18373
|
[259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) {
|
|
18405
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18374
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);
|
|
18406
18375
|
},
|
|
18407
18376
|
[215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) {
|
|
18408
18377
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body);
|
|
@@ -18411,7 +18380,7 @@ var forEachChildTable = {
|
|
|
18411
18380
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body);
|
|
18412
18381
|
},
|
|
18413
18382
|
[172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) {
|
|
18414
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18383
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body);
|
|
18415
18384
|
},
|
|
18416
18385
|
[180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) {
|
|
18417
18386
|
return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
@@ -18532,7 +18501,7 @@ var forEachChildTable = {
|
|
|
18532
18501
|
return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken);
|
|
18533
18502
|
},
|
|
18534
18503
|
[240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) {
|
|
18535
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18504
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList);
|
|
18536
18505
|
},
|
|
18537
18506
|
[258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) {
|
|
18538
18507
|
return visitNodes(cbNode, cbNodes, node.declarations);
|
|
@@ -18596,25 +18565,25 @@ var forEachChildTable = {
|
|
|
18596
18565
|
[260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression,
|
|
18597
18566
|
[228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression,
|
|
18598
18567
|
[261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) {
|
|
18599
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18568
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members);
|
|
18600
18569
|
},
|
|
18601
18570
|
[262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) {
|
|
18602
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18571
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type);
|
|
18603
18572
|
},
|
|
18604
18573
|
[263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) {
|
|
18605
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18574
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members);
|
|
18606
18575
|
},
|
|
18607
18576
|
[302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) {
|
|
18608
18577
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);
|
|
18609
18578
|
},
|
|
18610
18579
|
[264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) {
|
|
18611
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18580
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body);
|
|
18612
18581
|
},
|
|
18613
18582
|
[268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) {
|
|
18614
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18583
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
18615
18584
|
},
|
|
18616
18585
|
[269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
18617
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18586
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause);
|
|
18618
18587
|
},
|
|
18619
18588
|
[270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
18620
18589
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
@@ -18626,7 +18595,7 @@ var forEachChildTable = {
|
|
|
18626
18595
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
18627
18596
|
},
|
|
18628
18597
|
[267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
18629
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18598
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name);
|
|
18630
18599
|
},
|
|
18631
18600
|
[271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) {
|
|
18632
18601
|
return visitNode2(cbNode, node.name);
|
|
@@ -18637,12 +18606,12 @@ var forEachChildTable = {
|
|
|
18637
18606
|
[272 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
18638
18607
|
[276 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
18639
18608
|
[275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
18640
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18609
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause);
|
|
18641
18610
|
},
|
|
18642
18611
|
[273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
18643
18612
|
[278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
18644
18613
|
[274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) {
|
|
18645
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18614
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression);
|
|
18646
18615
|
},
|
|
18647
18616
|
[225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) {
|
|
18648
18617
|
return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans);
|
|
@@ -18669,7 +18638,7 @@ var forEachChildTable = {
|
|
|
18669
18638
|
return visitNode2(cbNode, node.expression);
|
|
18670
18639
|
},
|
|
18671
18640
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
18672
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18641
|
+
return visitNodes(cbNode, cbNodes, node.modifiers);
|
|
18673
18642
|
},
|
|
18674
18643
|
[357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
18675
18644
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
@@ -19872,7 +19841,7 @@ var Parser;
|
|
|
19872
19841
|
}
|
|
19873
19842
|
}
|
|
19874
19843
|
function canFollowExportModifier() {
|
|
19875
|
-
return token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier();
|
|
19844
|
+
return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier();
|
|
19876
19845
|
}
|
|
19877
19846
|
function nextTokenCanFollowExportModifier() {
|
|
19878
19847
|
nextToken();
|
|
@@ -19886,7 +19855,7 @@ var Parser;
|
|
|
19886
19855
|
}
|
|
19887
19856
|
function nextTokenCanFollowDefaultKeyword() {
|
|
19888
19857
|
nextToken();
|
|
19889
|
-
return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine);
|
|
19858
|
+
return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine);
|
|
19890
19859
|
}
|
|
19891
19860
|
function isListElement(parsingContext2, inErrorRecovery) {
|
|
19892
19861
|
const node = currentNode(parsingContext2);
|
|
@@ -20733,6 +20702,8 @@ var Parser;
|
|
|
20733
20702
|
function parseTypeParameter() {
|
|
20734
20703
|
const pos = getNodePos();
|
|
20735
20704
|
const modifiers = parseModifiers(
|
|
20705
|
+
/*allowDecorators*/
|
|
20706
|
+
false,
|
|
20736
20707
|
/*permitConstAsModifier*/
|
|
20737
20708
|
true
|
|
20738
20709
|
);
|
|
@@ -20785,10 +20756,16 @@ var Parser;
|
|
|
20785
20756
|
function parseParameterWorker(inOuterAwaitContext, allowAmbiguity = true) {
|
|
20786
20757
|
const pos = getNodePos();
|
|
20787
20758
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
20788
|
-
const
|
|
20759
|
+
const modifiers = inOuterAwaitContext ? doInAwaitContext(() => parseModifiers(
|
|
20760
|
+
/*allowDecorators*/
|
|
20761
|
+
true
|
|
20762
|
+
)) : doOutsideOfAwaitContext(() => parseModifiers(
|
|
20763
|
+
/*allowDecorators*/
|
|
20764
|
+
true
|
|
20765
|
+
));
|
|
20789
20766
|
if (token() === 108 /* ThisKeyword */) {
|
|
20790
20767
|
const node2 = factory2.createParameterDeclaration(
|
|
20791
|
-
|
|
20768
|
+
modifiers,
|
|
20792
20769
|
/*dotDotDotToken*/
|
|
20793
20770
|
void 0,
|
|
20794
20771
|
createIdentifier(
|
|
@@ -20801,14 +20778,14 @@ var Parser;
|
|
|
20801
20778
|
/*initializer*/
|
|
20802
20779
|
void 0
|
|
20803
20780
|
);
|
|
20804
|
-
|
|
20805
|
-
|
|
20781
|
+
const modifier = firstOrUndefined(modifiers);
|
|
20782
|
+
if (modifier) {
|
|
20783
|
+
parseErrorAtRange(modifier, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);
|
|
20806
20784
|
}
|
|
20807
20785
|
return withJSDoc(finishNode(node2, pos), hasJSDoc);
|
|
20808
20786
|
}
|
|
20809
20787
|
const savedTopLevel = topLevel;
|
|
20810
20788
|
topLevel = false;
|
|
20811
|
-
const modifiers = combineDecoratorsAndModifiers(decorators, parseModifiers());
|
|
20812
20789
|
const dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */);
|
|
20813
20790
|
if (!allowAmbiguity && !isParameterNameStart()) {
|
|
20814
20791
|
return void 0;
|
|
@@ -20920,7 +20897,7 @@ var Parser;
|
|
|
20920
20897
|
nextToken();
|
|
20921
20898
|
return token() === 58 /* ColonToken */ || token() === 27 /* CommaToken */ || token() === 23 /* CloseBracketToken */;
|
|
20922
20899
|
}
|
|
20923
|
-
function parseIndexSignatureDeclaration(pos, hasJSDoc,
|
|
20900
|
+
function parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers) {
|
|
20924
20901
|
const parameters = parseBracketedList(ParsingContext.Parameters, () => parseParameter(
|
|
20925
20902
|
/*inOuterAwaitContext*/
|
|
20926
20903
|
false
|
|
@@ -20928,7 +20905,6 @@ var Parser;
|
|
|
20928
20905
|
const type = parseTypeAnnotation();
|
|
20929
20906
|
parseTypeMemberSemicolon();
|
|
20930
20907
|
const node = factory2.createIndexSignature(modifiers, parameters, type);
|
|
20931
|
-
node.illegalDecorators = decorators;
|
|
20932
20908
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
20933
20909
|
}
|
|
20934
20910
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -20983,37 +20959,18 @@ var Parser;
|
|
|
20983
20959
|
}
|
|
20984
20960
|
const pos = getNodePos();
|
|
20985
20961
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
20986
|
-
const modifiers = parseModifiers(
|
|
20962
|
+
const modifiers = parseModifiers(
|
|
20963
|
+
/*allowDecorators*/
|
|
20964
|
+
false
|
|
20965
|
+
);
|
|
20987
20966
|
if (parseContextualModifier(137 /* GetKeyword */)) {
|
|
20988
|
-
return parseAccessorDeclaration(
|
|
20989
|
-
pos,
|
|
20990
|
-
hasJSDoc,
|
|
20991
|
-
/*decorators*/
|
|
20992
|
-
void 0,
|
|
20993
|
-
modifiers,
|
|
20994
|
-
174 /* GetAccessor */,
|
|
20995
|
-
4 /* Type */
|
|
20996
|
-
);
|
|
20967
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */);
|
|
20997
20968
|
}
|
|
20998
20969
|
if (parseContextualModifier(151 /* SetKeyword */)) {
|
|
20999
|
-
return parseAccessorDeclaration(
|
|
21000
|
-
pos,
|
|
21001
|
-
hasJSDoc,
|
|
21002
|
-
/*decorators*/
|
|
21003
|
-
void 0,
|
|
21004
|
-
modifiers,
|
|
21005
|
-
175 /* SetAccessor */,
|
|
21006
|
-
4 /* Type */
|
|
21007
|
-
);
|
|
20970
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */);
|
|
21008
20971
|
}
|
|
21009
20972
|
if (isIndexSignature()) {
|
|
21010
|
-
return parseIndexSignatureDeclaration(
|
|
21011
|
-
pos,
|
|
21012
|
-
hasJSDoc,
|
|
21013
|
-
/*decorators*/
|
|
21014
|
-
void 0,
|
|
21015
|
-
modifiers
|
|
21016
|
-
);
|
|
20973
|
+
return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers);
|
|
21017
20974
|
}
|
|
21018
20975
|
return parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers);
|
|
21019
20976
|
}
|
|
@@ -21493,7 +21450,10 @@ var Parser;
|
|
|
21493
21450
|
}
|
|
21494
21451
|
function skipParameterStart() {
|
|
21495
21452
|
if (isModifierKind(token())) {
|
|
21496
|
-
parseModifiers(
|
|
21453
|
+
parseModifiers(
|
|
21454
|
+
/*allowDecorators*/
|
|
21455
|
+
false
|
|
21456
|
+
);
|
|
21497
21457
|
}
|
|
21498
21458
|
if (isIdentifier2() || token() === 108 /* ThisKeyword */) {
|
|
21499
21459
|
nextToken();
|
|
@@ -21621,6 +21581,7 @@ var Parser;
|
|
|
21621
21581
|
case 133 /* AwaitKeyword */:
|
|
21622
21582
|
case 125 /* YieldKeyword */:
|
|
21623
21583
|
case 80 /* PrivateIdentifier */:
|
|
21584
|
+
case 59 /* AtToken */:
|
|
21624
21585
|
return true;
|
|
21625
21586
|
default:
|
|
21626
21587
|
if (isBinaryOperator2()) {
|
|
@@ -22712,6 +22673,8 @@ var Parser;
|
|
|
22712
22673
|
break;
|
|
22713
22674
|
}
|
|
22714
22675
|
return parseFunctionExpression();
|
|
22676
|
+
case 59 /* AtToken */:
|
|
22677
|
+
return parseDecoratedExpression();
|
|
22715
22678
|
case 84 /* ClassKeyword */:
|
|
22716
22679
|
return parseClassExpression();
|
|
22717
22680
|
case 98 /* FunctionKeyword */:
|
|
@@ -22779,13 +22742,15 @@ var Parser;
|
|
|
22779
22742
|
);
|
|
22780
22743
|
return withJSDoc(finishNode(factory2.createSpreadAssignment(expression), pos), hasJSDoc);
|
|
22781
22744
|
}
|
|
22782
|
-
const
|
|
22783
|
-
|
|
22745
|
+
const modifiers = parseModifiers(
|
|
22746
|
+
/*allowDecorators*/
|
|
22747
|
+
true
|
|
22748
|
+
);
|
|
22784
22749
|
if (parseContextualModifier(137 /* GetKeyword */)) {
|
|
22785
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
22750
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */);
|
|
22786
22751
|
}
|
|
22787
22752
|
if (parseContextualModifier(151 /* SetKeyword */)) {
|
|
22788
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
22753
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */);
|
|
22789
22754
|
}
|
|
22790
22755
|
const asteriskToken = parseOptionalToken(41 /* AsteriskToken */);
|
|
22791
22756
|
const tokenIsIdentifier = isIdentifier2();
|
|
@@ -22793,7 +22758,7 @@ var Parser;
|
|
|
22793
22758
|
const questionToken = parseOptionalToken(57 /* QuestionToken */);
|
|
22794
22759
|
const exclamationToken = parseOptionalToken(53 /* ExclamationToken */);
|
|
22795
22760
|
if (asteriskToken || token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) {
|
|
22796
|
-
return parseMethodDeclaration(pos, hasJSDoc,
|
|
22761
|
+
return parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken);
|
|
22797
22762
|
}
|
|
22798
22763
|
let node;
|
|
22799
22764
|
const isShorthandPropertyAssignment2 = tokenIsIdentifier && token() !== 58 /* ColonToken */;
|
|
@@ -22813,7 +22778,6 @@ var Parser;
|
|
|
22813
22778
|
));
|
|
22814
22779
|
node = factory2.createPropertyAssignment(name, initializer);
|
|
22815
22780
|
}
|
|
22816
|
-
node.illegalDecorators = decorators;
|
|
22817
22781
|
node.modifiers = modifiers;
|
|
22818
22782
|
node.questionToken = questionToken;
|
|
22819
22783
|
node.exclamationToken = exclamationToken;
|
|
@@ -22841,7 +22805,10 @@ var Parser;
|
|
|
22841
22805
|
);
|
|
22842
22806
|
const pos = getNodePos();
|
|
22843
22807
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
22844
|
-
const modifiers = parseModifiers(
|
|
22808
|
+
const modifiers = parseModifiers(
|
|
22809
|
+
/*allowDecorators*/
|
|
22810
|
+
false
|
|
22811
|
+
);
|
|
22845
22812
|
parseExpected(98 /* FunctionKeyword */);
|
|
22846
22813
|
const asteriskToken = parseOptionalToken(41 /* AsteriskToken */);
|
|
22847
22814
|
const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;
|
|
@@ -23213,7 +23180,7 @@ var Parser;
|
|
|
23213
23180
|
if (currentToken2 === 154 /* TypeKeyword */) {
|
|
23214
23181
|
currentToken2 = lookAhead(nextToken);
|
|
23215
23182
|
}
|
|
23216
|
-
if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */) {
|
|
23183
|
+
if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) {
|
|
23217
23184
|
return true;
|
|
23218
23185
|
}
|
|
23219
23186
|
continue;
|
|
@@ -23297,8 +23264,6 @@ var Parser;
|
|
|
23297
23264
|
return parseVariableStatement(
|
|
23298
23265
|
getNodePos(),
|
|
23299
23266
|
hasPrecedingJSDocComment(),
|
|
23300
|
-
/*decorators*/
|
|
23301
|
-
void 0,
|
|
23302
23267
|
/*modifiers*/
|
|
23303
23268
|
void 0
|
|
23304
23269
|
);
|
|
@@ -23307,8 +23272,6 @@ var Parser;
|
|
|
23307
23272
|
return parseVariableStatement(
|
|
23308
23273
|
getNodePos(),
|
|
23309
23274
|
hasPrecedingJSDocComment(),
|
|
23310
|
-
/*decorators*/
|
|
23311
|
-
void 0,
|
|
23312
23275
|
/*modifiers*/
|
|
23313
23276
|
void 0
|
|
23314
23277
|
);
|
|
@@ -23318,8 +23281,6 @@ var Parser;
|
|
|
23318
23281
|
return parseFunctionDeclaration(
|
|
23319
23282
|
getNodePos(),
|
|
23320
23283
|
hasPrecedingJSDocComment(),
|
|
23321
|
-
/*decorators*/
|
|
23322
|
-
void 0,
|
|
23323
23284
|
/*modifiers*/
|
|
23324
23285
|
void 0
|
|
23325
23286
|
);
|
|
@@ -23327,8 +23288,6 @@ var Parser;
|
|
|
23327
23288
|
return parseClassDeclaration(
|
|
23328
23289
|
getNodePos(),
|
|
23329
23290
|
hasPrecedingJSDocComment(),
|
|
23330
|
-
/*decorators*/
|
|
23331
|
-
void 0,
|
|
23332
23291
|
/*modifiers*/
|
|
23333
23292
|
void 0
|
|
23334
23293
|
);
|
|
@@ -23391,8 +23350,10 @@ var Parser;
|
|
|
23391
23350
|
function parseDeclaration() {
|
|
23392
23351
|
const pos = getNodePos();
|
|
23393
23352
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
23394
|
-
const
|
|
23395
|
-
|
|
23353
|
+
const modifiers = parseModifiers(
|
|
23354
|
+
/*allowDecorators*/
|
|
23355
|
+
true
|
|
23356
|
+
);
|
|
23396
23357
|
const isAmbient = some(modifiers, isDeclareModifier);
|
|
23397
23358
|
if (isAmbient) {
|
|
23398
23359
|
const node = tryReuseAmbientDeclaration(pos);
|
|
@@ -23402,9 +23363,9 @@ var Parser;
|
|
|
23402
23363
|
for (const m of modifiers) {
|
|
23403
23364
|
m.flags |= 16777216 /* Ambient */;
|
|
23404
23365
|
}
|
|
23405
|
-
return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc,
|
|
23366
|
+
return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers));
|
|
23406
23367
|
} else {
|
|
23407
|
-
return parseDeclarationWorker(pos, hasJSDoc,
|
|
23368
|
+
return parseDeclarationWorker(pos, hasJSDoc, modifiers);
|
|
23408
23369
|
}
|
|
23409
23370
|
}
|
|
23410
23371
|
function tryReuseAmbientDeclaration(pos) {
|
|
@@ -23415,41 +23376,41 @@ var Parser;
|
|
|
23415
23376
|
}
|
|
23416
23377
|
});
|
|
23417
23378
|
}
|
|
23418
|
-
function parseDeclarationWorker(pos, hasJSDoc,
|
|
23379
|
+
function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) {
|
|
23419
23380
|
switch (token()) {
|
|
23420
23381
|
case 113 /* VarKeyword */:
|
|
23421
23382
|
case 119 /* LetKeyword */:
|
|
23422
23383
|
case 85 /* ConstKeyword */:
|
|
23423
|
-
return parseVariableStatement(pos, hasJSDoc,
|
|
23384
|
+
return parseVariableStatement(pos, hasJSDoc, modifiersIn);
|
|
23424
23385
|
case 98 /* FunctionKeyword */:
|
|
23425
|
-
return parseFunctionDeclaration(pos, hasJSDoc,
|
|
23386
|
+
return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23426
23387
|
case 84 /* ClassKeyword */:
|
|
23427
|
-
return parseClassDeclaration(pos, hasJSDoc,
|
|
23388
|
+
return parseClassDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23428
23389
|
case 118 /* InterfaceKeyword */:
|
|
23429
|
-
return parseInterfaceDeclaration(pos, hasJSDoc,
|
|
23390
|
+
return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23430
23391
|
case 154 /* TypeKeyword */:
|
|
23431
|
-
return parseTypeAliasDeclaration(pos, hasJSDoc,
|
|
23392
|
+
return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23432
23393
|
case 92 /* EnumKeyword */:
|
|
23433
|
-
return parseEnumDeclaration(pos, hasJSDoc,
|
|
23394
|
+
return parseEnumDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23434
23395
|
case 159 /* GlobalKeyword */:
|
|
23435
23396
|
case 142 /* ModuleKeyword */:
|
|
23436
23397
|
case 143 /* NamespaceKeyword */:
|
|
23437
|
-
return parseModuleDeclaration(pos, hasJSDoc,
|
|
23398
|
+
return parseModuleDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23438
23399
|
case 100 /* ImportKeyword */:
|
|
23439
|
-
return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc,
|
|
23400
|
+
return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23440
23401
|
case 93 /* ExportKeyword */:
|
|
23441
23402
|
nextToken();
|
|
23442
23403
|
switch (token()) {
|
|
23443
23404
|
case 88 /* DefaultKeyword */:
|
|
23444
23405
|
case 63 /* EqualsToken */:
|
|
23445
|
-
return parseExportAssignment(pos, hasJSDoc,
|
|
23406
|
+
return parseExportAssignment(pos, hasJSDoc, modifiersIn);
|
|
23446
23407
|
case 128 /* AsKeyword */:
|
|
23447
|
-
return parseNamespaceExportDeclaration(pos, hasJSDoc,
|
|
23408
|
+
return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23448
23409
|
default:
|
|
23449
|
-
return parseExportDeclaration(pos, hasJSDoc,
|
|
23410
|
+
return parseExportDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23450
23411
|
}
|
|
23451
23412
|
default:
|
|
23452
|
-
if (
|
|
23413
|
+
if (modifiersIn) {
|
|
23453
23414
|
const missing = createMissingNode(
|
|
23454
23415
|
279 /* MissingDeclaration */,
|
|
23455
23416
|
/*reportAtCurrentPosition*/
|
|
@@ -23457,8 +23418,7 @@ var Parser;
|
|
|
23457
23418
|
Diagnostics.Declaration_expected
|
|
23458
23419
|
);
|
|
23459
23420
|
setTextRangePos(missing, pos);
|
|
23460
|
-
missing.
|
|
23461
|
-
missing.modifiers = modifiers;
|
|
23421
|
+
missing.modifiers = modifiersIn;
|
|
23462
23422
|
return missing;
|
|
23463
23423
|
}
|
|
23464
23424
|
return void 0;
|
|
@@ -23591,17 +23551,16 @@ var Parser;
|
|
|
23591
23551
|
function canFollowContextualOfKeyword() {
|
|
23592
23552
|
return nextTokenIsIdentifier() && nextToken() === 21 /* CloseParenToken */;
|
|
23593
23553
|
}
|
|
23594
|
-
function parseVariableStatement(pos, hasJSDoc,
|
|
23554
|
+
function parseVariableStatement(pos, hasJSDoc, modifiers) {
|
|
23595
23555
|
const declarationList = parseVariableDeclarationList(
|
|
23596
23556
|
/*inForStatementInitializer*/
|
|
23597
23557
|
false
|
|
23598
23558
|
);
|
|
23599
23559
|
parseSemicolon();
|
|
23600
23560
|
const node = factory2.createVariableStatement(modifiers, declarationList);
|
|
23601
|
-
node.illegalDecorators = decorators;
|
|
23602
23561
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23603
23562
|
}
|
|
23604
|
-
function parseFunctionDeclaration(pos, hasJSDoc,
|
|
23563
|
+
function parseFunctionDeclaration(pos, hasJSDoc, modifiers) {
|
|
23605
23564
|
const savedAwaitContext = inAwaitContext();
|
|
23606
23565
|
const modifierFlags = modifiersToFlags(modifiers);
|
|
23607
23566
|
parseExpected(98 /* FunctionKeyword */);
|
|
@@ -23624,7 +23583,6 @@ var Parser;
|
|
|
23624
23583
|
const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, Diagnostics.or_expected);
|
|
23625
23584
|
setAwaitContext(savedAwaitContext);
|
|
23626
23585
|
const node = factory2.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
23627
|
-
node.illegalDecorators = decorators;
|
|
23628
23586
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23629
23587
|
}
|
|
23630
23588
|
function parseConstructorName() {
|
|
@@ -23638,7 +23596,7 @@ var Parser;
|
|
|
23638
23596
|
});
|
|
23639
23597
|
}
|
|
23640
23598
|
}
|
|
23641
|
-
function tryParseConstructorDeclaration(pos, hasJSDoc,
|
|
23599
|
+
function tryParseConstructorDeclaration(pos, hasJSDoc, modifiers) {
|
|
23642
23600
|
return tryParse(() => {
|
|
23643
23601
|
if (parseConstructorName()) {
|
|
23644
23602
|
const typeParameters = parseTypeParameters();
|
|
@@ -23650,14 +23608,13 @@ var Parser;
|
|
|
23650
23608
|
);
|
|
23651
23609
|
const body = parseFunctionBlockOrSemicolon(0 /* None */, Diagnostics.or_expected);
|
|
23652
23610
|
const node = factory2.createConstructorDeclaration(modifiers, parameters, body);
|
|
23653
|
-
node.illegalDecorators = decorators;
|
|
23654
23611
|
node.typeParameters = typeParameters;
|
|
23655
23612
|
node.type = type;
|
|
23656
23613
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23657
23614
|
}
|
|
23658
23615
|
});
|
|
23659
23616
|
}
|
|
23660
|
-
function parseMethodDeclaration(pos, hasJSDoc,
|
|
23617
|
+
function parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken, diagnosticMessage) {
|
|
23661
23618
|
const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;
|
|
23662
23619
|
const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */;
|
|
23663
23620
|
const typeParameters = parseTypeParameters();
|
|
@@ -23669,7 +23626,7 @@ var Parser;
|
|
|
23669
23626
|
);
|
|
23670
23627
|
const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, diagnosticMessage);
|
|
23671
23628
|
const node = factory2.createMethodDeclaration(
|
|
23672
|
-
|
|
23629
|
+
modifiers,
|
|
23673
23630
|
asteriskToken,
|
|
23674
23631
|
name,
|
|
23675
23632
|
questionToken,
|
|
@@ -23681,13 +23638,13 @@ var Parser;
|
|
|
23681
23638
|
node.exclamationToken = exclamationToken;
|
|
23682
23639
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23683
23640
|
}
|
|
23684
|
-
function parsePropertyDeclaration(pos, hasJSDoc,
|
|
23641
|
+
function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) {
|
|
23685
23642
|
const exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(53 /* ExclamationToken */) : void 0;
|
|
23686
23643
|
const type = parseTypeAnnotation();
|
|
23687
23644
|
const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer);
|
|
23688
23645
|
parseSemicolonAfterPropertyName(name, type, initializer);
|
|
23689
23646
|
const node = factory2.createPropertyDeclaration(
|
|
23690
|
-
|
|
23647
|
+
modifiers,
|
|
23691
23648
|
name,
|
|
23692
23649
|
questionToken || exclamationToken,
|
|
23693
23650
|
type,
|
|
@@ -23695,7 +23652,7 @@ var Parser;
|
|
|
23695
23652
|
);
|
|
23696
23653
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23697
23654
|
}
|
|
23698
|
-
function parsePropertyOrMethodDeclaration(pos, hasJSDoc,
|
|
23655
|
+
function parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers) {
|
|
23699
23656
|
const asteriskToken = parseOptionalToken(41 /* AsteriskToken */);
|
|
23700
23657
|
const name = parsePropertyName();
|
|
23701
23658
|
const questionToken = parseOptionalToken(57 /* QuestionToken */);
|
|
@@ -23703,7 +23660,6 @@ var Parser;
|
|
|
23703
23660
|
return parseMethodDeclaration(
|
|
23704
23661
|
pos,
|
|
23705
23662
|
hasJSDoc,
|
|
23706
|
-
decorators,
|
|
23707
23663
|
modifiers,
|
|
23708
23664
|
asteriskToken,
|
|
23709
23665
|
name,
|
|
@@ -23713,9 +23669,9 @@ var Parser;
|
|
|
23713
23669
|
Diagnostics.or_expected
|
|
23714
23670
|
);
|
|
23715
23671
|
}
|
|
23716
|
-
return parsePropertyDeclaration(pos, hasJSDoc,
|
|
23672
|
+
return parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken);
|
|
23717
23673
|
}
|
|
23718
|
-
function parseAccessorDeclaration(pos, hasJSDoc,
|
|
23674
|
+
function parseAccessorDeclaration(pos, hasJSDoc, modifiers, kind, flags) {
|
|
23719
23675
|
const name = parsePropertyName();
|
|
23720
23676
|
const typeParameters = parseTypeParameters();
|
|
23721
23677
|
const parameters = parseParameters(0 /* None */);
|
|
@@ -23725,7 +23681,7 @@ var Parser;
|
|
|
23725
23681
|
false
|
|
23726
23682
|
);
|
|
23727
23683
|
const body = parseFunctionBlockOrSemicolon(flags);
|
|
23728
|
-
const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(
|
|
23684
|
+
const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body);
|
|
23729
23685
|
node.typeParameters = typeParameters;
|
|
23730
23686
|
if (isSetAccessorDeclaration(node))
|
|
23731
23687
|
node.type = type;
|
|
@@ -23771,11 +23727,10 @@ var Parser;
|
|
|
23771
23727
|
}
|
|
23772
23728
|
return false;
|
|
23773
23729
|
}
|
|
23774
|
-
function parseClassStaticBlockDeclaration(pos, hasJSDoc,
|
|
23730
|
+
function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) {
|
|
23775
23731
|
parseExpectedToken(124 /* StaticKeyword */);
|
|
23776
23732
|
const body = parseClassStaticBlockBody();
|
|
23777
23733
|
const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
23778
|
-
node.illegalDecorators = decorators;
|
|
23779
23734
|
node.modifiers = modifiers;
|
|
23780
23735
|
return node;
|
|
23781
23736
|
}
|
|
@@ -23815,15 +23770,7 @@ var Parser;
|
|
|
23815
23770
|
const expression = doInDecoratorContext(parseDecoratorExpression);
|
|
23816
23771
|
return finishNode(factory2.createDecorator(expression), pos);
|
|
23817
23772
|
}
|
|
23818
|
-
function
|
|
23819
|
-
const pos = getNodePos();
|
|
23820
|
-
let list, decorator;
|
|
23821
|
-
while (decorator = tryParseDecorator()) {
|
|
23822
|
-
list = append(list, decorator);
|
|
23823
|
-
}
|
|
23824
|
-
return list && createNodeArray(list, pos);
|
|
23825
|
-
}
|
|
23826
|
-
function tryParseModifier(permitConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStaticModifier) {
|
|
23773
|
+
function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
23827
23774
|
const pos = getNodePos();
|
|
23828
23775
|
const kind = token();
|
|
23829
23776
|
if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) {
|
|
@@ -23841,23 +23788,26 @@ var Parser;
|
|
|
23841
23788
|
}
|
|
23842
23789
|
return finishNode(factory2.createToken(kind), pos);
|
|
23843
23790
|
}
|
|
23844
|
-
function
|
|
23845
|
-
if (!decorators)
|
|
23846
|
-
return modifiers;
|
|
23847
|
-
if (!modifiers)
|
|
23848
|
-
return decorators;
|
|
23849
|
-
const decoratorsAndModifiers = factory2.createNodeArray(concatenate(decorators, modifiers));
|
|
23850
|
-
setTextRangePosEnd(decoratorsAndModifiers, decorators.pos, modifiers.end);
|
|
23851
|
-
return decoratorsAndModifiers;
|
|
23852
|
-
}
|
|
23853
|
-
function parseModifiers(permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
23791
|
+
function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
23854
23792
|
const pos = getNodePos();
|
|
23855
|
-
let list
|
|
23856
|
-
|
|
23793
|
+
let list;
|
|
23794
|
+
let modifier, hasSeenStaticModifier = false;
|
|
23795
|
+
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
23857
23796
|
if (modifier.kind === 124 /* StaticKeyword */)
|
|
23858
|
-
|
|
23797
|
+
hasSeenStaticModifier = true;
|
|
23859
23798
|
list = append(list, modifier);
|
|
23860
23799
|
}
|
|
23800
|
+
if (allowDecorators && token() === 59 /* AtToken */) {
|
|
23801
|
+
let decorator;
|
|
23802
|
+
while (decorator = tryParseDecorator()) {
|
|
23803
|
+
list = append(list, decorator);
|
|
23804
|
+
}
|
|
23805
|
+
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
23806
|
+
if (modifier.kind === 124 /* StaticKeyword */)
|
|
23807
|
+
hasSeenStaticModifier = true;
|
|
23808
|
+
list = append(list, modifier);
|
|
23809
|
+
}
|
|
23810
|
+
}
|
|
23861
23811
|
return list && createNodeArray(list, pos);
|
|
23862
23812
|
}
|
|
23863
23813
|
function parseModifiersForArrowFunction() {
|
|
@@ -23877,30 +23827,31 @@ var Parser;
|
|
|
23877
23827
|
return finishNode(factory2.createSemicolonClassElement(), pos);
|
|
23878
23828
|
}
|
|
23879
23829
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
23880
|
-
const decorators = parseDecorators();
|
|
23881
23830
|
const modifiers = parseModifiers(
|
|
23831
|
+
/*allowDecorators*/
|
|
23832
|
+
true,
|
|
23882
23833
|
/*permitConstAsModifier*/
|
|
23883
23834
|
true,
|
|
23884
23835
|
/*stopOnStartOfClassStaticBlock*/
|
|
23885
23836
|
true
|
|
23886
23837
|
);
|
|
23887
23838
|
if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) {
|
|
23888
|
-
return parseClassStaticBlockDeclaration(pos, hasJSDoc,
|
|
23839
|
+
return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers);
|
|
23889
23840
|
}
|
|
23890
23841
|
if (parseContextualModifier(137 /* GetKeyword */)) {
|
|
23891
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
23842
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */);
|
|
23892
23843
|
}
|
|
23893
23844
|
if (parseContextualModifier(151 /* SetKeyword */)) {
|
|
23894
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
23845
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */);
|
|
23895
23846
|
}
|
|
23896
23847
|
if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) {
|
|
23897
|
-
const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc,
|
|
23848
|
+
const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers);
|
|
23898
23849
|
if (constructorDeclaration) {
|
|
23899
23850
|
return constructorDeclaration;
|
|
23900
23851
|
}
|
|
23901
23852
|
}
|
|
23902
23853
|
if (isIndexSignature()) {
|
|
23903
|
-
return parseIndexSignatureDeclaration(pos, hasJSDoc,
|
|
23854
|
+
return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers);
|
|
23904
23855
|
}
|
|
23905
23856
|
if (tokenIsIdentifierOrKeyword(token()) || token() === 10 /* StringLiteral */ || token() === 8 /* NumericLiteral */ || token() === 41 /* AsteriskToken */ || token() === 22 /* OpenBracketToken */) {
|
|
23906
23857
|
const isAmbient = some(modifiers, isDeclareModifier);
|
|
@@ -23908,12 +23859,12 @@ var Parser;
|
|
|
23908
23859
|
for (const m of modifiers) {
|
|
23909
23860
|
m.flags |= 16777216 /* Ambient */;
|
|
23910
23861
|
}
|
|
23911
|
-
return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc,
|
|
23862
|
+
return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers));
|
|
23912
23863
|
} else {
|
|
23913
|
-
return parsePropertyOrMethodDeclaration(pos, hasJSDoc,
|
|
23864
|
+
return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers);
|
|
23914
23865
|
}
|
|
23915
23866
|
}
|
|
23916
|
-
if (
|
|
23867
|
+
if (modifiers) {
|
|
23917
23868
|
const name = createMissingNode(
|
|
23918
23869
|
79 /* Identifier */,
|
|
23919
23870
|
/*reportAtCurrentPosition*/
|
|
@@ -23923,7 +23874,6 @@ var Parser;
|
|
|
23923
23874
|
return parsePropertyDeclaration(
|
|
23924
23875
|
pos,
|
|
23925
23876
|
hasJSDoc,
|
|
23926
|
-
decorators,
|
|
23927
23877
|
modifiers,
|
|
23928
23878
|
name,
|
|
23929
23879
|
/*questionToken*/
|
|
@@ -23932,21 +23882,39 @@ var Parser;
|
|
|
23932
23882
|
}
|
|
23933
23883
|
return Debug.fail("Should not have attempted to parse class member declaration.");
|
|
23934
23884
|
}
|
|
23885
|
+
function parseDecoratedExpression() {
|
|
23886
|
+
const pos = getNodePos();
|
|
23887
|
+
const hasJSDoc = hasPrecedingJSDocComment();
|
|
23888
|
+
const modifiers = parseModifiers(
|
|
23889
|
+
/*allowDecorators*/
|
|
23890
|
+
true
|
|
23891
|
+
);
|
|
23892
|
+
if (token() === 84 /* ClassKeyword */) {
|
|
23893
|
+
return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */);
|
|
23894
|
+
}
|
|
23895
|
+
const missing = createMissingNode(
|
|
23896
|
+
279 /* MissingDeclaration */,
|
|
23897
|
+
/*reportAtCurrentPosition*/
|
|
23898
|
+
true,
|
|
23899
|
+
Diagnostics.Expression_expected
|
|
23900
|
+
);
|
|
23901
|
+
setTextRangePos(missing, pos);
|
|
23902
|
+
missing.modifiers = modifiers;
|
|
23903
|
+
return missing;
|
|
23904
|
+
}
|
|
23935
23905
|
function parseClassExpression() {
|
|
23936
23906
|
return parseClassDeclarationOrExpression(
|
|
23937
23907
|
getNodePos(),
|
|
23938
23908
|
hasPrecedingJSDocComment(),
|
|
23939
|
-
/*decorators*/
|
|
23940
|
-
void 0,
|
|
23941
23909
|
/*modifiers*/
|
|
23942
23910
|
void 0,
|
|
23943
23911
|
228 /* ClassExpression */
|
|
23944
23912
|
);
|
|
23945
23913
|
}
|
|
23946
|
-
function parseClassDeclaration(pos, hasJSDoc,
|
|
23947
|
-
return parseClassDeclarationOrExpression(pos, hasJSDoc,
|
|
23914
|
+
function parseClassDeclaration(pos, hasJSDoc, modifiers) {
|
|
23915
|
+
return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */);
|
|
23948
23916
|
}
|
|
23949
|
-
function parseClassDeclarationOrExpression(pos, hasJSDoc,
|
|
23917
|
+
function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) {
|
|
23950
23918
|
const savedAwaitContext = inAwaitContext();
|
|
23951
23919
|
parseExpected(84 /* ClassKeyword */);
|
|
23952
23920
|
const name = parseNameOfClassDeclarationOrExpression();
|
|
@@ -23965,7 +23933,7 @@ var Parser;
|
|
|
23965
23933
|
members = createMissingList();
|
|
23966
23934
|
}
|
|
23967
23935
|
setAwaitContext(savedAwaitContext);
|
|
23968
|
-
const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(
|
|
23936
|
+
const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members);
|
|
23969
23937
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23970
23938
|
}
|
|
23971
23939
|
function parseNameOfClassDeclarationOrExpression() {
|
|
@@ -24006,17 +23974,16 @@ var Parser;
|
|
|
24006
23974
|
function parseClassMembers() {
|
|
24007
23975
|
return parseList(ParsingContext.ClassMembers, parseClassElement);
|
|
24008
23976
|
}
|
|
24009
|
-
function parseInterfaceDeclaration(pos, hasJSDoc,
|
|
23977
|
+
function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) {
|
|
24010
23978
|
parseExpected(118 /* InterfaceKeyword */);
|
|
24011
23979
|
const name = parseIdentifier();
|
|
24012
23980
|
const typeParameters = parseTypeParameters();
|
|
24013
23981
|
const heritageClauses = parseHeritageClauses();
|
|
24014
23982
|
const members = parseObjectTypeMembers();
|
|
24015
23983
|
const node = factory2.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
24016
|
-
node.illegalDecorators = decorators;
|
|
24017
23984
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24018
23985
|
}
|
|
24019
|
-
function parseTypeAliasDeclaration(pos, hasJSDoc,
|
|
23986
|
+
function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) {
|
|
24020
23987
|
parseExpected(154 /* TypeKeyword */);
|
|
24021
23988
|
const name = parseIdentifier();
|
|
24022
23989
|
const typeParameters = parseTypeParameters();
|
|
@@ -24024,7 +23991,6 @@ var Parser;
|
|
|
24024
23991
|
const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType();
|
|
24025
23992
|
parseSemicolon();
|
|
24026
23993
|
const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
24027
|
-
node.illegalDecorators = decorators;
|
|
24028
23994
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24029
23995
|
}
|
|
24030
23996
|
function parseEnumMember() {
|
|
@@ -24034,7 +24000,7 @@ var Parser;
|
|
|
24034
24000
|
const initializer = allowInAnd(parseInitializer);
|
|
24035
24001
|
return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc);
|
|
24036
24002
|
}
|
|
24037
|
-
function parseEnumDeclaration(pos, hasJSDoc,
|
|
24003
|
+
function parseEnumDeclaration(pos, hasJSDoc, modifiers) {
|
|
24038
24004
|
parseExpected(92 /* EnumKeyword */);
|
|
24039
24005
|
const name = parseIdentifier();
|
|
24040
24006
|
let members;
|
|
@@ -24045,7 +24011,6 @@ var Parser;
|
|
|
24045
24011
|
members = createMissingList();
|
|
24046
24012
|
}
|
|
24047
24013
|
const node = factory2.createEnumDeclaration(modifiers, name, members);
|
|
24048
|
-
node.illegalDecorators = decorators;
|
|
24049
24014
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24050
24015
|
}
|
|
24051
24016
|
function parseModuleBlock() {
|
|
@@ -24059,24 +24024,21 @@ var Parser;
|
|
|
24059
24024
|
}
|
|
24060
24025
|
return finishNode(factory2.createModuleBlock(statements), pos);
|
|
24061
24026
|
}
|
|
24062
|
-
function parseModuleOrNamespaceDeclaration(pos, hasJSDoc,
|
|
24027
|
+
function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
|
|
24063
24028
|
const namespaceFlag = flags & 16 /* Namespace */;
|
|
24064
24029
|
const name = parseIdentifier();
|
|
24065
24030
|
const body = parseOptional(24 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
|
|
24066
24031
|
getNodePos(),
|
|
24067
24032
|
/*hasJSDoc*/
|
|
24068
24033
|
false,
|
|
24069
|
-
/*decorators*/
|
|
24070
|
-
void 0,
|
|
24071
24034
|
/*modifiers*/
|
|
24072
24035
|
void 0,
|
|
24073
24036
|
4 /* NestedNamespace */ | namespaceFlag
|
|
24074
24037
|
) : parseModuleBlock();
|
|
24075
24038
|
const node = factory2.createModuleDeclaration(modifiers, name, body, flags);
|
|
24076
|
-
node.illegalDecorators = decorators;
|
|
24077
24039
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24078
24040
|
}
|
|
24079
|
-
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc,
|
|
24041
|
+
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) {
|
|
24080
24042
|
let flags = 0;
|
|
24081
24043
|
let name;
|
|
24082
24044
|
if (token() === 159 /* GlobalKeyword */) {
|
|
@@ -24092,23 +24054,22 @@ var Parser;
|
|
|
24092
24054
|
} else {
|
|
24093
24055
|
parseSemicolon();
|
|
24094
24056
|
}
|
|
24095
|
-
const node = factory2.createModuleDeclaration(
|
|
24096
|
-
node.illegalDecorators = decorators;
|
|
24057
|
+
const node = factory2.createModuleDeclaration(modifiersIn, name, body, flags);
|
|
24097
24058
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24098
24059
|
}
|
|
24099
|
-
function parseModuleDeclaration(pos, hasJSDoc,
|
|
24060
|
+
function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) {
|
|
24100
24061
|
let flags = 0;
|
|
24101
24062
|
if (token() === 159 /* GlobalKeyword */) {
|
|
24102
|
-
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc,
|
|
24063
|
+
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn);
|
|
24103
24064
|
} else if (parseOptional(143 /* NamespaceKeyword */)) {
|
|
24104
24065
|
flags |= 16 /* Namespace */;
|
|
24105
24066
|
} else {
|
|
24106
24067
|
parseExpected(142 /* ModuleKeyword */);
|
|
24107
24068
|
if (token() === 10 /* StringLiteral */) {
|
|
24108
|
-
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc,
|
|
24069
|
+
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn);
|
|
24109
24070
|
}
|
|
24110
24071
|
}
|
|
24111
|
-
return parseModuleOrNamespaceDeclaration(pos, hasJSDoc,
|
|
24072
|
+
return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags);
|
|
24112
24073
|
}
|
|
24113
24074
|
function isExternalModuleReference2() {
|
|
24114
24075
|
return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen);
|
|
@@ -24122,17 +24083,16 @@ var Parser;
|
|
|
24122
24083
|
function nextTokenIsSlash() {
|
|
24123
24084
|
return nextToken() === 43 /* SlashToken */;
|
|
24124
24085
|
}
|
|
24125
|
-
function parseNamespaceExportDeclaration(pos, hasJSDoc,
|
|
24086
|
+
function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) {
|
|
24126
24087
|
parseExpected(128 /* AsKeyword */);
|
|
24127
24088
|
parseExpected(143 /* NamespaceKeyword */);
|
|
24128
24089
|
const name = parseIdentifier();
|
|
24129
24090
|
parseSemicolon();
|
|
24130
24091
|
const node = factory2.createNamespaceExportDeclaration(name);
|
|
24131
|
-
node.illegalDecorators = decorators;
|
|
24132
24092
|
node.modifiers = modifiers;
|
|
24133
24093
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24134
24094
|
}
|
|
24135
|
-
function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc,
|
|
24095
|
+
function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) {
|
|
24136
24096
|
parseExpected(100 /* ImportKeyword */);
|
|
24137
24097
|
const afterImportPos = scanner.getStartPos();
|
|
24138
24098
|
let identifier;
|
|
@@ -24145,7 +24105,7 @@ var Parser;
|
|
|
24145
24105
|
identifier = isIdentifier2() ? parseIdentifier() : void 0;
|
|
24146
24106
|
}
|
|
24147
24107
|
if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration()) {
|
|
24148
|
-
return parseImportEqualsDeclaration(pos, hasJSDoc,
|
|
24108
|
+
return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly);
|
|
24149
24109
|
}
|
|
24150
24110
|
let importClause;
|
|
24151
24111
|
if (identifier || // import id
|
|
@@ -24161,7 +24121,6 @@ var Parser;
|
|
|
24161
24121
|
}
|
|
24162
24122
|
parseSemicolon();
|
|
24163
24123
|
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
24164
|
-
node.illegalDecorators = decorators;
|
|
24165
24124
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24166
24125
|
}
|
|
24167
24126
|
function parseAssertEntry() {
|
|
@@ -24220,12 +24179,11 @@ var Parser;
|
|
|
24220
24179
|
function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() {
|
|
24221
24180
|
return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */;
|
|
24222
24181
|
}
|
|
24223
|
-
function parseImportEqualsDeclaration(pos, hasJSDoc,
|
|
24182
|
+
function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) {
|
|
24224
24183
|
parseExpected(63 /* EqualsToken */);
|
|
24225
24184
|
const moduleReference = parseModuleReference();
|
|
24226
24185
|
parseSemicolon();
|
|
24227
24186
|
const node = factory2.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
24228
|
-
node.illegalDecorators = decorators;
|
|
24229
24187
|
const finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24230
24188
|
return finished;
|
|
24231
24189
|
}
|
|
@@ -24335,7 +24293,7 @@ var Parser;
|
|
|
24335
24293
|
function parseNamespaceExport(pos) {
|
|
24336
24294
|
return finishNode(factory2.createNamespaceExport(parseIdentifierName()), pos);
|
|
24337
24295
|
}
|
|
24338
|
-
function parseExportDeclaration(pos, hasJSDoc,
|
|
24296
|
+
function parseExportDeclaration(pos, hasJSDoc, modifiers) {
|
|
24339
24297
|
const savedAwaitContext = inAwaitContext();
|
|
24340
24298
|
setAwaitContext(
|
|
24341
24299
|
/*value*/
|
|
@@ -24365,10 +24323,9 @@ var Parser;
|
|
|
24365
24323
|
parseSemicolon();
|
|
24366
24324
|
setAwaitContext(savedAwaitContext);
|
|
24367
24325
|
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
24368
|
-
node.illegalDecorators = decorators;
|
|
24369
24326
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24370
24327
|
}
|
|
24371
|
-
function parseExportAssignment(pos, hasJSDoc,
|
|
24328
|
+
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
24372
24329
|
const savedAwaitContext = inAwaitContext();
|
|
24373
24330
|
setAwaitContext(
|
|
24374
24331
|
/*value*/
|
|
@@ -24387,7 +24344,6 @@ var Parser;
|
|
|
24387
24344
|
parseSemicolon();
|
|
24388
24345
|
setAwaitContext(savedAwaitContext);
|
|
24389
24346
|
const node = factory2.createExportAssignment(modifiers, isExportEquals, expression);
|
|
24390
|
-
node.illegalDecorators = decorators;
|
|
24391
24347
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24392
24348
|
}
|
|
24393
24349
|
let ParsingContext;
|
|
@@ -26082,7 +26038,9 @@ var libEntries = [
|
|
|
26082
26038
|
["esnext.bigint", "lib.es2020.bigint.d.ts"],
|
|
26083
26039
|
["esnext.string", "lib.es2022.string.d.ts"],
|
|
26084
26040
|
["esnext.promise", "lib.es2021.promise.d.ts"],
|
|
26085
|
-
["esnext.weakref", "lib.es2021.weakref.d.ts"]
|
|
26041
|
+
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
26042
|
+
["decorators", "lib.decorators.d.ts"],
|
|
26043
|
+
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
26086
26044
|
];
|
|
26087
26045
|
var libs = libEntries.map((entry) => entry[0]);
|
|
26088
26046
|
var libMap = new Map(libEntries);
|
|
@@ -26625,6 +26583,13 @@ var commandOptionsWithoutBuild = [
|
|
|
26625
26583
|
transpileOptionValue: true,
|
|
26626
26584
|
defaultValueDescription: false
|
|
26627
26585
|
},
|
|
26586
|
+
{
|
|
26587
|
+
name: "verbatimModuleSyntax",
|
|
26588
|
+
type: "boolean",
|
|
26589
|
+
category: Diagnostics.Interop_Constraints,
|
|
26590
|
+
description: Diagnostics.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,
|
|
26591
|
+
defaultValueDescription: false
|
|
26592
|
+
},
|
|
26628
26593
|
// Strict Type Checks
|
|
26629
26594
|
{
|
|
26630
26595
|
name: "strict",
|
|
@@ -26990,10 +26955,11 @@ var commandOptionsWithoutBuild = [
|
|
|
26990
26955
|
{
|
|
26991
26956
|
name: "experimentalDecorators",
|
|
26992
26957
|
type: "boolean",
|
|
26958
|
+
affectsEmit: true,
|
|
26993
26959
|
affectsSemanticDiagnostics: true,
|
|
26994
26960
|
affectsBuildInfo: true,
|
|
26995
26961
|
category: Diagnostics.Language_and_Environment,
|
|
26996
|
-
description: Diagnostics.
|
|
26962
|
+
description: Diagnostics.Enable_experimental_support_for_legacy_experimental_decorators,
|
|
26997
26963
|
defaultValueDescription: false
|
|
26998
26964
|
},
|
|
26999
26965
|
{
|
|
@@ -32947,7 +32913,7 @@ var visitEachChildTable = {
|
|
|
32947
32913
|
[173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
32948
32914
|
return context.factory.updateConstructorDeclaration(
|
|
32949
32915
|
node,
|
|
32950
|
-
nodesVisitor(node.modifiers, visitor,
|
|
32916
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
32951
32917
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
32952
32918
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
32953
32919
|
);
|
|
@@ -32998,7 +32964,7 @@ var visitEachChildTable = {
|
|
|
32998
32964
|
[178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
32999
32965
|
return context.factory.updateIndexSignature(
|
|
33000
32966
|
node,
|
|
33001
|
-
nodesVisitor(node.modifiers, visitor,
|
|
32967
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33002
32968
|
nodesVisitor(node.parameters, visitor, isParameter),
|
|
33003
32969
|
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
33004
32970
|
);
|
|
@@ -33439,7 +33405,7 @@ var visitEachChildTable = {
|
|
|
33439
33405
|
[240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33440
33406
|
return context.factory.updateVariableStatement(
|
|
33441
33407
|
node,
|
|
33442
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33408
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33443
33409
|
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
33444
33410
|
);
|
|
33445
33411
|
},
|
|
@@ -33590,7 +33556,7 @@ var visitEachChildTable = {
|
|
|
33590
33556
|
[261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33591
33557
|
return context.factory.updateInterfaceDeclaration(
|
|
33592
33558
|
node,
|
|
33593
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33559
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33594
33560
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33595
33561
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
33596
33562
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
@@ -33600,7 +33566,7 @@ var visitEachChildTable = {
|
|
|
33600
33566
|
[262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33601
33567
|
return context.factory.updateTypeAliasDeclaration(
|
|
33602
33568
|
node,
|
|
33603
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33569
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33604
33570
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33605
33571
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
33606
33572
|
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
@@ -33609,7 +33575,7 @@ var visitEachChildTable = {
|
|
|
33609
33575
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33610
33576
|
return context.factory.updateEnumDeclaration(
|
|
33611
33577
|
node,
|
|
33612
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33578
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33613
33579
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33614
33580
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
33615
33581
|
);
|
|
@@ -33617,7 +33583,7 @@ var visitEachChildTable = {
|
|
|
33617
33583
|
[264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33618
33584
|
return context.factory.updateModuleDeclaration(
|
|
33619
33585
|
node,
|
|
33620
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33586
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33621
33587
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
33622
33588
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
33623
33589
|
);
|
|
@@ -33643,7 +33609,7 @@ var visitEachChildTable = {
|
|
|
33643
33609
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33644
33610
|
return context.factory.updateImportEqualsDeclaration(
|
|
33645
33611
|
node,
|
|
33646
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33612
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33647
33613
|
node.isTypeOnly,
|
|
33648
33614
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33649
33615
|
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
@@ -33652,7 +33618,7 @@ var visitEachChildTable = {
|
|
|
33652
33618
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33653
33619
|
return context.factory.updateImportDeclaration(
|
|
33654
33620
|
node,
|
|
33655
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33621
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33656
33622
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
33657
33623
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
33658
33624
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
@@ -33709,14 +33675,14 @@ var visitEachChildTable = {
|
|
|
33709
33675
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33710
33676
|
return context.factory.updateExportAssignment(
|
|
33711
33677
|
node,
|
|
33712
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33678
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33713
33679
|
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
33714
33680
|
);
|
|
33715
33681
|
},
|
|
33716
33682
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33717
33683
|
return context.factory.updateExportDeclaration(
|
|
33718
33684
|
node,
|
|
33719
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33685
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33720
33686
|
node.isTypeOnly,
|
|
33721
33687
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
33722
33688
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|