typescript 5.0.0-dev.20230119 → 5.0.0-dev.20230121
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.dom.d.ts +2300 -2077
- package/lib/lib.dom.iterable.d.ts +14 -0
- package/lib/lib.es5.d.ts +3 -12
- package/lib/lib.webworker.d.ts +1670 -1632
- package/lib/tsc.js +5144 -1814
- package/lib/tsserver.js +6730 -5489
- package/lib/tsserverlibrary.d.ts +183 -1046
- package/lib/tsserverlibrary.js +6612 -5118
- package/lib/typescript.d.ts +129 -1026
- package/lib/typescript.js +6391 -4568
- package/lib/typingsInstaller.js +265 -315
- 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.20230121`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -843,18 +843,6 @@ function isPatternMatch({ prefix, suffix }, candidate) {
|
|
|
843
843
|
function and(f, g) {
|
|
844
844
|
return (arg) => f(arg) && g(arg);
|
|
845
845
|
}
|
|
846
|
-
function or(...fs2) {
|
|
847
|
-
return (...args) => {
|
|
848
|
-
let lastResult;
|
|
849
|
-
for (const f of fs2) {
|
|
850
|
-
lastResult = f(...args);
|
|
851
|
-
if (lastResult) {
|
|
852
|
-
return lastResult;
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
return lastResult;
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
846
|
function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, deleted, unchanged) {
|
|
859
847
|
unchanged = unchanged || noop;
|
|
860
848
|
let newIndex = 0;
|
|
@@ -3421,11 +3409,6 @@ var EmitFlags = /* @__PURE__ */ ((EmitFlags3) => {
|
|
|
3421
3409
|
EmitFlags3[EmitFlags3["HasEndOfDeclarationMarker"] = 8388608] = "HasEndOfDeclarationMarker";
|
|
3422
3410
|
EmitFlags3[EmitFlags3["Iterator"] = 16777216] = "Iterator";
|
|
3423
3411
|
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
3412
|
return EmitFlags3;
|
|
3430
3413
|
})(EmitFlags || {});
|
|
3431
3414
|
var commentPragmas = {
|
|
@@ -5363,10 +5346,9 @@ var Diagnostics = {
|
|
|
5363
5346
|
Line_terminator_not_permitted_before_arrow: diag(1200, 1 /* Error */, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."),
|
|
5364
5347
|
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
5348
|
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
|
-
|
|
5349
|
+
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
5350
|
Decorators_are_not_valid_here: diag(1206, 1 /* Error */, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."),
|
|
5368
5351
|
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
5352
|
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
5353
|
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
5354
|
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 +5358,6 @@ var Diagnostics = {
|
|
|
5376
5358
|
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
5359
|
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
5360
|
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
5361
|
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
5362
|
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
5363
|
_0_tag_already_specified: diag(1223, 1 /* Error */, "_0_tag_already_specified_1223", "'{0}' tag already specified."),
|
|
@@ -5423,7 +5404,7 @@ var Diagnostics = {
|
|
|
5423
5404
|
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
5405
|
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
5406
|
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
|
-
|
|
5407
|
+
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
5408
|
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
5409
|
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
5410
|
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 +5413,17 @@ var Diagnostics = {
|
|
|
5432
5413
|
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
5414
|
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
5415
|
_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"),
|
|
5416
|
+
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}."),
|
|
5417
|
+
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}."),
|
|
5418
|
+
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."),
|
|
5419
|
+
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."),
|
|
5420
|
+
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."),
|
|
5421
|
+
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."),
|
|
5422
|
+
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."),
|
|
5423
|
+
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."),
|
|
5424
|
+
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."),
|
|
5425
|
+
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."),
|
|
5426
|
+
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
5427
|
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
5428
|
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
5429
|
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."),
|
|
@@ -5503,7 +5495,6 @@ var Diagnostics = {
|
|
|
5503
5495
|
An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1 /* Error */, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
|
|
5504
5496
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, 1 /* Error */, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
5505
5497
|
Unexpected_token_Did_you_mean_or_gt: diag(1382, 1 /* Error */, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"),
|
|
5506
|
-
Only_named_exports_may_use_export_type: diag(1383, 1 /* Error */, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
|
|
5507
5498
|
Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, 1 /* Error */, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."),
|
|
5508
5499
|
Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, 1 /* Error */, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."),
|
|
5509
5500
|
Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, 1 /* Error */, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
|
|
@@ -5551,7 +5542,7 @@ var Diagnostics = {
|
|
|
5551
5542
|
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
5543
|
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
5544
|
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
|
-
|
|
5545
|
+
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
5546
|
Unexpected_keyword_or_identifier: diag(1434, 1 /* Error */, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
5556
5547
|
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
5548
|
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 +5555,7 @@ var Diagnostics = {
|
|
|
5564
5555
|
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
5556
|
_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
5557
|
_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
|
-
|
|
5558
|
+
_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
5559
|
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
5560
|
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
5561
|
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 +5583,8 @@ var Diagnostics = {
|
|
|
5592
5583
|
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
5584
|
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
5585
|
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" }`.'),
|
|
5586
|
+
_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."),
|
|
5587
|
+
_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
5588
|
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
5589
|
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
5590
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -6049,7 +6042,7 @@ var Diagnostics = {
|
|
|
6049
6042
|
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
6043
|
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
6044
|
_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
|
-
|
|
6045
|
+
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
6046
|
_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
6047
|
The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
|
|
6055
6048
|
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 +6290,7 @@ var Diagnostics = {
|
|
|
6297
6290
|
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
6291
|
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
6292
|
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
|
-
|
|
6293
|
+
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
6294
|
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
6295
|
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
6296
|
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 +6303,9 @@ var Diagnostics = {
|
|
|
6310
6303
|
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
6304
|
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
6305
|
Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
|
|
6306
|
+
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}'."),
|
|
6307
|
+
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'."),
|
|
6308
|
+
Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."),
|
|
6313
6309
|
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
6310
|
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
6311
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -6718,7 +6714,7 @@ var Diagnostics = {
|
|
|
6718
6714
|
Filters_results_from_the_include_option: diag(6627, 3 /* Message */, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."),
|
|
6719
6715
|
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
6716
|
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
|
-
|
|
6717
|
+
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
6718
|
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
6719
|
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
6720
|
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 +6800,7 @@ var Diagnostics = {
|
|
|
6804
6800
|
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
6801
|
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
6802
|
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'."),
|
|
6803
|
+
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
6804
|
one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
|
|
6808
6805
|
one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
|
|
6809
6806
|
type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
|
|
@@ -6939,6 +6936,7 @@ var Diagnostics = {
|
|
|
6939
6936
|
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
6937
|
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
6938
|
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."),
|
|
6939
|
+
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
6940
|
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
6941
|
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
6942
|
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 +9334,7 @@ function createTextChangeRange(span, newLength) {
|
|
|
9336
9334
|
}
|
|
9337
9335
|
var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
|
|
9338
9336
|
function isParameterPropertyDeclaration(node, parent) {
|
|
9339
|
-
return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 173 /* Constructor */;
|
|
9337
|
+
return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 173 /* Constructor */;
|
|
9340
9338
|
}
|
|
9341
9339
|
function walkUpBindingElementsAndPatterns(binding) {
|
|
9342
9340
|
let node = binding.parent;
|
|
@@ -9539,6 +9537,11 @@ function getAssignedName(node) {
|
|
|
9539
9537
|
return node.parent.name;
|
|
9540
9538
|
}
|
|
9541
9539
|
}
|
|
9540
|
+
function getModifiers(node) {
|
|
9541
|
+
if (hasSyntacticModifier(node, 126975 /* Modifier */)) {
|
|
9542
|
+
return filter(node.modifiers, isModifier);
|
|
9543
|
+
}
|
|
9544
|
+
}
|
|
9542
9545
|
function getJSDocParameterTagsWorker(param, noCache) {
|
|
9543
9546
|
if (param.name) {
|
|
9544
9547
|
if (isIdentifier(param.name)) {
|
|
@@ -9919,6 +9922,7 @@ function isLeftHandSideExpressionKind(kind) {
|
|
|
9919
9922
|
case 230 /* ExpressionWithTypeArguments */:
|
|
9920
9923
|
case 233 /* MetaProperty */:
|
|
9921
9924
|
case 100 /* ImportKeyword */:
|
|
9925
|
+
case 279 /* MissingDeclaration */:
|
|
9922
9926
|
return true;
|
|
9923
9927
|
default:
|
|
9924
9928
|
return false;
|
|
@@ -9942,8 +9946,7 @@ function isUnaryExpressionKind(kind) {
|
|
|
9942
9946
|
}
|
|
9943
9947
|
}
|
|
9944
9948
|
function isLiteralTypeLiteral(node) {
|
|
9945
|
-
|
|
9946
|
-
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
9949
|
+
switch (node.kind) {
|
|
9947
9950
|
case 104 /* NullKeyword */:
|
|
9948
9951
|
case 110 /* TrueKeyword */:
|
|
9949
9952
|
case 95 /* FalseKeyword */:
|
|
@@ -10888,7 +10891,7 @@ function isSpecialPropertyDeclaration(expr) {
|
|
|
10888
10891
|
}
|
|
10889
10892
|
function setValueDeclaration(symbol, node) {
|
|
10890
10893
|
const { valueDeclaration } = symbol;
|
|
10891
|
-
if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) {
|
|
10894
|
+
if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) {
|
|
10892
10895
|
symbol.valueDeclaration = node;
|
|
10893
10896
|
}
|
|
10894
10897
|
}
|
|
@@ -12831,7 +12834,7 @@ function createNodeConverters(factory2) {
|
|
|
12831
12834
|
if (!node.body)
|
|
12832
12835
|
return Debug.fail(`Cannot convert a FunctionDeclaration without a body`);
|
|
12833
12836
|
const updated = factory2.createFunctionExpression(
|
|
12834
|
-
node
|
|
12837
|
+
getModifiers(node),
|
|
12835
12838
|
node.asteriskToken,
|
|
12836
12839
|
node.name,
|
|
12837
12840
|
node.typeParameters,
|
|
@@ -13566,6 +13569,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13566
13569
|
createArraySliceCall,
|
|
13567
13570
|
createArrayConcatCall,
|
|
13568
13571
|
createObjectDefinePropertyCall,
|
|
13572
|
+
createObjectGetOwnPropertyDescriptorCall,
|
|
13569
13573
|
createReflectGetCall,
|
|
13570
13574
|
createReflectSetCall,
|
|
13571
13575
|
createPropertyDescriptor,
|
|
@@ -14112,7 +14116,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14112
14116
|
const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */);
|
|
14113
14117
|
node.body = body;
|
|
14114
14118
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */;
|
|
14115
|
-
node.illegalDecorators = void 0;
|
|
14116
14119
|
node.modifiers = void 0;
|
|
14117
14120
|
node.jsDoc = void 0;
|
|
14118
14121
|
node.locals = void 0;
|
|
@@ -14126,7 +14129,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14126
14129
|
}
|
|
14127
14130
|
function finishUpdateClassStaticBlockDeclaration(updated, original) {
|
|
14128
14131
|
if (updated !== original) {
|
|
14129
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
14130
14132
|
updated.modifiers = original.modifiers;
|
|
14131
14133
|
}
|
|
14132
14134
|
return update(updated, original);
|
|
@@ -14137,7 +14139,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14137
14139
|
node.parameters = createNodeArray(parameters);
|
|
14138
14140
|
node.body = body;
|
|
14139
14141
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */;
|
|
14140
|
-
node.illegalDecorators = void 0;
|
|
14141
14142
|
node.typeParameters = void 0;
|
|
14142
14143
|
node.type = void 0;
|
|
14143
14144
|
node.typeArguments = void 0;
|
|
@@ -14153,7 +14154,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14153
14154
|
}
|
|
14154
14155
|
function finishUpdateConstructorDeclaration(updated, original) {
|
|
14155
14156
|
if (updated !== original) {
|
|
14156
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
14157
14157
|
updated.typeParameters = original.typeParameters;
|
|
14158
14158
|
updated.type = original.type;
|
|
14159
14159
|
}
|
|
@@ -14258,7 +14258,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14258
14258
|
node.parameters = asNodeArray(parameters);
|
|
14259
14259
|
node.type = type;
|
|
14260
14260
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14261
|
-
node.illegalDecorators = void 0;
|
|
14262
14261
|
node.jsDoc = void 0;
|
|
14263
14262
|
node.locals = void 0;
|
|
14264
14263
|
node.nextContainer = void 0;
|
|
@@ -15226,7 +15225,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15226
15225
|
if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
15227
15226
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
15228
15227
|
}
|
|
15229
|
-
node.illegalDecorators = void 0;
|
|
15230
15228
|
node.jsDoc = void 0;
|
|
15231
15229
|
node.flowNode = void 0;
|
|
15232
15230
|
return node;
|
|
@@ -15480,7 +15478,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15480
15478
|
const isAsyncGenerator = isAsync && isGenerator;
|
|
15481
15479
|
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
15480
|
}
|
|
15483
|
-
node.illegalDecorators = void 0;
|
|
15484
15481
|
node.typeArguments = void 0;
|
|
15485
15482
|
node.jsDoc = void 0;
|
|
15486
15483
|
node.locals = void 0;
|
|
@@ -15494,7 +15491,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15494
15491
|
}
|
|
15495
15492
|
function finishUpdateFunctionDeclaration(updated, original) {
|
|
15496
15493
|
if (updated !== original) {
|
|
15497
|
-
updated.
|
|
15494
|
+
if (updated.modifiers === original.modifiers) {
|
|
15495
|
+
updated.modifiers = original.modifiers;
|
|
15496
|
+
}
|
|
15498
15497
|
}
|
|
15499
15498
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
15500
15499
|
}
|
|
@@ -15527,18 +15526,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15527
15526
|
node.heritageClauses = asNodeArray(heritageClauses);
|
|
15528
15527
|
node.members = createNodeArray(members);
|
|
15529
15528
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
15530
|
-
node.illegalDecorators = void 0;
|
|
15531
15529
|
node.jsDoc = void 0;
|
|
15532
15530
|
return node;
|
|
15533
15531
|
}
|
|
15534
15532
|
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);
|
|
15533
|
+
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
15534
|
}
|
|
15543
15535
|
function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
|
|
15544
15536
|
const node = createBaseDeclaration(262 /* TypeAliasDeclaration */);
|
|
@@ -15547,20 +15539,13 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15547
15539
|
node.typeParameters = asNodeArray(typeParameters);
|
|
15548
15540
|
node.type = type;
|
|
15549
15541
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
15550
|
-
node.illegalDecorators = void 0;
|
|
15551
15542
|
node.jsDoc = void 0;
|
|
15552
15543
|
node.locals = void 0;
|
|
15553
15544
|
node.nextContainer = void 0;
|
|
15554
15545
|
return node;
|
|
15555
15546
|
}
|
|
15556
15547
|
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);
|
|
15548
|
+
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node;
|
|
15564
15549
|
}
|
|
15565
15550
|
function createEnumDeclaration(modifiers, name, members) {
|
|
15566
15551
|
const node = createBaseDeclaration(263 /* EnumDeclaration */);
|
|
@@ -15569,18 +15554,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15569
15554
|
node.members = createNodeArray(members);
|
|
15570
15555
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */;
|
|
15571
15556
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15572
|
-
node.illegalDecorators = void 0;
|
|
15573
15557
|
node.jsDoc = void 0;
|
|
15574
15558
|
return node;
|
|
15575
15559
|
}
|
|
15576
15560
|
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);
|
|
15561
|
+
return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node;
|
|
15584
15562
|
}
|
|
15585
15563
|
function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) {
|
|
15586
15564
|
const node = createBaseDeclaration(264 /* ModuleDeclaration */);
|
|
@@ -15594,20 +15572,13 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15594
15572
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */;
|
|
15595
15573
|
}
|
|
15596
15574
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15597
|
-
node.illegalDecorators = void 0;
|
|
15598
15575
|
node.jsDoc = void 0;
|
|
15599
15576
|
node.locals = void 0;
|
|
15600
15577
|
node.nextContainer = void 0;
|
|
15601
15578
|
return node;
|
|
15602
15579
|
}
|
|
15603
15580
|
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);
|
|
15581
|
+
return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node;
|
|
15611
15582
|
}
|
|
15612
15583
|
function createModuleBlock(statements) {
|
|
15613
15584
|
const node = createBaseNode(265 /* ModuleBlock */);
|
|
@@ -15634,7 +15605,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15634
15605
|
const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */);
|
|
15635
15606
|
node.name = asName(name);
|
|
15636
15607
|
node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */;
|
|
15637
|
-
node.illegalDecorators = void 0;
|
|
15638
15608
|
node.modifiers = void 0;
|
|
15639
15609
|
node.jsDoc = void 0;
|
|
15640
15610
|
return node;
|
|
@@ -15644,7 +15614,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15644
15614
|
}
|
|
15645
15615
|
function finishUpdateNamespaceExportDeclaration(updated, original) {
|
|
15646
15616
|
if (updated !== original) {
|
|
15647
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
15648
15617
|
updated.modifiers = original.modifiers;
|
|
15649
15618
|
}
|
|
15650
15619
|
return update(updated, original);
|
|
@@ -15660,18 +15629,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15660
15629
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
15661
15630
|
}
|
|
15662
15631
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15663
|
-
node.illegalDecorators = void 0;
|
|
15664
15632
|
node.jsDoc = void 0;
|
|
15665
15633
|
return node;
|
|
15666
15634
|
}
|
|
15667
15635
|
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);
|
|
15636
|
+
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
15675
15637
|
}
|
|
15676
15638
|
function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
|
|
15677
15639
|
const node = createBaseNode(269 /* ImportDeclaration */);
|
|
@@ -15681,18 +15643,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15681
15643
|
node.assertClause = assertClause;
|
|
15682
15644
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15683
15645
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15684
|
-
node.illegalDecorators = void 0;
|
|
15685
15646
|
node.jsDoc = void 0;
|
|
15686
15647
|
return node;
|
|
15687
15648
|
}
|
|
15688
15649
|
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);
|
|
15650
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node;
|
|
15696
15651
|
}
|
|
15697
15652
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
15698
15653
|
const node = createBaseDeclaration(270 /* ImportClause */);
|
|
@@ -15792,18 +15747,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15792
15747
|
) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);
|
|
15793
15748
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
15794
15749
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15795
|
-
node.illegalDecorators = void 0;
|
|
15796
15750
|
node.jsDoc = void 0;
|
|
15797
15751
|
return node;
|
|
15798
15752
|
}
|
|
15799
15753
|
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);
|
|
15754
|
+
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node;
|
|
15807
15755
|
}
|
|
15808
15756
|
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
15809
15757
|
const node = createBaseDeclaration(275 /* ExportDeclaration */);
|
|
@@ -15814,7 +15762,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15814
15762
|
node.assertClause = assertClause;
|
|
15815
15763
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15816
15764
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15817
|
-
node.illegalDecorators = void 0;
|
|
15818
15765
|
node.jsDoc = void 0;
|
|
15819
15766
|
return node;
|
|
15820
15767
|
}
|
|
@@ -15823,7 +15770,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15823
15770
|
}
|
|
15824
15771
|
function finishUpdateExportDeclaration(updated, original) {
|
|
15825
15772
|
if (updated !== original) {
|
|
15826
|
-
updated.
|
|
15773
|
+
if (updated.modifiers === original.modifiers) {
|
|
15774
|
+
updated.modifiers = original.modifiers;
|
|
15775
|
+
}
|
|
15827
15776
|
}
|
|
15828
15777
|
return update(updated, original);
|
|
15829
15778
|
}
|
|
@@ -16302,7 +16251,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16302
16251
|
node.name = asName(name);
|
|
16303
16252
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
16304
16253
|
node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer);
|
|
16305
|
-
node.illegalDecorators = void 0;
|
|
16306
16254
|
node.modifiers = void 0;
|
|
16307
16255
|
node.questionToken = void 0;
|
|
16308
16256
|
node.exclamationToken = void 0;
|
|
@@ -16314,7 +16262,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16314
16262
|
}
|
|
16315
16263
|
function finishUpdatePropertyAssignment(updated, original) {
|
|
16316
16264
|
if (updated !== original) {
|
|
16317
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
16318
16265
|
updated.modifiers = original.modifiers;
|
|
16319
16266
|
updated.questionToken = original.questionToken;
|
|
16320
16267
|
updated.exclamationToken = original.exclamationToken;
|
|
@@ -16327,7 +16274,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16327
16274
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
16328
16275
|
node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */;
|
|
16329
16276
|
node.equalsToken = void 0;
|
|
16330
|
-
node.illegalDecorators = void 0;
|
|
16331
16277
|
node.modifiers = void 0;
|
|
16332
16278
|
node.questionToken = void 0;
|
|
16333
16279
|
node.exclamationToken = void 0;
|
|
@@ -16339,11 +16285,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16339
16285
|
}
|
|
16340
16286
|
function finishUpdateShorthandPropertyAssignment(updated, original) {
|
|
16341
16287
|
if (updated !== original) {
|
|
16342
|
-
updated.equalsToken = original.equalsToken;
|
|
16343
|
-
updated.illegalDecorators = original.illegalDecorators;
|
|
16344
16288
|
updated.modifiers = original.modifiers;
|
|
16345
16289
|
updated.questionToken = original.questionToken;
|
|
16346
16290
|
updated.exclamationToken = original.exclamationToken;
|
|
16291
|
+
updated.equalsToken = original.equalsToken;
|
|
16347
16292
|
}
|
|
16348
16293
|
return update(updated, original);
|
|
16349
16294
|
}
|
|
@@ -16802,6 +16747,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16802
16747
|
function createObjectDefinePropertyCall(target, propertyName, attributes) {
|
|
16803
16748
|
return createGlobalMethodCall("Object", "defineProperty", [target, asExpression(propertyName), attributes]);
|
|
16804
16749
|
}
|
|
16750
|
+
function createObjectGetOwnPropertyDescriptorCall(target, propertyName) {
|
|
16751
|
+
return createGlobalMethodCall("Object", "getOwnPropertyDescriptor", [target, asExpression(propertyName)]);
|
|
16752
|
+
}
|
|
16805
16753
|
function createReflectGetCall(target, propertyKey, receiver) {
|
|
16806
16754
|
return createGlobalMethodCall("Reflect", "get", receiver ? [target, propertyKey, receiver] : [target, propertyKey]);
|
|
16807
16755
|
}
|
|
@@ -17410,6 +17358,7 @@ function setOriginalNode(node, original) {
|
|
|
17410
17358
|
function mergeEmitNode(sourceEmitNode, destEmitNode) {
|
|
17411
17359
|
const {
|
|
17412
17360
|
flags,
|
|
17361
|
+
internalFlags,
|
|
17413
17362
|
leadingComments,
|
|
17414
17363
|
trailingComments,
|
|
17415
17364
|
commentRange,
|
|
@@ -17427,7 +17376,9 @@ function mergeEmitNode(sourceEmitNode, destEmitNode) {
|
|
|
17427
17376
|
if (trailingComments)
|
|
17428
17377
|
destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments);
|
|
17429
17378
|
if (flags)
|
|
17430
|
-
destEmitNode.flags = flags
|
|
17379
|
+
destEmitNode.flags = flags;
|
|
17380
|
+
if (internalFlags)
|
|
17381
|
+
destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */;
|
|
17431
17382
|
if (commentRange)
|
|
17432
17383
|
destEmitNode.commentRange = commentRange;
|
|
17433
17384
|
if (sourceMapRange)
|
|
@@ -17469,7 +17420,7 @@ function getOrCreateEmitNode(node) {
|
|
|
17469
17420
|
}
|
|
17470
17421
|
node.emitNode = {};
|
|
17471
17422
|
} else {
|
|
17472
|
-
Debug.assert(!(node.emitNode.
|
|
17423
|
+
Debug.assert(!(node.emitNode.internalFlags & 8 /* Immutable */), "Invalid attempt to mutate an immutable node.");
|
|
17473
17424
|
}
|
|
17474
17425
|
return node.emitNode;
|
|
17475
17426
|
}
|
|
@@ -17989,8 +17940,11 @@ function findUseStrictPrologue(statements) {
|
|
|
17989
17940
|
}
|
|
17990
17941
|
return void 0;
|
|
17991
17942
|
}
|
|
17943
|
+
function isCommaExpression(node) {
|
|
17944
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */;
|
|
17945
|
+
}
|
|
17992
17946
|
function isCommaSequence(node) {
|
|
17993
|
-
return node
|
|
17947
|
+
return isCommaExpression(node) || isCommaListExpression(node);
|
|
17994
17948
|
}
|
|
17995
17949
|
function isJSDocTypeAssertion(node) {
|
|
17996
17950
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -18004,6 +17958,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
18004
17958
|
return (kinds & 1 /* Parentheses */) !== 0;
|
|
18005
17959
|
case 213 /* TypeAssertionExpression */:
|
|
18006
17960
|
case 231 /* AsExpression */:
|
|
17961
|
+
case 230 /* ExpressionWithTypeArguments */:
|
|
18007
17962
|
case 235 /* SatisfiesExpression */:
|
|
18008
17963
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
18009
17964
|
case 232 /* NonNullExpression */:
|
|
@@ -18074,12 +18029,21 @@ function getJSDocTypeAliasName(fullName) {
|
|
|
18074
18029
|
}
|
|
18075
18030
|
}
|
|
18076
18031
|
}
|
|
18077
|
-
|
|
18078
|
-
|
|
18079
|
-
|
|
18080
|
-
|
|
18081
|
-
|
|
18082
|
-
|
|
18032
|
+
function isQuestionOrExclamationToken(node) {
|
|
18033
|
+
return isQuestionToken(node) || isExclamationToken(node);
|
|
18034
|
+
}
|
|
18035
|
+
function isIdentifierOrThisTypeNode(node) {
|
|
18036
|
+
return isIdentifier(node) || isThisTypeNode(node);
|
|
18037
|
+
}
|
|
18038
|
+
function isReadonlyKeywordOrPlusOrMinusToken(node) {
|
|
18039
|
+
return isReadonlyKeyword(node) || isPlusToken(node) || isMinusToken(node);
|
|
18040
|
+
}
|
|
18041
|
+
function isQuestionOrPlusOrMinusToken(node) {
|
|
18042
|
+
return isQuestionToken(node) || isPlusToken(node) || isMinusToken(node);
|
|
18043
|
+
}
|
|
18044
|
+
function isModuleName(node) {
|
|
18045
|
+
return isIdentifier(node) || isStringLiteral(node);
|
|
18046
|
+
}
|
|
18083
18047
|
function isExponentiationOperator(kind) {
|
|
18084
18048
|
return kind === 42 /* AsteriskAsteriskToken */;
|
|
18085
18049
|
}
|
|
@@ -18352,7 +18316,7 @@ var forEachChildTable = {
|
|
|
18352
18316
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression);
|
|
18353
18317
|
},
|
|
18354
18318
|
[300 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) {
|
|
18355
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18319
|
+
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
18320
|
},
|
|
18357
18321
|
[301 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) {
|
|
18358
18322
|
return visitNode2(cbNode, node.expression);
|
|
@@ -18367,7 +18331,7 @@ var forEachChildTable = {
|
|
|
18367
18331
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);
|
|
18368
18332
|
},
|
|
18369
18333
|
[299 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) {
|
|
18370
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18334
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer);
|
|
18371
18335
|
},
|
|
18372
18336
|
[257 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) {
|
|
18373
18337
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer);
|
|
@@ -18376,7 +18340,7 @@ var forEachChildTable = {
|
|
|
18376
18340
|
return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);
|
|
18377
18341
|
},
|
|
18378
18342
|
[178 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) {
|
|
18379
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18343
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
18380
18344
|
},
|
|
18381
18345
|
[182 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) {
|
|
18382
18346
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -18393,7 +18357,7 @@ var forEachChildTable = {
|
|
|
18393
18357
|
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
18358
|
},
|
|
18395
18359
|
[173 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) {
|
|
18396
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18360
|
+
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
18361
|
},
|
|
18398
18362
|
[174 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) {
|
|
18399
18363
|
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 +18366,7 @@ var forEachChildTable = {
|
|
|
18402
18366
|
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
18367
|
},
|
|
18404
18368
|
[259 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) {
|
|
18405
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18369
|
+
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
18370
|
},
|
|
18407
18371
|
[215 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) {
|
|
18408
18372
|
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 +18375,7 @@ var forEachChildTable = {
|
|
|
18411
18375
|
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
18376
|
},
|
|
18413
18377
|
[172 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) {
|
|
18414
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18378
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body);
|
|
18415
18379
|
},
|
|
18416
18380
|
[180 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) {
|
|
18417
18381
|
return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
@@ -18532,7 +18496,7 @@ var forEachChildTable = {
|
|
|
18532
18496
|
return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken);
|
|
18533
18497
|
},
|
|
18534
18498
|
[240 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) {
|
|
18535
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18499
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList);
|
|
18536
18500
|
},
|
|
18537
18501
|
[258 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) {
|
|
18538
18502
|
return visitNodes(cbNode, cbNodes, node.declarations);
|
|
@@ -18596,25 +18560,25 @@ var forEachChildTable = {
|
|
|
18596
18560
|
[260 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression,
|
|
18597
18561
|
[228 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression,
|
|
18598
18562
|
[261 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) {
|
|
18599
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18563
|
+
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
18564
|
},
|
|
18601
18565
|
[262 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) {
|
|
18602
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18566
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type);
|
|
18603
18567
|
},
|
|
18604
18568
|
[263 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) {
|
|
18605
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18569
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members);
|
|
18606
18570
|
},
|
|
18607
18571
|
[302 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) {
|
|
18608
18572
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer);
|
|
18609
18573
|
},
|
|
18610
18574
|
[264 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) {
|
|
18611
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18575
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body);
|
|
18612
18576
|
},
|
|
18613
18577
|
[268 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) {
|
|
18614
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18578
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
18615
18579
|
},
|
|
18616
18580
|
[269 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
18617
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18581
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause);
|
|
18618
18582
|
},
|
|
18619
18583
|
[270 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
18620
18584
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
@@ -18626,7 +18590,7 @@ var forEachChildTable = {
|
|
|
18626
18590
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
18627
18591
|
},
|
|
18628
18592
|
[267 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
18629
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18593
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name);
|
|
18630
18594
|
},
|
|
18631
18595
|
[271 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) {
|
|
18632
18596
|
return visitNode2(cbNode, node.name);
|
|
@@ -18637,12 +18601,12 @@ var forEachChildTable = {
|
|
|
18637
18601
|
[272 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
18638
18602
|
[276 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
18639
18603
|
[275 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
18640
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18604
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause);
|
|
18641
18605
|
},
|
|
18642
18606
|
[273 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
18643
18607
|
[278 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
18644
18608
|
[274 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) {
|
|
18645
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18609
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression);
|
|
18646
18610
|
},
|
|
18647
18611
|
[225 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) {
|
|
18648
18612
|
return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans);
|
|
@@ -18669,7 +18633,7 @@ var forEachChildTable = {
|
|
|
18669
18633
|
return visitNode2(cbNode, node.expression);
|
|
18670
18634
|
},
|
|
18671
18635
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
18672
|
-
return visitNodes(cbNode, cbNodes, node.
|
|
18636
|
+
return visitNodes(cbNode, cbNodes, node.modifiers);
|
|
18673
18637
|
},
|
|
18674
18638
|
[357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
18675
18639
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
@@ -19872,7 +19836,7 @@ var Parser;
|
|
|
19872
19836
|
}
|
|
19873
19837
|
}
|
|
19874
19838
|
function canFollowExportModifier() {
|
|
19875
|
-
return token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier();
|
|
19839
|
+
return token() === 59 /* AtToken */ || token() !== 41 /* AsteriskToken */ && token() !== 128 /* AsKeyword */ && token() !== 18 /* OpenBraceToken */ && canFollowModifier();
|
|
19876
19840
|
}
|
|
19877
19841
|
function nextTokenCanFollowExportModifier() {
|
|
19878
19842
|
nextToken();
|
|
@@ -19886,7 +19850,7 @@ var Parser;
|
|
|
19886
19850
|
}
|
|
19887
19851
|
function nextTokenCanFollowDefaultKeyword() {
|
|
19888
19852
|
nextToken();
|
|
19889
|
-
return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine);
|
|
19853
|
+
return token() === 84 /* ClassKeyword */ || token() === 98 /* FunctionKeyword */ || token() === 118 /* InterfaceKeyword */ || token() === 59 /* AtToken */ || token() === 126 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 132 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine);
|
|
19890
19854
|
}
|
|
19891
19855
|
function isListElement(parsingContext2, inErrorRecovery) {
|
|
19892
19856
|
const node = currentNode(parsingContext2);
|
|
@@ -20733,6 +20697,8 @@ var Parser;
|
|
|
20733
20697
|
function parseTypeParameter() {
|
|
20734
20698
|
const pos = getNodePos();
|
|
20735
20699
|
const modifiers = parseModifiers(
|
|
20700
|
+
/*allowDecorators*/
|
|
20701
|
+
false,
|
|
20736
20702
|
/*permitConstAsModifier*/
|
|
20737
20703
|
true
|
|
20738
20704
|
);
|
|
@@ -20785,10 +20751,16 @@ var Parser;
|
|
|
20785
20751
|
function parseParameterWorker(inOuterAwaitContext, allowAmbiguity = true) {
|
|
20786
20752
|
const pos = getNodePos();
|
|
20787
20753
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
20788
|
-
const
|
|
20754
|
+
const modifiers = inOuterAwaitContext ? doInAwaitContext(() => parseModifiers(
|
|
20755
|
+
/*allowDecorators*/
|
|
20756
|
+
true
|
|
20757
|
+
)) : doOutsideOfAwaitContext(() => parseModifiers(
|
|
20758
|
+
/*allowDecorators*/
|
|
20759
|
+
true
|
|
20760
|
+
));
|
|
20789
20761
|
if (token() === 108 /* ThisKeyword */) {
|
|
20790
20762
|
const node2 = factory2.createParameterDeclaration(
|
|
20791
|
-
|
|
20763
|
+
modifiers,
|
|
20792
20764
|
/*dotDotDotToken*/
|
|
20793
20765
|
void 0,
|
|
20794
20766
|
createIdentifier(
|
|
@@ -20801,14 +20773,14 @@ var Parser;
|
|
|
20801
20773
|
/*initializer*/
|
|
20802
20774
|
void 0
|
|
20803
20775
|
);
|
|
20804
|
-
|
|
20805
|
-
|
|
20776
|
+
const modifier = firstOrUndefined(modifiers);
|
|
20777
|
+
if (modifier) {
|
|
20778
|
+
parseErrorAtRange(modifier, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);
|
|
20806
20779
|
}
|
|
20807
20780
|
return withJSDoc(finishNode(node2, pos), hasJSDoc);
|
|
20808
20781
|
}
|
|
20809
20782
|
const savedTopLevel = topLevel;
|
|
20810
20783
|
topLevel = false;
|
|
20811
|
-
const modifiers = combineDecoratorsAndModifiers(decorators, parseModifiers());
|
|
20812
20784
|
const dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */);
|
|
20813
20785
|
if (!allowAmbiguity && !isParameterNameStart()) {
|
|
20814
20786
|
return void 0;
|
|
@@ -20920,7 +20892,7 @@ var Parser;
|
|
|
20920
20892
|
nextToken();
|
|
20921
20893
|
return token() === 58 /* ColonToken */ || token() === 27 /* CommaToken */ || token() === 23 /* CloseBracketToken */;
|
|
20922
20894
|
}
|
|
20923
|
-
function parseIndexSignatureDeclaration(pos, hasJSDoc,
|
|
20895
|
+
function parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers) {
|
|
20924
20896
|
const parameters = parseBracketedList(ParsingContext.Parameters, () => parseParameter(
|
|
20925
20897
|
/*inOuterAwaitContext*/
|
|
20926
20898
|
false
|
|
@@ -20928,7 +20900,6 @@ var Parser;
|
|
|
20928
20900
|
const type = parseTypeAnnotation();
|
|
20929
20901
|
parseTypeMemberSemicolon();
|
|
20930
20902
|
const node = factory2.createIndexSignature(modifiers, parameters, type);
|
|
20931
|
-
node.illegalDecorators = decorators;
|
|
20932
20903
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
20933
20904
|
}
|
|
20934
20905
|
function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) {
|
|
@@ -20983,37 +20954,18 @@ var Parser;
|
|
|
20983
20954
|
}
|
|
20984
20955
|
const pos = getNodePos();
|
|
20985
20956
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
20986
|
-
const modifiers = parseModifiers(
|
|
20957
|
+
const modifiers = parseModifiers(
|
|
20958
|
+
/*allowDecorators*/
|
|
20959
|
+
false
|
|
20960
|
+
);
|
|
20987
20961
|
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
|
-
);
|
|
20962
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 4 /* Type */);
|
|
20997
20963
|
}
|
|
20998
20964
|
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
|
-
);
|
|
20965
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 4 /* Type */);
|
|
21008
20966
|
}
|
|
21009
20967
|
if (isIndexSignature()) {
|
|
21010
|
-
return parseIndexSignatureDeclaration(
|
|
21011
|
-
pos,
|
|
21012
|
-
hasJSDoc,
|
|
21013
|
-
/*decorators*/
|
|
21014
|
-
void 0,
|
|
21015
|
-
modifiers
|
|
21016
|
-
);
|
|
20968
|
+
return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers);
|
|
21017
20969
|
}
|
|
21018
20970
|
return parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers);
|
|
21019
20971
|
}
|
|
@@ -21493,7 +21445,10 @@ var Parser;
|
|
|
21493
21445
|
}
|
|
21494
21446
|
function skipParameterStart() {
|
|
21495
21447
|
if (isModifierKind(token())) {
|
|
21496
|
-
parseModifiers(
|
|
21448
|
+
parseModifiers(
|
|
21449
|
+
/*allowDecorators*/
|
|
21450
|
+
false
|
|
21451
|
+
);
|
|
21497
21452
|
}
|
|
21498
21453
|
if (isIdentifier2() || token() === 108 /* ThisKeyword */) {
|
|
21499
21454
|
nextToken();
|
|
@@ -21621,6 +21576,7 @@ var Parser;
|
|
|
21621
21576
|
case 133 /* AwaitKeyword */:
|
|
21622
21577
|
case 125 /* YieldKeyword */:
|
|
21623
21578
|
case 80 /* PrivateIdentifier */:
|
|
21579
|
+
case 59 /* AtToken */:
|
|
21624
21580
|
return true;
|
|
21625
21581
|
default:
|
|
21626
21582
|
if (isBinaryOperator2()) {
|
|
@@ -22712,6 +22668,8 @@ var Parser;
|
|
|
22712
22668
|
break;
|
|
22713
22669
|
}
|
|
22714
22670
|
return parseFunctionExpression();
|
|
22671
|
+
case 59 /* AtToken */:
|
|
22672
|
+
return parseDecoratedExpression();
|
|
22715
22673
|
case 84 /* ClassKeyword */:
|
|
22716
22674
|
return parseClassExpression();
|
|
22717
22675
|
case 98 /* FunctionKeyword */:
|
|
@@ -22779,13 +22737,15 @@ var Parser;
|
|
|
22779
22737
|
);
|
|
22780
22738
|
return withJSDoc(finishNode(factory2.createSpreadAssignment(expression), pos), hasJSDoc);
|
|
22781
22739
|
}
|
|
22782
|
-
const
|
|
22783
|
-
|
|
22740
|
+
const modifiers = parseModifiers(
|
|
22741
|
+
/*allowDecorators*/
|
|
22742
|
+
true
|
|
22743
|
+
);
|
|
22784
22744
|
if (parseContextualModifier(137 /* GetKeyword */)) {
|
|
22785
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
22745
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */);
|
|
22786
22746
|
}
|
|
22787
22747
|
if (parseContextualModifier(151 /* SetKeyword */)) {
|
|
22788
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
22748
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */);
|
|
22789
22749
|
}
|
|
22790
22750
|
const asteriskToken = parseOptionalToken(41 /* AsteriskToken */);
|
|
22791
22751
|
const tokenIsIdentifier = isIdentifier2();
|
|
@@ -22793,7 +22753,7 @@ var Parser;
|
|
|
22793
22753
|
const questionToken = parseOptionalToken(57 /* QuestionToken */);
|
|
22794
22754
|
const exclamationToken = parseOptionalToken(53 /* ExclamationToken */);
|
|
22795
22755
|
if (asteriskToken || token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) {
|
|
22796
|
-
return parseMethodDeclaration(pos, hasJSDoc,
|
|
22756
|
+
return parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken);
|
|
22797
22757
|
}
|
|
22798
22758
|
let node;
|
|
22799
22759
|
const isShorthandPropertyAssignment2 = tokenIsIdentifier && token() !== 58 /* ColonToken */;
|
|
@@ -22813,7 +22773,6 @@ var Parser;
|
|
|
22813
22773
|
));
|
|
22814
22774
|
node = factory2.createPropertyAssignment(name, initializer);
|
|
22815
22775
|
}
|
|
22816
|
-
node.illegalDecorators = decorators;
|
|
22817
22776
|
node.modifiers = modifiers;
|
|
22818
22777
|
node.questionToken = questionToken;
|
|
22819
22778
|
node.exclamationToken = exclamationToken;
|
|
@@ -22841,7 +22800,10 @@ var Parser;
|
|
|
22841
22800
|
);
|
|
22842
22801
|
const pos = getNodePos();
|
|
22843
22802
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
22844
|
-
const modifiers = parseModifiers(
|
|
22803
|
+
const modifiers = parseModifiers(
|
|
22804
|
+
/*allowDecorators*/
|
|
22805
|
+
false
|
|
22806
|
+
);
|
|
22845
22807
|
parseExpected(98 /* FunctionKeyword */);
|
|
22846
22808
|
const asteriskToken = parseOptionalToken(41 /* AsteriskToken */);
|
|
22847
22809
|
const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;
|
|
@@ -23213,7 +23175,7 @@ var Parser;
|
|
|
23213
23175
|
if (currentToken2 === 154 /* TypeKeyword */) {
|
|
23214
23176
|
currentToken2 = lookAhead(nextToken);
|
|
23215
23177
|
}
|
|
23216
|
-
if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */) {
|
|
23178
|
+
if (currentToken2 === 63 /* EqualsToken */ || currentToken2 === 41 /* AsteriskToken */ || currentToken2 === 18 /* OpenBraceToken */ || currentToken2 === 88 /* DefaultKeyword */ || currentToken2 === 128 /* AsKeyword */ || currentToken2 === 59 /* AtToken */) {
|
|
23217
23179
|
return true;
|
|
23218
23180
|
}
|
|
23219
23181
|
continue;
|
|
@@ -23297,8 +23259,6 @@ var Parser;
|
|
|
23297
23259
|
return parseVariableStatement(
|
|
23298
23260
|
getNodePos(),
|
|
23299
23261
|
hasPrecedingJSDocComment(),
|
|
23300
|
-
/*decorators*/
|
|
23301
|
-
void 0,
|
|
23302
23262
|
/*modifiers*/
|
|
23303
23263
|
void 0
|
|
23304
23264
|
);
|
|
@@ -23307,8 +23267,6 @@ var Parser;
|
|
|
23307
23267
|
return parseVariableStatement(
|
|
23308
23268
|
getNodePos(),
|
|
23309
23269
|
hasPrecedingJSDocComment(),
|
|
23310
|
-
/*decorators*/
|
|
23311
|
-
void 0,
|
|
23312
23270
|
/*modifiers*/
|
|
23313
23271
|
void 0
|
|
23314
23272
|
);
|
|
@@ -23318,8 +23276,6 @@ var Parser;
|
|
|
23318
23276
|
return parseFunctionDeclaration(
|
|
23319
23277
|
getNodePos(),
|
|
23320
23278
|
hasPrecedingJSDocComment(),
|
|
23321
|
-
/*decorators*/
|
|
23322
|
-
void 0,
|
|
23323
23279
|
/*modifiers*/
|
|
23324
23280
|
void 0
|
|
23325
23281
|
);
|
|
@@ -23327,8 +23283,6 @@ var Parser;
|
|
|
23327
23283
|
return parseClassDeclaration(
|
|
23328
23284
|
getNodePos(),
|
|
23329
23285
|
hasPrecedingJSDocComment(),
|
|
23330
|
-
/*decorators*/
|
|
23331
|
-
void 0,
|
|
23332
23286
|
/*modifiers*/
|
|
23333
23287
|
void 0
|
|
23334
23288
|
);
|
|
@@ -23391,8 +23345,10 @@ var Parser;
|
|
|
23391
23345
|
function parseDeclaration() {
|
|
23392
23346
|
const pos = getNodePos();
|
|
23393
23347
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
23394
|
-
const
|
|
23395
|
-
|
|
23348
|
+
const modifiers = parseModifiers(
|
|
23349
|
+
/*allowDecorators*/
|
|
23350
|
+
true
|
|
23351
|
+
);
|
|
23396
23352
|
const isAmbient = some(modifiers, isDeclareModifier);
|
|
23397
23353
|
if (isAmbient) {
|
|
23398
23354
|
const node = tryReuseAmbientDeclaration(pos);
|
|
@@ -23402,9 +23358,9 @@ var Parser;
|
|
|
23402
23358
|
for (const m of modifiers) {
|
|
23403
23359
|
m.flags |= 16777216 /* Ambient */;
|
|
23404
23360
|
}
|
|
23405
|
-
return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc,
|
|
23361
|
+
return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers));
|
|
23406
23362
|
} else {
|
|
23407
|
-
return parseDeclarationWorker(pos, hasJSDoc,
|
|
23363
|
+
return parseDeclarationWorker(pos, hasJSDoc, modifiers);
|
|
23408
23364
|
}
|
|
23409
23365
|
}
|
|
23410
23366
|
function tryReuseAmbientDeclaration(pos) {
|
|
@@ -23415,41 +23371,41 @@ var Parser;
|
|
|
23415
23371
|
}
|
|
23416
23372
|
});
|
|
23417
23373
|
}
|
|
23418
|
-
function parseDeclarationWorker(pos, hasJSDoc,
|
|
23374
|
+
function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) {
|
|
23419
23375
|
switch (token()) {
|
|
23420
23376
|
case 113 /* VarKeyword */:
|
|
23421
23377
|
case 119 /* LetKeyword */:
|
|
23422
23378
|
case 85 /* ConstKeyword */:
|
|
23423
|
-
return parseVariableStatement(pos, hasJSDoc,
|
|
23379
|
+
return parseVariableStatement(pos, hasJSDoc, modifiersIn);
|
|
23424
23380
|
case 98 /* FunctionKeyword */:
|
|
23425
|
-
return parseFunctionDeclaration(pos, hasJSDoc,
|
|
23381
|
+
return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23426
23382
|
case 84 /* ClassKeyword */:
|
|
23427
|
-
return parseClassDeclaration(pos, hasJSDoc,
|
|
23383
|
+
return parseClassDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23428
23384
|
case 118 /* InterfaceKeyword */:
|
|
23429
|
-
return parseInterfaceDeclaration(pos, hasJSDoc,
|
|
23385
|
+
return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23430
23386
|
case 154 /* TypeKeyword */:
|
|
23431
|
-
return parseTypeAliasDeclaration(pos, hasJSDoc,
|
|
23387
|
+
return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23432
23388
|
case 92 /* EnumKeyword */:
|
|
23433
|
-
return parseEnumDeclaration(pos, hasJSDoc,
|
|
23389
|
+
return parseEnumDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23434
23390
|
case 159 /* GlobalKeyword */:
|
|
23435
23391
|
case 142 /* ModuleKeyword */:
|
|
23436
23392
|
case 143 /* NamespaceKeyword */:
|
|
23437
|
-
return parseModuleDeclaration(pos, hasJSDoc,
|
|
23393
|
+
return parseModuleDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23438
23394
|
case 100 /* ImportKeyword */:
|
|
23439
|
-
return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc,
|
|
23395
|
+
return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23440
23396
|
case 93 /* ExportKeyword */:
|
|
23441
23397
|
nextToken();
|
|
23442
23398
|
switch (token()) {
|
|
23443
23399
|
case 88 /* DefaultKeyword */:
|
|
23444
23400
|
case 63 /* EqualsToken */:
|
|
23445
|
-
return parseExportAssignment(pos, hasJSDoc,
|
|
23401
|
+
return parseExportAssignment(pos, hasJSDoc, modifiersIn);
|
|
23446
23402
|
case 128 /* AsKeyword */:
|
|
23447
|
-
return parseNamespaceExportDeclaration(pos, hasJSDoc,
|
|
23403
|
+
return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23448
23404
|
default:
|
|
23449
|
-
return parseExportDeclaration(pos, hasJSDoc,
|
|
23405
|
+
return parseExportDeclaration(pos, hasJSDoc, modifiersIn);
|
|
23450
23406
|
}
|
|
23451
23407
|
default:
|
|
23452
|
-
if (
|
|
23408
|
+
if (modifiersIn) {
|
|
23453
23409
|
const missing = createMissingNode(
|
|
23454
23410
|
279 /* MissingDeclaration */,
|
|
23455
23411
|
/*reportAtCurrentPosition*/
|
|
@@ -23457,8 +23413,7 @@ var Parser;
|
|
|
23457
23413
|
Diagnostics.Declaration_expected
|
|
23458
23414
|
);
|
|
23459
23415
|
setTextRangePos(missing, pos);
|
|
23460
|
-
missing.
|
|
23461
|
-
missing.modifiers = modifiers;
|
|
23416
|
+
missing.modifiers = modifiersIn;
|
|
23462
23417
|
return missing;
|
|
23463
23418
|
}
|
|
23464
23419
|
return void 0;
|
|
@@ -23591,17 +23546,16 @@ var Parser;
|
|
|
23591
23546
|
function canFollowContextualOfKeyword() {
|
|
23592
23547
|
return nextTokenIsIdentifier() && nextToken() === 21 /* CloseParenToken */;
|
|
23593
23548
|
}
|
|
23594
|
-
function parseVariableStatement(pos, hasJSDoc,
|
|
23549
|
+
function parseVariableStatement(pos, hasJSDoc, modifiers) {
|
|
23595
23550
|
const declarationList = parseVariableDeclarationList(
|
|
23596
23551
|
/*inForStatementInitializer*/
|
|
23597
23552
|
false
|
|
23598
23553
|
);
|
|
23599
23554
|
parseSemicolon();
|
|
23600
23555
|
const node = factory2.createVariableStatement(modifiers, declarationList);
|
|
23601
|
-
node.illegalDecorators = decorators;
|
|
23602
23556
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23603
23557
|
}
|
|
23604
|
-
function parseFunctionDeclaration(pos, hasJSDoc,
|
|
23558
|
+
function parseFunctionDeclaration(pos, hasJSDoc, modifiers) {
|
|
23605
23559
|
const savedAwaitContext = inAwaitContext();
|
|
23606
23560
|
const modifierFlags = modifiersToFlags(modifiers);
|
|
23607
23561
|
parseExpected(98 /* FunctionKeyword */);
|
|
@@ -23624,7 +23578,6 @@ var Parser;
|
|
|
23624
23578
|
const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, Diagnostics.or_expected);
|
|
23625
23579
|
setAwaitContext(savedAwaitContext);
|
|
23626
23580
|
const node = factory2.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
|
|
23627
|
-
node.illegalDecorators = decorators;
|
|
23628
23581
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23629
23582
|
}
|
|
23630
23583
|
function parseConstructorName() {
|
|
@@ -23638,7 +23591,7 @@ var Parser;
|
|
|
23638
23591
|
});
|
|
23639
23592
|
}
|
|
23640
23593
|
}
|
|
23641
|
-
function tryParseConstructorDeclaration(pos, hasJSDoc,
|
|
23594
|
+
function tryParseConstructorDeclaration(pos, hasJSDoc, modifiers) {
|
|
23642
23595
|
return tryParse(() => {
|
|
23643
23596
|
if (parseConstructorName()) {
|
|
23644
23597
|
const typeParameters = parseTypeParameters();
|
|
@@ -23650,14 +23603,13 @@ var Parser;
|
|
|
23650
23603
|
);
|
|
23651
23604
|
const body = parseFunctionBlockOrSemicolon(0 /* None */, Diagnostics.or_expected);
|
|
23652
23605
|
const node = factory2.createConstructorDeclaration(modifiers, parameters, body);
|
|
23653
|
-
node.illegalDecorators = decorators;
|
|
23654
23606
|
node.typeParameters = typeParameters;
|
|
23655
23607
|
node.type = type;
|
|
23656
23608
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23657
23609
|
}
|
|
23658
23610
|
});
|
|
23659
23611
|
}
|
|
23660
|
-
function parseMethodDeclaration(pos, hasJSDoc,
|
|
23612
|
+
function parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken, diagnosticMessage) {
|
|
23661
23613
|
const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;
|
|
23662
23614
|
const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */;
|
|
23663
23615
|
const typeParameters = parseTypeParameters();
|
|
@@ -23669,7 +23621,7 @@ var Parser;
|
|
|
23669
23621
|
);
|
|
23670
23622
|
const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, diagnosticMessage);
|
|
23671
23623
|
const node = factory2.createMethodDeclaration(
|
|
23672
|
-
|
|
23624
|
+
modifiers,
|
|
23673
23625
|
asteriskToken,
|
|
23674
23626
|
name,
|
|
23675
23627
|
questionToken,
|
|
@@ -23681,13 +23633,13 @@ var Parser;
|
|
|
23681
23633
|
node.exclamationToken = exclamationToken;
|
|
23682
23634
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23683
23635
|
}
|
|
23684
|
-
function parsePropertyDeclaration(pos, hasJSDoc,
|
|
23636
|
+
function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) {
|
|
23685
23637
|
const exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(53 /* ExclamationToken */) : void 0;
|
|
23686
23638
|
const type = parseTypeAnnotation();
|
|
23687
23639
|
const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer);
|
|
23688
23640
|
parseSemicolonAfterPropertyName(name, type, initializer);
|
|
23689
23641
|
const node = factory2.createPropertyDeclaration(
|
|
23690
|
-
|
|
23642
|
+
modifiers,
|
|
23691
23643
|
name,
|
|
23692
23644
|
questionToken || exclamationToken,
|
|
23693
23645
|
type,
|
|
@@ -23695,7 +23647,7 @@ var Parser;
|
|
|
23695
23647
|
);
|
|
23696
23648
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23697
23649
|
}
|
|
23698
|
-
function parsePropertyOrMethodDeclaration(pos, hasJSDoc,
|
|
23650
|
+
function parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers) {
|
|
23699
23651
|
const asteriskToken = parseOptionalToken(41 /* AsteriskToken */);
|
|
23700
23652
|
const name = parsePropertyName();
|
|
23701
23653
|
const questionToken = parseOptionalToken(57 /* QuestionToken */);
|
|
@@ -23703,7 +23655,6 @@ var Parser;
|
|
|
23703
23655
|
return parseMethodDeclaration(
|
|
23704
23656
|
pos,
|
|
23705
23657
|
hasJSDoc,
|
|
23706
|
-
decorators,
|
|
23707
23658
|
modifiers,
|
|
23708
23659
|
asteriskToken,
|
|
23709
23660
|
name,
|
|
@@ -23713,9 +23664,9 @@ var Parser;
|
|
|
23713
23664
|
Diagnostics.or_expected
|
|
23714
23665
|
);
|
|
23715
23666
|
}
|
|
23716
|
-
return parsePropertyDeclaration(pos, hasJSDoc,
|
|
23667
|
+
return parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken);
|
|
23717
23668
|
}
|
|
23718
|
-
function parseAccessorDeclaration(pos, hasJSDoc,
|
|
23669
|
+
function parseAccessorDeclaration(pos, hasJSDoc, modifiers, kind, flags) {
|
|
23719
23670
|
const name = parsePropertyName();
|
|
23720
23671
|
const typeParameters = parseTypeParameters();
|
|
23721
23672
|
const parameters = parseParameters(0 /* None */);
|
|
@@ -23725,7 +23676,7 @@ var Parser;
|
|
|
23725
23676
|
false
|
|
23726
23677
|
);
|
|
23727
23678
|
const body = parseFunctionBlockOrSemicolon(flags);
|
|
23728
|
-
const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(
|
|
23679
|
+
const node = kind === 174 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body);
|
|
23729
23680
|
node.typeParameters = typeParameters;
|
|
23730
23681
|
if (isSetAccessorDeclaration(node))
|
|
23731
23682
|
node.type = type;
|
|
@@ -23771,11 +23722,10 @@ var Parser;
|
|
|
23771
23722
|
}
|
|
23772
23723
|
return false;
|
|
23773
23724
|
}
|
|
23774
|
-
function parseClassStaticBlockDeclaration(pos, hasJSDoc,
|
|
23725
|
+
function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) {
|
|
23775
23726
|
parseExpectedToken(124 /* StaticKeyword */);
|
|
23776
23727
|
const body = parseClassStaticBlockBody();
|
|
23777
23728
|
const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc);
|
|
23778
|
-
node.illegalDecorators = decorators;
|
|
23779
23729
|
node.modifiers = modifiers;
|
|
23780
23730
|
return node;
|
|
23781
23731
|
}
|
|
@@ -23815,15 +23765,7 @@ var Parser;
|
|
|
23815
23765
|
const expression = doInDecoratorContext(parseDecoratorExpression);
|
|
23816
23766
|
return finishNode(factory2.createDecorator(expression), pos);
|
|
23817
23767
|
}
|
|
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) {
|
|
23768
|
+
function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
23827
23769
|
const pos = getNodePos();
|
|
23828
23770
|
const kind = token();
|
|
23829
23771
|
if (token() === 85 /* ConstKeyword */ && permitConstAsModifier) {
|
|
@@ -23841,23 +23783,26 @@ var Parser;
|
|
|
23841
23783
|
}
|
|
23842
23784
|
return finishNode(factory2.createToken(kind), pos);
|
|
23843
23785
|
}
|
|
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) {
|
|
23786
|
+
function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
23854
23787
|
const pos = getNodePos();
|
|
23855
|
-
let list
|
|
23856
|
-
|
|
23788
|
+
let list;
|
|
23789
|
+
let modifier, hasSeenStaticModifier = false;
|
|
23790
|
+
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
23857
23791
|
if (modifier.kind === 124 /* StaticKeyword */)
|
|
23858
|
-
|
|
23792
|
+
hasSeenStaticModifier = true;
|
|
23859
23793
|
list = append(list, modifier);
|
|
23860
23794
|
}
|
|
23795
|
+
if (allowDecorators && token() === 59 /* AtToken */) {
|
|
23796
|
+
let decorator;
|
|
23797
|
+
while (decorator = tryParseDecorator()) {
|
|
23798
|
+
list = append(list, decorator);
|
|
23799
|
+
}
|
|
23800
|
+
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
23801
|
+
if (modifier.kind === 124 /* StaticKeyword */)
|
|
23802
|
+
hasSeenStaticModifier = true;
|
|
23803
|
+
list = append(list, modifier);
|
|
23804
|
+
}
|
|
23805
|
+
}
|
|
23861
23806
|
return list && createNodeArray(list, pos);
|
|
23862
23807
|
}
|
|
23863
23808
|
function parseModifiersForArrowFunction() {
|
|
@@ -23877,30 +23822,31 @@ var Parser;
|
|
|
23877
23822
|
return finishNode(factory2.createSemicolonClassElement(), pos);
|
|
23878
23823
|
}
|
|
23879
23824
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
23880
|
-
const decorators = parseDecorators();
|
|
23881
23825
|
const modifiers = parseModifiers(
|
|
23826
|
+
/*allowDecorators*/
|
|
23827
|
+
true,
|
|
23882
23828
|
/*permitConstAsModifier*/
|
|
23883
23829
|
true,
|
|
23884
23830
|
/*stopOnStartOfClassStaticBlock*/
|
|
23885
23831
|
true
|
|
23886
23832
|
);
|
|
23887
23833
|
if (token() === 124 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) {
|
|
23888
|
-
return parseClassStaticBlockDeclaration(pos, hasJSDoc,
|
|
23834
|
+
return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers);
|
|
23889
23835
|
}
|
|
23890
23836
|
if (parseContextualModifier(137 /* GetKeyword */)) {
|
|
23891
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
23837
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 174 /* GetAccessor */, 0 /* None */);
|
|
23892
23838
|
}
|
|
23893
23839
|
if (parseContextualModifier(151 /* SetKeyword */)) {
|
|
23894
|
-
return parseAccessorDeclaration(pos, hasJSDoc,
|
|
23840
|
+
return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 175 /* SetAccessor */, 0 /* None */);
|
|
23895
23841
|
}
|
|
23896
23842
|
if (token() === 135 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) {
|
|
23897
|
-
const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc,
|
|
23843
|
+
const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers);
|
|
23898
23844
|
if (constructorDeclaration) {
|
|
23899
23845
|
return constructorDeclaration;
|
|
23900
23846
|
}
|
|
23901
23847
|
}
|
|
23902
23848
|
if (isIndexSignature()) {
|
|
23903
|
-
return parseIndexSignatureDeclaration(pos, hasJSDoc,
|
|
23849
|
+
return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers);
|
|
23904
23850
|
}
|
|
23905
23851
|
if (tokenIsIdentifierOrKeyword(token()) || token() === 10 /* StringLiteral */ || token() === 8 /* NumericLiteral */ || token() === 41 /* AsteriskToken */ || token() === 22 /* OpenBracketToken */) {
|
|
23906
23852
|
const isAmbient = some(modifiers, isDeclareModifier);
|
|
@@ -23908,12 +23854,12 @@ var Parser;
|
|
|
23908
23854
|
for (const m of modifiers) {
|
|
23909
23855
|
m.flags |= 16777216 /* Ambient */;
|
|
23910
23856
|
}
|
|
23911
|
-
return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc,
|
|
23857
|
+
return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers));
|
|
23912
23858
|
} else {
|
|
23913
|
-
return parsePropertyOrMethodDeclaration(pos, hasJSDoc,
|
|
23859
|
+
return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers);
|
|
23914
23860
|
}
|
|
23915
23861
|
}
|
|
23916
|
-
if (
|
|
23862
|
+
if (modifiers) {
|
|
23917
23863
|
const name = createMissingNode(
|
|
23918
23864
|
79 /* Identifier */,
|
|
23919
23865
|
/*reportAtCurrentPosition*/
|
|
@@ -23923,7 +23869,6 @@ var Parser;
|
|
|
23923
23869
|
return parsePropertyDeclaration(
|
|
23924
23870
|
pos,
|
|
23925
23871
|
hasJSDoc,
|
|
23926
|
-
decorators,
|
|
23927
23872
|
modifiers,
|
|
23928
23873
|
name,
|
|
23929
23874
|
/*questionToken*/
|
|
@@ -23932,21 +23877,39 @@ var Parser;
|
|
|
23932
23877
|
}
|
|
23933
23878
|
return Debug.fail("Should not have attempted to parse class member declaration.");
|
|
23934
23879
|
}
|
|
23880
|
+
function parseDecoratedExpression() {
|
|
23881
|
+
const pos = getNodePos();
|
|
23882
|
+
const hasJSDoc = hasPrecedingJSDocComment();
|
|
23883
|
+
const modifiers = parseModifiers(
|
|
23884
|
+
/*allowDecorators*/
|
|
23885
|
+
true
|
|
23886
|
+
);
|
|
23887
|
+
if (token() === 84 /* ClassKeyword */) {
|
|
23888
|
+
return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 228 /* ClassExpression */);
|
|
23889
|
+
}
|
|
23890
|
+
const missing = createMissingNode(
|
|
23891
|
+
279 /* MissingDeclaration */,
|
|
23892
|
+
/*reportAtCurrentPosition*/
|
|
23893
|
+
true,
|
|
23894
|
+
Diagnostics.Expression_expected
|
|
23895
|
+
);
|
|
23896
|
+
setTextRangePos(missing, pos);
|
|
23897
|
+
missing.modifiers = modifiers;
|
|
23898
|
+
return missing;
|
|
23899
|
+
}
|
|
23935
23900
|
function parseClassExpression() {
|
|
23936
23901
|
return parseClassDeclarationOrExpression(
|
|
23937
23902
|
getNodePos(),
|
|
23938
23903
|
hasPrecedingJSDocComment(),
|
|
23939
|
-
/*decorators*/
|
|
23940
|
-
void 0,
|
|
23941
23904
|
/*modifiers*/
|
|
23942
23905
|
void 0,
|
|
23943
23906
|
228 /* ClassExpression */
|
|
23944
23907
|
);
|
|
23945
23908
|
}
|
|
23946
|
-
function parseClassDeclaration(pos, hasJSDoc,
|
|
23947
|
-
return parseClassDeclarationOrExpression(pos, hasJSDoc,
|
|
23909
|
+
function parseClassDeclaration(pos, hasJSDoc, modifiers) {
|
|
23910
|
+
return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 260 /* ClassDeclaration */);
|
|
23948
23911
|
}
|
|
23949
|
-
function parseClassDeclarationOrExpression(pos, hasJSDoc,
|
|
23912
|
+
function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) {
|
|
23950
23913
|
const savedAwaitContext = inAwaitContext();
|
|
23951
23914
|
parseExpected(84 /* ClassKeyword */);
|
|
23952
23915
|
const name = parseNameOfClassDeclarationOrExpression();
|
|
@@ -23965,7 +23928,7 @@ var Parser;
|
|
|
23965
23928
|
members = createMissingList();
|
|
23966
23929
|
}
|
|
23967
23930
|
setAwaitContext(savedAwaitContext);
|
|
23968
|
-
const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(
|
|
23931
|
+
const node = kind === 260 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members);
|
|
23969
23932
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23970
23933
|
}
|
|
23971
23934
|
function parseNameOfClassDeclarationOrExpression() {
|
|
@@ -24006,17 +23969,16 @@ var Parser;
|
|
|
24006
23969
|
function parseClassMembers() {
|
|
24007
23970
|
return parseList(ParsingContext.ClassMembers, parseClassElement);
|
|
24008
23971
|
}
|
|
24009
|
-
function parseInterfaceDeclaration(pos, hasJSDoc,
|
|
23972
|
+
function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) {
|
|
24010
23973
|
parseExpected(118 /* InterfaceKeyword */);
|
|
24011
23974
|
const name = parseIdentifier();
|
|
24012
23975
|
const typeParameters = parseTypeParameters();
|
|
24013
23976
|
const heritageClauses = parseHeritageClauses();
|
|
24014
23977
|
const members = parseObjectTypeMembers();
|
|
24015
23978
|
const node = factory2.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members);
|
|
24016
|
-
node.illegalDecorators = decorators;
|
|
24017
23979
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24018
23980
|
}
|
|
24019
|
-
function parseTypeAliasDeclaration(pos, hasJSDoc,
|
|
23981
|
+
function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) {
|
|
24020
23982
|
parseExpected(154 /* TypeKeyword */);
|
|
24021
23983
|
const name = parseIdentifier();
|
|
24022
23984
|
const typeParameters = parseTypeParameters();
|
|
@@ -24024,7 +23986,6 @@ var Parser;
|
|
|
24024
23986
|
const type = token() === 139 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType();
|
|
24025
23987
|
parseSemicolon();
|
|
24026
23988
|
const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type);
|
|
24027
|
-
node.illegalDecorators = decorators;
|
|
24028
23989
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24029
23990
|
}
|
|
24030
23991
|
function parseEnumMember() {
|
|
@@ -24034,7 +23995,7 @@ var Parser;
|
|
|
24034
23995
|
const initializer = allowInAnd(parseInitializer);
|
|
24035
23996
|
return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc);
|
|
24036
23997
|
}
|
|
24037
|
-
function parseEnumDeclaration(pos, hasJSDoc,
|
|
23998
|
+
function parseEnumDeclaration(pos, hasJSDoc, modifiers) {
|
|
24038
23999
|
parseExpected(92 /* EnumKeyword */);
|
|
24039
24000
|
const name = parseIdentifier();
|
|
24040
24001
|
let members;
|
|
@@ -24045,7 +24006,6 @@ var Parser;
|
|
|
24045
24006
|
members = createMissingList();
|
|
24046
24007
|
}
|
|
24047
24008
|
const node = factory2.createEnumDeclaration(modifiers, name, members);
|
|
24048
|
-
node.illegalDecorators = decorators;
|
|
24049
24009
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24050
24010
|
}
|
|
24051
24011
|
function parseModuleBlock() {
|
|
@@ -24059,24 +24019,21 @@ var Parser;
|
|
|
24059
24019
|
}
|
|
24060
24020
|
return finishNode(factory2.createModuleBlock(statements), pos);
|
|
24061
24021
|
}
|
|
24062
|
-
function parseModuleOrNamespaceDeclaration(pos, hasJSDoc,
|
|
24022
|
+
function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
|
|
24063
24023
|
const namespaceFlag = flags & 16 /* Namespace */;
|
|
24064
24024
|
const name = parseIdentifier();
|
|
24065
24025
|
const body = parseOptional(24 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
|
|
24066
24026
|
getNodePos(),
|
|
24067
24027
|
/*hasJSDoc*/
|
|
24068
24028
|
false,
|
|
24069
|
-
/*decorators*/
|
|
24070
|
-
void 0,
|
|
24071
24029
|
/*modifiers*/
|
|
24072
24030
|
void 0,
|
|
24073
24031
|
4 /* NestedNamespace */ | namespaceFlag
|
|
24074
24032
|
) : parseModuleBlock();
|
|
24075
24033
|
const node = factory2.createModuleDeclaration(modifiers, name, body, flags);
|
|
24076
|
-
node.illegalDecorators = decorators;
|
|
24077
24034
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24078
24035
|
}
|
|
24079
|
-
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc,
|
|
24036
|
+
function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) {
|
|
24080
24037
|
let flags = 0;
|
|
24081
24038
|
let name;
|
|
24082
24039
|
if (token() === 159 /* GlobalKeyword */) {
|
|
@@ -24092,23 +24049,22 @@ var Parser;
|
|
|
24092
24049
|
} else {
|
|
24093
24050
|
parseSemicolon();
|
|
24094
24051
|
}
|
|
24095
|
-
const node = factory2.createModuleDeclaration(
|
|
24096
|
-
node.illegalDecorators = decorators;
|
|
24052
|
+
const node = factory2.createModuleDeclaration(modifiersIn, name, body, flags);
|
|
24097
24053
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24098
24054
|
}
|
|
24099
|
-
function parseModuleDeclaration(pos, hasJSDoc,
|
|
24055
|
+
function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) {
|
|
24100
24056
|
let flags = 0;
|
|
24101
24057
|
if (token() === 159 /* GlobalKeyword */) {
|
|
24102
|
-
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc,
|
|
24058
|
+
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn);
|
|
24103
24059
|
} else if (parseOptional(143 /* NamespaceKeyword */)) {
|
|
24104
24060
|
flags |= 16 /* Namespace */;
|
|
24105
24061
|
} else {
|
|
24106
24062
|
parseExpected(142 /* ModuleKeyword */);
|
|
24107
24063
|
if (token() === 10 /* StringLiteral */) {
|
|
24108
|
-
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc,
|
|
24064
|
+
return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn);
|
|
24109
24065
|
}
|
|
24110
24066
|
}
|
|
24111
|
-
return parseModuleOrNamespaceDeclaration(pos, hasJSDoc,
|
|
24067
|
+
return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags);
|
|
24112
24068
|
}
|
|
24113
24069
|
function isExternalModuleReference2() {
|
|
24114
24070
|
return token() === 147 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen);
|
|
@@ -24122,17 +24078,16 @@ var Parser;
|
|
|
24122
24078
|
function nextTokenIsSlash() {
|
|
24123
24079
|
return nextToken() === 43 /* SlashToken */;
|
|
24124
24080
|
}
|
|
24125
|
-
function parseNamespaceExportDeclaration(pos, hasJSDoc,
|
|
24081
|
+
function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) {
|
|
24126
24082
|
parseExpected(128 /* AsKeyword */);
|
|
24127
24083
|
parseExpected(143 /* NamespaceKeyword */);
|
|
24128
24084
|
const name = parseIdentifier();
|
|
24129
24085
|
parseSemicolon();
|
|
24130
24086
|
const node = factory2.createNamespaceExportDeclaration(name);
|
|
24131
|
-
node.illegalDecorators = decorators;
|
|
24132
24087
|
node.modifiers = modifiers;
|
|
24133
24088
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24134
24089
|
}
|
|
24135
|
-
function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc,
|
|
24090
|
+
function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) {
|
|
24136
24091
|
parseExpected(100 /* ImportKeyword */);
|
|
24137
24092
|
const afterImportPos = scanner.getStartPos();
|
|
24138
24093
|
let identifier;
|
|
@@ -24145,7 +24100,7 @@ var Parser;
|
|
|
24145
24100
|
identifier = isIdentifier2() ? parseIdentifier() : void 0;
|
|
24146
24101
|
}
|
|
24147
24102
|
if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration()) {
|
|
24148
|
-
return parseImportEqualsDeclaration(pos, hasJSDoc,
|
|
24103
|
+
return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly);
|
|
24149
24104
|
}
|
|
24150
24105
|
let importClause;
|
|
24151
24106
|
if (identifier || // import id
|
|
@@ -24161,7 +24116,6 @@ var Parser;
|
|
|
24161
24116
|
}
|
|
24162
24117
|
parseSemicolon();
|
|
24163
24118
|
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause);
|
|
24164
|
-
node.illegalDecorators = decorators;
|
|
24165
24119
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24166
24120
|
}
|
|
24167
24121
|
function parseAssertEntry() {
|
|
@@ -24220,12 +24174,11 @@ var Parser;
|
|
|
24220
24174
|
function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() {
|
|
24221
24175
|
return token() === 27 /* CommaToken */ || token() === 158 /* FromKeyword */;
|
|
24222
24176
|
}
|
|
24223
|
-
function parseImportEqualsDeclaration(pos, hasJSDoc,
|
|
24177
|
+
function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) {
|
|
24224
24178
|
parseExpected(63 /* EqualsToken */);
|
|
24225
24179
|
const moduleReference = parseModuleReference();
|
|
24226
24180
|
parseSemicolon();
|
|
24227
24181
|
const node = factory2.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference);
|
|
24228
|
-
node.illegalDecorators = decorators;
|
|
24229
24182
|
const finished = withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24230
24183
|
return finished;
|
|
24231
24184
|
}
|
|
@@ -24335,7 +24288,7 @@ var Parser;
|
|
|
24335
24288
|
function parseNamespaceExport(pos) {
|
|
24336
24289
|
return finishNode(factory2.createNamespaceExport(parseIdentifierName()), pos);
|
|
24337
24290
|
}
|
|
24338
|
-
function parseExportDeclaration(pos, hasJSDoc,
|
|
24291
|
+
function parseExportDeclaration(pos, hasJSDoc, modifiers) {
|
|
24339
24292
|
const savedAwaitContext = inAwaitContext();
|
|
24340
24293
|
setAwaitContext(
|
|
24341
24294
|
/*value*/
|
|
@@ -24365,10 +24318,9 @@ var Parser;
|
|
|
24365
24318
|
parseSemicolon();
|
|
24366
24319
|
setAwaitContext(savedAwaitContext);
|
|
24367
24320
|
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
|
|
24368
|
-
node.illegalDecorators = decorators;
|
|
24369
24321
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24370
24322
|
}
|
|
24371
|
-
function parseExportAssignment(pos, hasJSDoc,
|
|
24323
|
+
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
24372
24324
|
const savedAwaitContext = inAwaitContext();
|
|
24373
24325
|
setAwaitContext(
|
|
24374
24326
|
/*value*/
|
|
@@ -24387,7 +24339,6 @@ var Parser;
|
|
|
24387
24339
|
parseSemicolon();
|
|
24388
24340
|
setAwaitContext(savedAwaitContext);
|
|
24389
24341
|
const node = factory2.createExportAssignment(modifiers, isExportEquals, expression);
|
|
24390
|
-
node.illegalDecorators = decorators;
|
|
24391
24342
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
24392
24343
|
}
|
|
24393
24344
|
let ParsingContext;
|
|
@@ -26082,7 +26033,9 @@ var libEntries = [
|
|
|
26082
26033
|
["esnext.bigint", "lib.es2020.bigint.d.ts"],
|
|
26083
26034
|
["esnext.string", "lib.es2022.string.d.ts"],
|
|
26084
26035
|
["esnext.promise", "lib.es2021.promise.d.ts"],
|
|
26085
|
-
["esnext.weakref", "lib.es2021.weakref.d.ts"]
|
|
26036
|
+
["esnext.weakref", "lib.es2021.weakref.d.ts"],
|
|
26037
|
+
["decorators", "lib.decorators.d.ts"],
|
|
26038
|
+
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
26086
26039
|
];
|
|
26087
26040
|
var libs = libEntries.map((entry) => entry[0]);
|
|
26088
26041
|
var libMap = new Map(libEntries);
|
|
@@ -26625,6 +26578,13 @@ var commandOptionsWithoutBuild = [
|
|
|
26625
26578
|
transpileOptionValue: true,
|
|
26626
26579
|
defaultValueDescription: false
|
|
26627
26580
|
},
|
|
26581
|
+
{
|
|
26582
|
+
name: "verbatimModuleSyntax",
|
|
26583
|
+
type: "boolean",
|
|
26584
|
+
category: Diagnostics.Interop_Constraints,
|
|
26585
|
+
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,
|
|
26586
|
+
defaultValueDescription: false
|
|
26587
|
+
},
|
|
26628
26588
|
// Strict Type Checks
|
|
26629
26589
|
{
|
|
26630
26590
|
name: "strict",
|
|
@@ -26990,10 +26950,11 @@ var commandOptionsWithoutBuild = [
|
|
|
26990
26950
|
{
|
|
26991
26951
|
name: "experimentalDecorators",
|
|
26992
26952
|
type: "boolean",
|
|
26953
|
+
affectsEmit: true,
|
|
26993
26954
|
affectsSemanticDiagnostics: true,
|
|
26994
26955
|
affectsBuildInfo: true,
|
|
26995
26956
|
category: Diagnostics.Language_and_Environment,
|
|
26996
|
-
description: Diagnostics.
|
|
26957
|
+
description: Diagnostics.Enable_experimental_support_for_legacy_experimental_decorators,
|
|
26997
26958
|
defaultValueDescription: false
|
|
26998
26959
|
},
|
|
26999
26960
|
{
|
|
@@ -27107,7 +27068,7 @@ var commandOptionsWithoutBuild = [
|
|
|
27107
27068
|
paramType: Diagnostics.NEWLINE,
|
|
27108
27069
|
category: Diagnostics.Emit,
|
|
27109
27070
|
description: Diagnostics.Set_the_newline_character_for_emitting_files,
|
|
27110
|
-
defaultValueDescription:
|
|
27071
|
+
defaultValueDescription: "lf"
|
|
27111
27072
|
},
|
|
27112
27073
|
{
|
|
27113
27074
|
name: "noErrorTruncation",
|
|
@@ -27283,7 +27244,7 @@ var commandOptionsWithoutBuild = [
|
|
|
27283
27244
|
affectsModuleResolution: true,
|
|
27284
27245
|
category: Diagnostics.Interop_Constraints,
|
|
27285
27246
|
description: Diagnostics.Ensure_that_casing_is_correct_in_imports,
|
|
27286
|
-
defaultValueDescription:
|
|
27247
|
+
defaultValueDescription: true
|
|
27287
27248
|
},
|
|
27288
27249
|
{
|
|
27289
27250
|
name: "maxNodeModuleJsDepth",
|
|
@@ -27407,14 +27368,6 @@ var buildOpts = [
|
|
|
27407
27368
|
...optionsForBuild
|
|
27408
27369
|
];
|
|
27409
27370
|
var typeAcquisitionDeclarations = [
|
|
27410
|
-
{
|
|
27411
|
-
/* @deprecated typingOptions.enableAutoDiscovery
|
|
27412
|
-
* Use typeAcquisition.enable instead.
|
|
27413
|
-
*/
|
|
27414
|
-
name: "enableAutoDiscovery",
|
|
27415
|
-
type: "boolean",
|
|
27416
|
-
defaultValueDescription: false
|
|
27417
|
-
},
|
|
27418
27371
|
{
|
|
27419
27372
|
name: "enable",
|
|
27420
27373
|
type: "boolean",
|
|
@@ -27596,12 +27549,6 @@ function getTsconfigRootOptionsMap() {
|
|
|
27596
27549
|
elementOptions: getCommandLineWatchOptionsMap(),
|
|
27597
27550
|
extraKeyDiagnostics: watchOptionsDidYouMeanDiagnostics
|
|
27598
27551
|
},
|
|
27599
|
-
{
|
|
27600
|
-
name: "typingOptions",
|
|
27601
|
-
type: "object",
|
|
27602
|
-
elementOptions: getCommandLineTypeAcquisitionMap(),
|
|
27603
|
-
extraKeyDiagnostics: typeAcquisitionDidYouMeanDiagnostics
|
|
27604
|
-
},
|
|
27605
27552
|
{
|
|
27606
27553
|
name: "typeAcquisition",
|
|
27607
27554
|
type: "object",
|
|
@@ -31286,6 +31233,9 @@ function createBinder() {
|
|
|
31286
31233
|
function checkContextualIdentifier(node) {
|
|
31287
31234
|
if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
|
|
31288
31235
|
const originalKeywordKind = identifierToKeywordKind(node);
|
|
31236
|
+
if (originalKeywordKind === void 0) {
|
|
31237
|
+
return;
|
|
31238
|
+
}
|
|
31289
31239
|
if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
|
|
31290
31240
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
31291
31241
|
node,
|
|
@@ -32947,7 +32897,7 @@ var visitEachChildTable = {
|
|
|
32947
32897
|
[173 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
32948
32898
|
return context.factory.updateConstructorDeclaration(
|
|
32949
32899
|
node,
|
|
32950
|
-
nodesVisitor(node.modifiers, visitor,
|
|
32900
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
32951
32901
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
32952
32902
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
32953
32903
|
);
|
|
@@ -32998,7 +32948,7 @@ var visitEachChildTable = {
|
|
|
32998
32948
|
[178 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
32999
32949
|
return context.factory.updateIndexSignature(
|
|
33000
32950
|
node,
|
|
33001
|
-
nodesVisitor(node.modifiers, visitor,
|
|
32951
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33002
32952
|
nodesVisitor(node.parameters, visitor, isParameter),
|
|
33003
32953
|
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
33004
32954
|
);
|
|
@@ -33439,7 +33389,7 @@ var visitEachChildTable = {
|
|
|
33439
33389
|
[240 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33440
33390
|
return context.factory.updateVariableStatement(
|
|
33441
33391
|
node,
|
|
33442
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33392
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33443
33393
|
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
33444
33394
|
);
|
|
33445
33395
|
},
|
|
@@ -33590,7 +33540,7 @@ var visitEachChildTable = {
|
|
|
33590
33540
|
[261 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33591
33541
|
return context.factory.updateInterfaceDeclaration(
|
|
33592
33542
|
node,
|
|
33593
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33543
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33594
33544
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33595
33545
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
33596
33546
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
@@ -33600,7 +33550,7 @@ var visitEachChildTable = {
|
|
|
33600
33550
|
[262 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33601
33551
|
return context.factory.updateTypeAliasDeclaration(
|
|
33602
33552
|
node,
|
|
33603
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33553
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33604
33554
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33605
33555
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
33606
33556
|
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
@@ -33609,7 +33559,7 @@ var visitEachChildTable = {
|
|
|
33609
33559
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33610
33560
|
return context.factory.updateEnumDeclaration(
|
|
33611
33561
|
node,
|
|
33612
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33562
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33613
33563
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33614
33564
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
33615
33565
|
);
|
|
@@ -33617,7 +33567,7 @@ var visitEachChildTable = {
|
|
|
33617
33567
|
[264 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33618
33568
|
return context.factory.updateModuleDeclaration(
|
|
33619
33569
|
node,
|
|
33620
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33570
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33621
33571
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
33622
33572
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
33623
33573
|
);
|
|
@@ -33643,7 +33593,7 @@ var visitEachChildTable = {
|
|
|
33643
33593
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33644
33594
|
return context.factory.updateImportEqualsDeclaration(
|
|
33645
33595
|
node,
|
|
33646
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33596
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33647
33597
|
node.isTypeOnly,
|
|
33648
33598
|
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
33649
33599
|
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
@@ -33652,7 +33602,7 @@ var visitEachChildTable = {
|
|
|
33652
33602
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33653
33603
|
return context.factory.updateImportDeclaration(
|
|
33654
33604
|
node,
|
|
33655
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33605
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33656
33606
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
33657
33607
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
33658
33608
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
@@ -33709,14 +33659,14 @@ var visitEachChildTable = {
|
|
|
33709
33659
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33710
33660
|
return context.factory.updateExportAssignment(
|
|
33711
33661
|
node,
|
|
33712
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33662
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33713
33663
|
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
33714
33664
|
);
|
|
33715
33665
|
},
|
|
33716
33666
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
33717
33667
|
return context.factory.updateExportDeclaration(
|
|
33718
33668
|
node,
|
|
33719
|
-
nodesVisitor(node.modifiers, visitor,
|
|
33669
|
+
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
33720
33670
|
node.isTypeOnly,
|
|
33721
33671
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
33722
33672
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|