@typescript-deploys/pr-build 5.0.0-pr-51682-13 → 5.0.0-pr-51669-12
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.es2021.intl.d.ts +15 -0
- package/lib/tsc.js +1344 -1647
- package/lib/tsserver.js +1543 -1771
- package/lib/tsserverlibrary.d.ts +82 -72
- package/lib/tsserverlibrary.js +1534 -1768
- package/lib/typescript.d.ts +81 -72
- package/lib/typescript.js +1510 -1759
- package/lib/typingsInstaller.js +799 -1081
- package/package.json +3 -2
package/lib/typingsInstaller.js
CHANGED
|
@@ -50,7 +50,7 @@ var path = __toESM(require("path"));
|
|
|
50
50
|
|
|
51
51
|
// src/compiler/corePublic.ts
|
|
52
52
|
var versionMajorMinor = "5.0";
|
|
53
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
53
|
+
var version = `${versionMajorMinor}.0-insiders.20221213`;
|
|
54
54
|
|
|
55
55
|
// src/compiler/core.ts
|
|
56
56
|
var emptyArray = [];
|
|
@@ -3197,6 +3197,7 @@ var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
|
|
|
3197
3197
|
ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs";
|
|
3198
3198
|
ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16";
|
|
3199
3199
|
ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext";
|
|
3200
|
+
ModuleResolutionKind2[ModuleResolutionKind2["Hybrid"] = 100] = "Hybrid";
|
|
3200
3201
|
return ModuleResolutionKind2;
|
|
3201
3202
|
})(ModuleResolutionKind || {});
|
|
3202
3203
|
var TransformFlags = /* @__PURE__ */ ((TransformFlags3) => {
|
|
@@ -5908,6 +5909,7 @@ var Diagnostics = {
|
|
|
5908
5909
|
We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
|
|
5909
5910
|
Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
5910
5911
|
This_condition_will_always_return_0: diag(2845, 1 /* Error */, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."),
|
|
5912
|
+
A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),
|
|
5911
5913
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
5912
5914
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
5913
5915
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -6072,6 +6074,11 @@ var Diagnostics = {
|
|
|
6072
6074
|
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'."),
|
|
6073
6075
|
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'."),
|
|
6074
6076
|
Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."),
|
|
6077
|
+
Option_allowImportingTsExtensions_can_only_be_used_when_moduleResolution_is_set_to_hybrid_and_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_moduleResolution_is_set_to_hybrid_and_either_5096", "Option 'allowImportingTsExtensions' can only be used when 'moduleResolution' is set to 'hybrid' and either 'noEmit' or 'emitDeclarationOnly' is set."),
|
|
6078
|
+
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
|
6079
|
+
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_hybrid: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_hybrid_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'hybrid'."),
|
|
6080
|
+
Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_hybrid_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_hybrid_Consider_using_import_Asteri_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'hybrid'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
|
|
6081
|
+
Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_hybrid_Consider_using_export_default_or_another_module_format_instead: diag(5100, 1 /* Error */, "Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_hybrid_Consider_using_export_defaul_5100", "Export assignment cannot be used when 'moduleResolution' is set to 'hybrid'. Consider using 'export default' or another module format instead."),
|
|
6075
6082
|
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."),
|
|
6076
6083
|
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."),
|
|
6077
6084
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -6127,7 +6134,6 @@ var Diagnostics = {
|
|
|
6127
6134
|
Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, 1 /* Error */, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),
|
|
6128
6135
|
Enables_experimental_support_for_ES7_decorators: diag(6065, 3 /* Message */, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."),
|
|
6129
6136
|
Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, 3 /* Message */, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."),
|
|
6130
|
-
Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, 3 /* Message */, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),
|
|
6131
6137
|
Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, 3 /* Message */, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."),
|
|
6132
6138
|
Successfully_created_a_tsconfig_json_file: diag(6071, 3 /* Message */, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."),
|
|
6133
6139
|
Suppress_excess_property_checks_for_object_literals: diag(6072, 3 /* Message */, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."),
|
|
@@ -6371,6 +6377,11 @@ var Diagnostics = {
|
|
|
6371
6377
|
Using_0_subpath_1_with_target_2: diag(6404, 3 /* Message */, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."),
|
|
6372
6378
|
Saw_non_matching_condition_0: diag(6405, 3 /* Message */, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."),
|
|
6373
6379
|
Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),
|
|
6380
|
+
Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_hybrid_and_either_noEmit_or_emitDeclarationOnly_to_be_set: diag(6407, 3 /* Message */, "Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_hybrid_and_either_noEm_6407", "Allow imports to include TypeScript file extensions. Requires '--moduleResolution hybrid' and either '--noEmit' or '--emitDeclarationOnly' to be set."),
|
|
6381
|
+
Use_the_package_json_exports_field_when_resolving_package_imports: diag(6408, 3 /* Message */, "Use_the_package_json_exports_field_when_resolving_package_imports_6408", "Use the package.json 'exports' field when resolving package imports."),
|
|
6382
|
+
Use_the_package_json_imports_field_when_resolving_imports: diag(6409, 3 /* Message */, "Use_the_package_json_imports_field_when_resolving_imports_6409", "Use the package.json 'imports' field when resolving imports."),
|
|
6383
|
+
Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: diag(6410, 3 /* Message */, "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", "Conditions to set in addition to the resolver-specific defaults when resolving imports."),
|
|
6384
|
+
true_when_moduleResolution_is_node16_nodenext_or_hybrid_otherwise_false: diag(6411, 3 /* Message */, "true_when_moduleResolution_is_node16_nodenext_or_hybrid_otherwise_false_6411", "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'hybrid'; otherwise `false`."),
|
|
6374
6385
|
The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
|
|
6375
6386
|
The_expected_type_comes_from_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
|
|
6376
6387
|
The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
|
|
@@ -9165,8 +9176,6 @@ function getJSDocTypeTag(node) {
|
|
|
9165
9176
|
return void 0;
|
|
9166
9177
|
}
|
|
9167
9178
|
function getJSDocTagsWorker(node, noCache) {
|
|
9168
|
-
if (!canHaveJSDoc(node))
|
|
9169
|
-
return emptyArray;
|
|
9170
9179
|
let tags = node.jsDocCache;
|
|
9171
9180
|
if (tags === void 0 || noCache) {
|
|
9172
9181
|
const comments = getJSDocCommentsAndTags(node, noCache);
|
|
@@ -9499,114 +9508,6 @@ function isNamedImportBindings(node) {
|
|
|
9499
9508
|
const kind = node.kind;
|
|
9500
9509
|
return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */;
|
|
9501
9510
|
}
|
|
9502
|
-
function canHaveSymbol(node) {
|
|
9503
|
-
switch (node.kind) {
|
|
9504
|
-
case 216 /* ArrowFunction */:
|
|
9505
|
-
case 223 /* BinaryExpression */:
|
|
9506
|
-
case 205 /* BindingElement */:
|
|
9507
|
-
case 210 /* CallExpression */:
|
|
9508
|
-
case 176 /* CallSignature */:
|
|
9509
|
-
case 260 /* ClassDeclaration */:
|
|
9510
|
-
case 228 /* ClassExpression */:
|
|
9511
|
-
case 172 /* ClassStaticBlockDeclaration */:
|
|
9512
|
-
case 173 /* Constructor */:
|
|
9513
|
-
case 182 /* ConstructorType */:
|
|
9514
|
-
case 177 /* ConstructSignature */:
|
|
9515
|
-
case 209 /* ElementAccessExpression */:
|
|
9516
|
-
case 263 /* EnumDeclaration */:
|
|
9517
|
-
case 302 /* EnumMember */:
|
|
9518
|
-
case 274 /* ExportAssignment */:
|
|
9519
|
-
case 275 /* ExportDeclaration */:
|
|
9520
|
-
case 278 /* ExportSpecifier */:
|
|
9521
|
-
case 259 /* FunctionDeclaration */:
|
|
9522
|
-
case 215 /* FunctionExpression */:
|
|
9523
|
-
case 181 /* FunctionType */:
|
|
9524
|
-
case 174 /* GetAccessor */:
|
|
9525
|
-
case 79 /* Identifier */:
|
|
9526
|
-
case 270 /* ImportClause */:
|
|
9527
|
-
case 268 /* ImportEqualsDeclaration */:
|
|
9528
|
-
case 273 /* ImportSpecifier */:
|
|
9529
|
-
case 178 /* IndexSignature */:
|
|
9530
|
-
case 261 /* InterfaceDeclaration */:
|
|
9531
|
-
case 341 /* JSDocCallbackTag */:
|
|
9532
|
-
case 342 /* JSDocEnumTag */:
|
|
9533
|
-
case 320 /* JSDocFunctionType */:
|
|
9534
|
-
case 343 /* JSDocParameterTag */:
|
|
9535
|
-
case 350 /* JSDocPropertyTag */:
|
|
9536
|
-
case 326 /* JSDocSignature */:
|
|
9537
|
-
case 348 /* JSDocTypedefTag */:
|
|
9538
|
-
case 325 /* JSDocTypeLiteral */:
|
|
9539
|
-
case 288 /* JsxAttribute */:
|
|
9540
|
-
case 289 /* JsxAttributes */:
|
|
9541
|
-
case 290 /* JsxSpreadAttribute */:
|
|
9542
|
-
case 197 /* MappedType */:
|
|
9543
|
-
case 171 /* MethodDeclaration */:
|
|
9544
|
-
case 170 /* MethodSignature */:
|
|
9545
|
-
case 264 /* ModuleDeclaration */:
|
|
9546
|
-
case 199 /* NamedTupleMember */:
|
|
9547
|
-
case 277 /* NamespaceExport */:
|
|
9548
|
-
case 267 /* NamespaceExportDeclaration */:
|
|
9549
|
-
case 271 /* NamespaceImport */:
|
|
9550
|
-
case 211 /* NewExpression */:
|
|
9551
|
-
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
9552
|
-
case 8 /* NumericLiteral */:
|
|
9553
|
-
case 207 /* ObjectLiteralExpression */:
|
|
9554
|
-
case 166 /* Parameter */:
|
|
9555
|
-
case 208 /* PropertyAccessExpression */:
|
|
9556
|
-
case 299 /* PropertyAssignment */:
|
|
9557
|
-
case 169 /* PropertyDeclaration */:
|
|
9558
|
-
case 168 /* PropertySignature */:
|
|
9559
|
-
case 175 /* SetAccessor */:
|
|
9560
|
-
case 300 /* ShorthandPropertyAssignment */:
|
|
9561
|
-
case 308 /* SourceFile */:
|
|
9562
|
-
case 301 /* SpreadAssignment */:
|
|
9563
|
-
case 10 /* StringLiteral */:
|
|
9564
|
-
case 262 /* TypeAliasDeclaration */:
|
|
9565
|
-
case 184 /* TypeLiteral */:
|
|
9566
|
-
case 165 /* TypeParameter */:
|
|
9567
|
-
case 257 /* VariableDeclaration */:
|
|
9568
|
-
return true;
|
|
9569
|
-
default:
|
|
9570
|
-
return false;
|
|
9571
|
-
}
|
|
9572
|
-
}
|
|
9573
|
-
function canHaveLocals(node) {
|
|
9574
|
-
switch (node.kind) {
|
|
9575
|
-
case 216 /* ArrowFunction */:
|
|
9576
|
-
case 238 /* Block */:
|
|
9577
|
-
case 176 /* CallSignature */:
|
|
9578
|
-
case 266 /* CaseBlock */:
|
|
9579
|
-
case 295 /* CatchClause */:
|
|
9580
|
-
case 172 /* ClassStaticBlockDeclaration */:
|
|
9581
|
-
case 191 /* ConditionalType */:
|
|
9582
|
-
case 173 /* Constructor */:
|
|
9583
|
-
case 182 /* ConstructorType */:
|
|
9584
|
-
case 177 /* ConstructSignature */:
|
|
9585
|
-
case 245 /* ForStatement */:
|
|
9586
|
-
case 246 /* ForInStatement */:
|
|
9587
|
-
case 247 /* ForOfStatement */:
|
|
9588
|
-
case 259 /* FunctionDeclaration */:
|
|
9589
|
-
case 215 /* FunctionExpression */:
|
|
9590
|
-
case 181 /* FunctionType */:
|
|
9591
|
-
case 174 /* GetAccessor */:
|
|
9592
|
-
case 178 /* IndexSignature */:
|
|
9593
|
-
case 341 /* JSDocCallbackTag */:
|
|
9594
|
-
case 342 /* JSDocEnumTag */:
|
|
9595
|
-
case 320 /* JSDocFunctionType */:
|
|
9596
|
-
case 326 /* JSDocSignature */:
|
|
9597
|
-
case 348 /* JSDocTypedefTag */:
|
|
9598
|
-
case 197 /* MappedType */:
|
|
9599
|
-
case 171 /* MethodDeclaration */:
|
|
9600
|
-
case 170 /* MethodSignature */:
|
|
9601
|
-
case 264 /* ModuleDeclaration */:
|
|
9602
|
-
case 175 /* SetAccessor */:
|
|
9603
|
-
case 308 /* SourceFile */:
|
|
9604
|
-
case 262 /* TypeAliasDeclaration */:
|
|
9605
|
-
return true;
|
|
9606
|
-
default:
|
|
9607
|
-
return false;
|
|
9608
|
-
}
|
|
9609
|
-
}
|
|
9610
9511
|
function isDeclarationKind(kind) {
|
|
9611
9512
|
return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 348 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 350 /* JSDocPropertyTag */;
|
|
9612
9513
|
}
|
|
@@ -9674,8 +9575,6 @@ function isJSDocNode(node) {
|
|
|
9674
9575
|
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 350 /* LastJSDocNode */;
|
|
9675
9576
|
}
|
|
9676
9577
|
function hasJSDocNodes(node) {
|
|
9677
|
-
if (!canHaveJSDoc(node))
|
|
9678
|
-
return false;
|
|
9679
9578
|
const { jsDoc } = node;
|
|
9680
9579
|
return !!jsDoc && jsDoc.length > 0;
|
|
9681
9580
|
}
|
|
@@ -9725,7 +9624,11 @@ function createSingleLineStringWriter() {
|
|
|
9725
9624
|
writeLine: () => str += " ",
|
|
9726
9625
|
increaseIndent: noop,
|
|
9727
9626
|
decreaseIndent: noop,
|
|
9728
|
-
clear: () => str = ""
|
|
9627
|
+
clear: () => str = "",
|
|
9628
|
+
trackSymbol: () => false,
|
|
9629
|
+
reportInaccessibleThisError: noop,
|
|
9630
|
+
reportInaccessibleUniqueSymbolError: noop,
|
|
9631
|
+
reportPrivateInBaseOfClassExpression: noop
|
|
9729
9632
|
};
|
|
9730
9633
|
}
|
|
9731
9634
|
function copyEntries(source, target) {
|
|
@@ -10048,7 +9951,7 @@ function isObjectLiteralOrClassExpressionMethodOrAccessor(node) {
|
|
|
10048
9951
|
function getContainingClass(node) {
|
|
10049
9952
|
return findAncestor(node.parent, isClassLike);
|
|
10050
9953
|
}
|
|
10051
|
-
function getThisContainer(node, includeArrowFunctions
|
|
9954
|
+
function getThisContainer(node, includeArrowFunctions) {
|
|
10052
9955
|
Debug.assert(node.kind !== 308 /* SourceFile */);
|
|
10053
9956
|
while (true) {
|
|
10054
9957
|
node = node.parent;
|
|
@@ -10057,10 +9960,10 @@ function getThisContainer(node, includeArrowFunctions, includeClassComputedPrope
|
|
|
10057
9960
|
}
|
|
10058
9961
|
switch (node.kind) {
|
|
10059
9962
|
case 164 /* ComputedPropertyName */:
|
|
10060
|
-
if (
|
|
9963
|
+
if (isClassLike(node.parent.parent)) {
|
|
10061
9964
|
return node;
|
|
10062
9965
|
}
|
|
10063
|
-
node = node.parent
|
|
9966
|
+
node = node.parent;
|
|
10064
9967
|
break;
|
|
10065
9968
|
case 167 /* Decorator */:
|
|
10066
9969
|
if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) {
|
|
@@ -10097,7 +10000,7 @@ function isInTopLevelContext(node) {
|
|
|
10097
10000
|
if (isIdentifier(node) && (isClassDeclaration(node.parent) || isFunctionDeclaration(node.parent)) && node.parent.name === node) {
|
|
10098
10001
|
node = node.parent;
|
|
10099
10002
|
}
|
|
10100
|
-
const container = getThisContainer(node, true
|
|
10003
|
+
const container = getThisContainer(node, true);
|
|
10101
10004
|
return isSourceFile(container);
|
|
10102
10005
|
}
|
|
10103
10006
|
function getImmediatelyInvokedFunctionExpression(func) {
|
|
@@ -10370,78 +10273,6 @@ function getSingleVariableOfVariableStatement(node) {
|
|
|
10370
10273
|
function getNestedModuleDeclaration(node) {
|
|
10371
10274
|
return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0;
|
|
10372
10275
|
}
|
|
10373
|
-
function canHaveJSDoc(node) {
|
|
10374
|
-
switch (node.kind) {
|
|
10375
|
-
case 216 /* ArrowFunction */:
|
|
10376
|
-
case 223 /* BinaryExpression */:
|
|
10377
|
-
case 238 /* Block */:
|
|
10378
|
-
case 249 /* BreakStatement */:
|
|
10379
|
-
case 176 /* CallSignature */:
|
|
10380
|
-
case 292 /* CaseClause */:
|
|
10381
|
-
case 260 /* ClassDeclaration */:
|
|
10382
|
-
case 228 /* ClassExpression */:
|
|
10383
|
-
case 172 /* ClassStaticBlockDeclaration */:
|
|
10384
|
-
case 173 /* Constructor */:
|
|
10385
|
-
case 182 /* ConstructorType */:
|
|
10386
|
-
case 177 /* ConstructSignature */:
|
|
10387
|
-
case 248 /* ContinueStatement */:
|
|
10388
|
-
case 256 /* DebuggerStatement */:
|
|
10389
|
-
case 243 /* DoStatement */:
|
|
10390
|
-
case 209 /* ElementAccessExpression */:
|
|
10391
|
-
case 239 /* EmptyStatement */:
|
|
10392
|
-
case 1 /* EndOfFileToken */:
|
|
10393
|
-
case 263 /* EnumDeclaration */:
|
|
10394
|
-
case 302 /* EnumMember */:
|
|
10395
|
-
case 274 /* ExportAssignment */:
|
|
10396
|
-
case 275 /* ExportDeclaration */:
|
|
10397
|
-
case 278 /* ExportSpecifier */:
|
|
10398
|
-
case 241 /* ExpressionStatement */:
|
|
10399
|
-
case 246 /* ForInStatement */:
|
|
10400
|
-
case 247 /* ForOfStatement */:
|
|
10401
|
-
case 245 /* ForStatement */:
|
|
10402
|
-
case 259 /* FunctionDeclaration */:
|
|
10403
|
-
case 215 /* FunctionExpression */:
|
|
10404
|
-
case 181 /* FunctionType */:
|
|
10405
|
-
case 174 /* GetAccessor */:
|
|
10406
|
-
case 79 /* Identifier */:
|
|
10407
|
-
case 242 /* IfStatement */:
|
|
10408
|
-
case 269 /* ImportDeclaration */:
|
|
10409
|
-
case 268 /* ImportEqualsDeclaration */:
|
|
10410
|
-
case 178 /* IndexSignature */:
|
|
10411
|
-
case 261 /* InterfaceDeclaration */:
|
|
10412
|
-
case 320 /* JSDocFunctionType */:
|
|
10413
|
-
case 326 /* JSDocSignature */:
|
|
10414
|
-
case 253 /* LabeledStatement */:
|
|
10415
|
-
case 171 /* MethodDeclaration */:
|
|
10416
|
-
case 170 /* MethodSignature */:
|
|
10417
|
-
case 264 /* ModuleDeclaration */:
|
|
10418
|
-
case 199 /* NamedTupleMember */:
|
|
10419
|
-
case 267 /* NamespaceExportDeclaration */:
|
|
10420
|
-
case 207 /* ObjectLiteralExpression */:
|
|
10421
|
-
case 166 /* Parameter */:
|
|
10422
|
-
case 214 /* ParenthesizedExpression */:
|
|
10423
|
-
case 208 /* PropertyAccessExpression */:
|
|
10424
|
-
case 299 /* PropertyAssignment */:
|
|
10425
|
-
case 169 /* PropertyDeclaration */:
|
|
10426
|
-
case 168 /* PropertySignature */:
|
|
10427
|
-
case 250 /* ReturnStatement */:
|
|
10428
|
-
case 175 /* SetAccessor */:
|
|
10429
|
-
case 300 /* ShorthandPropertyAssignment */:
|
|
10430
|
-
case 301 /* SpreadAssignment */:
|
|
10431
|
-
case 252 /* SwitchStatement */:
|
|
10432
|
-
case 254 /* ThrowStatement */:
|
|
10433
|
-
case 255 /* TryStatement */:
|
|
10434
|
-
case 262 /* TypeAliasDeclaration */:
|
|
10435
|
-
case 165 /* TypeParameter */:
|
|
10436
|
-
case 257 /* VariableDeclaration */:
|
|
10437
|
-
case 240 /* VariableStatement */:
|
|
10438
|
-
case 244 /* WhileStatement */:
|
|
10439
|
-
case 251 /* WithStatement */:
|
|
10440
|
-
return true;
|
|
10441
|
-
default:
|
|
10442
|
-
return false;
|
|
10443
|
-
}
|
|
10444
|
-
}
|
|
10445
10276
|
function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
10446
10277
|
let result;
|
|
10447
10278
|
if (isVariableLike(hostNode) && hasInitializer(hostNode) && hasJSDocNodes(hostNode.initializer)) {
|
|
@@ -11171,7 +11002,6 @@ function Node4(kind, pos, end) {
|
|
|
11171
11002
|
this.transformFlags = 0 /* None */;
|
|
11172
11003
|
this.parent = void 0;
|
|
11173
11004
|
this.original = void 0;
|
|
11174
|
-
this.emitNode = void 0;
|
|
11175
11005
|
}
|
|
11176
11006
|
function Token(kind, pos, end) {
|
|
11177
11007
|
this.pos = pos;
|
|
@@ -11181,7 +11011,6 @@ function Token(kind, pos, end) {
|
|
|
11181
11011
|
this.flags = 0 /* None */;
|
|
11182
11012
|
this.transformFlags = 0 /* None */;
|
|
11183
11013
|
this.parent = void 0;
|
|
11184
|
-
this.emitNode = void 0;
|
|
11185
11014
|
}
|
|
11186
11015
|
function Identifier2(kind, pos, end) {
|
|
11187
11016
|
this.pos = pos;
|
|
@@ -11192,7 +11021,6 @@ function Identifier2(kind, pos, end) {
|
|
|
11192
11021
|
this.transformFlags = 0 /* None */;
|
|
11193
11022
|
this.parent = void 0;
|
|
11194
11023
|
this.original = void 0;
|
|
11195
|
-
this.emitNode = void 0;
|
|
11196
11024
|
this.flowNode = void 0;
|
|
11197
11025
|
}
|
|
11198
11026
|
function SourceMapSource(fileName, text, skipTrivia2) {
|
|
@@ -11318,7 +11146,8 @@ function getLanguageVariant(scriptKind) {
|
|
|
11318
11146
|
return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
|
|
11319
11147
|
}
|
|
11320
11148
|
function getEmitScriptTarget(compilerOptions) {
|
|
11321
|
-
|
|
11149
|
+
var _a2;
|
|
11150
|
+
return (_a2 = compilerOptions.target) != null ? _a2 : compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */;
|
|
11322
11151
|
}
|
|
11323
11152
|
function getEmitModuleKind(compilerOptions) {
|
|
11324
11153
|
return typeof compilerOptions.module === "number" ? compilerOptions.module : getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */;
|
|
@@ -11349,6 +11178,12 @@ function unreachableCodeIsError(options) {
|
|
|
11349
11178
|
function unusedLabelIsError(options) {
|
|
11350
11179
|
return options.allowUnusedLabels === false;
|
|
11351
11180
|
}
|
|
11181
|
+
function getResolveJsonModule(compilerOptions) {
|
|
11182
|
+
if (compilerOptions.resolveJsonModule !== void 0) {
|
|
11183
|
+
return compilerOptions.resolveJsonModule;
|
|
11184
|
+
}
|
|
11185
|
+
return getEmitModuleResolutionKind(compilerOptions) === 100 /* Hybrid */;
|
|
11186
|
+
}
|
|
11352
11187
|
function shouldPreserveConstEnums(compilerOptions) {
|
|
11353
11188
|
return !!(compilerOptions.preserveConstEnums || compilerOptions.isolatedModules);
|
|
11354
11189
|
}
|
|
@@ -12636,6 +12471,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12636
12471
|
get updateJSDocThisTag() {
|
|
12637
12472
|
return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocThisTag */);
|
|
12638
12473
|
},
|
|
12474
|
+
get createJSDocEnumTag() {
|
|
12475
|
+
return getJSDocTypeLikeTagCreateFunction(342 /* JSDocEnumTag */);
|
|
12476
|
+
},
|
|
12477
|
+
get updateJSDocEnumTag() {
|
|
12478
|
+
return getJSDocTypeLikeTagUpdateFunction(342 /* JSDocEnumTag */);
|
|
12479
|
+
},
|
|
12639
12480
|
get createJSDocAuthorTag() {
|
|
12640
12481
|
return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */);
|
|
12641
12482
|
},
|
|
@@ -12684,8 +12525,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12684
12525
|
get updateJSDocDeprecatedTag() {
|
|
12685
12526
|
return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */);
|
|
12686
12527
|
},
|
|
12687
|
-
createJSDocEnumTag,
|
|
12688
|
-
updateJSDocEnumTag,
|
|
12689
12528
|
createJSDocUnknownTag,
|
|
12690
12529
|
updateJSDocUnknownTag,
|
|
12691
12530
|
createJSDocText,
|
|
@@ -12732,7 +12571,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12732
12571
|
updateEnumMember,
|
|
12733
12572
|
createSourceFile: createSourceFile2,
|
|
12734
12573
|
updateSourceFile,
|
|
12735
|
-
createRedirectedSourceFile,
|
|
12736
12574
|
createBundle,
|
|
12737
12575
|
updateBundle,
|
|
12738
12576
|
createUnparsedSource,
|
|
@@ -12909,10 +12747,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12909
12747
|
}
|
|
12910
12748
|
const length2 = elements.length;
|
|
12911
12749
|
const array = length2 >= 1 && length2 <= 4 ? elements.slice() : elements;
|
|
12912
|
-
array
|
|
12913
|
-
array.end = -1;
|
|
12750
|
+
setTextRangePosEnd(array, -1, -1);
|
|
12914
12751
|
array.hasTrailingComma = !!hasTrailingComma;
|
|
12915
|
-
array.transformFlags = 0 /* None */;
|
|
12916
12752
|
aggregateChildrenFlags(array);
|
|
12917
12753
|
Debug.attachNodeArrayDebugInfo(array);
|
|
12918
12754
|
return array;
|
|
@@ -12924,6 +12760,61 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12924
12760
|
const node = createBaseNode(kind);
|
|
12925
12761
|
node.symbol = void 0;
|
|
12926
12762
|
node.localSymbol = void 0;
|
|
12763
|
+
node.locals = void 0;
|
|
12764
|
+
node.nextContainer = void 0;
|
|
12765
|
+
return node;
|
|
12766
|
+
}
|
|
12767
|
+
function createBaseNamedDeclaration(kind, modifiers, name) {
|
|
12768
|
+
const node = createBaseDeclaration(kind);
|
|
12769
|
+
name = asName(name);
|
|
12770
|
+
node.name = name;
|
|
12771
|
+
if (canHaveModifiers(node)) {
|
|
12772
|
+
node.modifiers = asNodeArray(modifiers);
|
|
12773
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers);
|
|
12774
|
+
}
|
|
12775
|
+
if (name) {
|
|
12776
|
+
switch (node.kind) {
|
|
12777
|
+
case 171 /* MethodDeclaration */:
|
|
12778
|
+
case 174 /* GetAccessor */:
|
|
12779
|
+
case 175 /* SetAccessor */:
|
|
12780
|
+
case 169 /* PropertyDeclaration */:
|
|
12781
|
+
case 299 /* PropertyAssignment */:
|
|
12782
|
+
if (isIdentifier(name)) {
|
|
12783
|
+
node.transformFlags |= propagateIdentifierNameFlags(name);
|
|
12784
|
+
break;
|
|
12785
|
+
}
|
|
12786
|
+
default:
|
|
12787
|
+
node.transformFlags |= propagateChildFlags(name);
|
|
12788
|
+
break;
|
|
12789
|
+
}
|
|
12790
|
+
}
|
|
12791
|
+
return node;
|
|
12792
|
+
}
|
|
12793
|
+
function createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters) {
|
|
12794
|
+
const node = createBaseNamedDeclaration(
|
|
12795
|
+
kind,
|
|
12796
|
+
modifiers,
|
|
12797
|
+
name
|
|
12798
|
+
);
|
|
12799
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
12800
|
+
node.transformFlags |= propagateChildrenFlags(node.typeParameters);
|
|
12801
|
+
if (typeParameters)
|
|
12802
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12803
|
+
return node;
|
|
12804
|
+
}
|
|
12805
|
+
function createBaseSignatureDeclaration(kind, modifiers, name, typeParameters, parameters, type) {
|
|
12806
|
+
const node = createBaseGenericNamedDeclaration(
|
|
12807
|
+
kind,
|
|
12808
|
+
modifiers,
|
|
12809
|
+
name,
|
|
12810
|
+
typeParameters
|
|
12811
|
+
);
|
|
12812
|
+
node.parameters = createNodeArray(parameters);
|
|
12813
|
+
node.type = type;
|
|
12814
|
+
node.transformFlags |= propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type);
|
|
12815
|
+
if (type)
|
|
12816
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12817
|
+
node.typeArguments = void 0;
|
|
12927
12818
|
return node;
|
|
12928
12819
|
}
|
|
12929
12820
|
function finishUpdateBaseSignatureDeclaration(updated, original) {
|
|
@@ -12932,23 +12823,86 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12932
12823
|
}
|
|
12933
12824
|
return update(updated, original);
|
|
12934
12825
|
}
|
|
12826
|
+
function createBaseFunctionLikeDeclaration(kind, modifiers, name, typeParameters, parameters, type, body) {
|
|
12827
|
+
const node = createBaseSignatureDeclaration(
|
|
12828
|
+
kind,
|
|
12829
|
+
modifiers,
|
|
12830
|
+
name,
|
|
12831
|
+
typeParameters,
|
|
12832
|
+
parameters,
|
|
12833
|
+
type
|
|
12834
|
+
);
|
|
12835
|
+
node.body = body;
|
|
12836
|
+
node.transformFlags |= propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
12837
|
+
if (!body)
|
|
12838
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12839
|
+
return node;
|
|
12840
|
+
}
|
|
12841
|
+
function createBaseInterfaceOrClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses) {
|
|
12842
|
+
const node = createBaseGenericNamedDeclaration(
|
|
12843
|
+
kind,
|
|
12844
|
+
modifiers,
|
|
12845
|
+
name,
|
|
12846
|
+
typeParameters
|
|
12847
|
+
);
|
|
12848
|
+
node.heritageClauses = asNodeArray(heritageClauses);
|
|
12849
|
+
node.transformFlags |= propagateChildrenFlags(node.heritageClauses);
|
|
12850
|
+
return node;
|
|
12851
|
+
}
|
|
12852
|
+
function createBaseClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses, members) {
|
|
12853
|
+
const node = createBaseInterfaceOrClassLikeDeclaration(
|
|
12854
|
+
kind,
|
|
12855
|
+
modifiers,
|
|
12856
|
+
name,
|
|
12857
|
+
typeParameters,
|
|
12858
|
+
heritageClauses
|
|
12859
|
+
);
|
|
12860
|
+
node.members = createNodeArray(members);
|
|
12861
|
+
node.transformFlags |= propagateChildrenFlags(node.members);
|
|
12862
|
+
return node;
|
|
12863
|
+
}
|
|
12864
|
+
function createBaseBindingLikeDeclaration(kind, modifiers, name, initializer) {
|
|
12865
|
+
const node = createBaseNamedDeclaration(
|
|
12866
|
+
kind,
|
|
12867
|
+
modifiers,
|
|
12868
|
+
name
|
|
12869
|
+
);
|
|
12870
|
+
node.initializer = initializer;
|
|
12871
|
+
node.transformFlags |= propagateChildFlags(node.initializer);
|
|
12872
|
+
return node;
|
|
12873
|
+
}
|
|
12874
|
+
function createBaseVariableLikeDeclaration(kind, modifiers, name, type, initializer) {
|
|
12875
|
+
const node = createBaseBindingLikeDeclaration(
|
|
12876
|
+
kind,
|
|
12877
|
+
modifiers,
|
|
12878
|
+
name,
|
|
12879
|
+
initializer
|
|
12880
|
+
);
|
|
12881
|
+
node.type = type;
|
|
12882
|
+
node.transformFlags |= propagateChildFlags(type);
|
|
12883
|
+
if (type)
|
|
12884
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12885
|
+
return node;
|
|
12886
|
+
}
|
|
12887
|
+
function createBaseLiteral(kind, text) {
|
|
12888
|
+
const node = createBaseToken(kind);
|
|
12889
|
+
node.text = text;
|
|
12890
|
+
return node;
|
|
12891
|
+
}
|
|
12935
12892
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
12936
|
-
const node =
|
|
12937
|
-
node.text = typeof value === "number" ? value + "" : value;
|
|
12893
|
+
const node = createBaseLiteral(8 /* NumericLiteral */, typeof value === "number" ? value + "" : value);
|
|
12938
12894
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
12939
12895
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
12940
12896
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
12941
12897
|
return node;
|
|
12942
12898
|
}
|
|
12943
12899
|
function createBigIntLiteral(value) {
|
|
12944
|
-
const node =
|
|
12945
|
-
node.text = typeof value === "string" ? value : pseudoBigIntToString(value) + "n";
|
|
12900
|
+
const node = createBaseLiteral(9 /* BigIntLiteral */, typeof value === "string" ? value : pseudoBigIntToString(value) + "n");
|
|
12946
12901
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
12947
12902
|
return node;
|
|
12948
12903
|
}
|
|
12949
12904
|
function createBaseStringLiteral(text, isSingleQuote) {
|
|
12950
|
-
const node =
|
|
12951
|
-
node.text = text;
|
|
12905
|
+
const node = createBaseLiteral(10 /* StringLiteral */, text);
|
|
12952
12906
|
node.singleQuote = isSingleQuote;
|
|
12953
12907
|
return node;
|
|
12954
12908
|
}
|
|
@@ -12965,8 +12919,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12965
12919
|
return node;
|
|
12966
12920
|
}
|
|
12967
12921
|
function createRegularExpressionLiteral(text) {
|
|
12968
|
-
const node =
|
|
12969
|
-
node.text = text;
|
|
12922
|
+
const node = createBaseLiteral(13 /* RegularExpressionLiteral */, text);
|
|
12970
12923
|
return node;
|
|
12971
12924
|
}
|
|
12972
12925
|
function createLiteralLikeNode(kind, text) {
|
|
@@ -12987,15 +12940,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12987
12940
|
return createTemplateLiteralLikeNode(kind, text, void 0, 0);
|
|
12988
12941
|
}
|
|
12989
12942
|
}
|
|
12990
|
-
function createBaseIdentifier(
|
|
12943
|
+
function createBaseIdentifier(text, originalKeywordKind) {
|
|
12944
|
+
if (originalKeywordKind === void 0 && text) {
|
|
12945
|
+
originalKeywordKind = stringToToken(text);
|
|
12946
|
+
}
|
|
12947
|
+
if (originalKeywordKind === 79 /* Identifier */) {
|
|
12948
|
+
originalKeywordKind = void 0;
|
|
12949
|
+
}
|
|
12991
12950
|
const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
|
|
12992
12951
|
node.originalKeywordKind = originalKeywordKind;
|
|
12993
|
-
node.escapedText =
|
|
12994
|
-
node.autoGenerateFlags = 0 /* None */;
|
|
12952
|
+
node.escapedText = escapeLeadingUnderscores(text);
|
|
12995
12953
|
return node;
|
|
12996
12954
|
}
|
|
12997
12955
|
function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
12998
|
-
const node = createBaseIdentifier(
|
|
12956
|
+
const node = createBaseIdentifier(text, void 0);
|
|
12999
12957
|
node.autoGenerateFlags = autoGenerateFlags;
|
|
13000
12958
|
node.autoGenerateId = nextAutoGenerateId;
|
|
13001
12959
|
node.autoGeneratePrefix = prefix;
|
|
@@ -13004,23 +12962,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13004
12962
|
return node;
|
|
13005
12963
|
}
|
|
13006
12964
|
function createIdentifier(text, typeArguments, originalKeywordKind, hasExtendedUnicodeEscape) {
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
if (originalKeywordKind === 79 /* Identifier */) {
|
|
13011
|
-
originalKeywordKind = void 0;
|
|
12965
|
+
const node = createBaseIdentifier(text, originalKeywordKind);
|
|
12966
|
+
if (typeArguments) {
|
|
12967
|
+
node.typeArguments = createNodeArray(typeArguments);
|
|
13012
12968
|
}
|
|
13013
|
-
const node = createBaseIdentifier(escapeLeadingUnderscores(text), originalKeywordKind);
|
|
13014
|
-
node.typeArguments = asNodeArray(typeArguments);
|
|
13015
|
-
node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
|
|
13016
|
-
node.jsDoc = void 0;
|
|
13017
|
-
node.jsDocCache = void 0;
|
|
13018
|
-
node.flowNode = void 0;
|
|
13019
|
-
node.symbol = void 0;
|
|
13020
12969
|
if (node.originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
13021
12970
|
node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
|
|
13022
12971
|
}
|
|
13023
|
-
if (
|
|
12972
|
+
if (hasExtendedUnicodeEscape) {
|
|
12973
|
+
node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
|
|
13024
12974
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
13025
12975
|
}
|
|
13026
12976
|
return node;
|
|
@@ -13058,20 +13008,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13058
13008
|
name.original = node;
|
|
13059
13009
|
return name;
|
|
13060
13010
|
}
|
|
13061
|
-
function createBasePrivateIdentifier(
|
|
13011
|
+
function createBasePrivateIdentifier(text) {
|
|
13062
13012
|
const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
|
|
13063
|
-
node.escapedText =
|
|
13064
|
-
node.autoGenerateFlags = 0 /* None */;
|
|
13013
|
+
node.escapedText = escapeLeadingUnderscores(text);
|
|
13065
13014
|
node.transformFlags |= 16777216 /* ContainsClassFields */;
|
|
13066
13015
|
return node;
|
|
13067
13016
|
}
|
|
13068
13017
|
function createPrivateIdentifier(text) {
|
|
13069
13018
|
if (!startsWith(text, "#"))
|
|
13070
13019
|
Debug.fail("First character of private identifier must be #: " + text);
|
|
13071
|
-
return createBasePrivateIdentifier(
|
|
13020
|
+
return createBasePrivateIdentifier(text);
|
|
13072
13021
|
}
|
|
13073
13022
|
function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
13074
|
-
const node = createBasePrivateIdentifier(
|
|
13023
|
+
const node = createBasePrivateIdentifier(text);
|
|
13075
13024
|
node.autoGenerateFlags = autoGenerateFlags;
|
|
13076
13025
|
node.autoGenerateId = nextAutoGenerateId;
|
|
13077
13026
|
node.autoGeneratePrefix = prefix;
|
|
@@ -13131,7 +13080,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13131
13080
|
break;
|
|
13132
13081
|
case 106 /* SuperKeyword */:
|
|
13133
13082
|
transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */;
|
|
13134
|
-
node.flowNode = void 0;
|
|
13135
13083
|
break;
|
|
13136
13084
|
case 124 /* StaticKeyword */:
|
|
13137
13085
|
transformFlags = 1024 /* ContainsES2015 */;
|
|
@@ -13141,7 +13089,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13141
13089
|
break;
|
|
13142
13090
|
case 108 /* ThisKeyword */:
|
|
13143
13091
|
transformFlags = 16384 /* ContainsLexicalThis */;
|
|
13144
|
-
node.flowNode = void 0;
|
|
13145
13092
|
break;
|
|
13146
13093
|
}
|
|
13147
13094
|
if (transformFlags) {
|
|
@@ -13206,7 +13153,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13206
13153
|
node.left = left;
|
|
13207
13154
|
node.right = asName(right);
|
|
13208
13155
|
node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right);
|
|
13209
|
-
node.flowNode = void 0;
|
|
13210
13156
|
return node;
|
|
13211
13157
|
}
|
|
13212
13158
|
function updateQualifiedName(node, left, right) {
|
|
@@ -13222,36 +13168,40 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13222
13168
|
return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node;
|
|
13223
13169
|
}
|
|
13224
13170
|
function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) {
|
|
13225
|
-
const node =
|
|
13226
|
-
|
|
13227
|
-
|
|
13171
|
+
const node = createBaseNamedDeclaration(
|
|
13172
|
+
165 /* TypeParameter */,
|
|
13173
|
+
modifiers,
|
|
13174
|
+
name
|
|
13175
|
+
);
|
|
13228
13176
|
node.constraint = constraint;
|
|
13229
13177
|
node.default = defaultType;
|
|
13230
13178
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13231
|
-
node.expression = void 0;
|
|
13232
|
-
node.jsDoc = void 0;
|
|
13233
|
-
node.jsDocCache = void 0;
|
|
13234
13179
|
return node;
|
|
13235
13180
|
}
|
|
13236
13181
|
function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) {
|
|
13237
13182
|
return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node;
|
|
13238
13183
|
}
|
|
13239
13184
|
function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13185
|
+
const node = createBaseVariableLikeDeclaration(
|
|
13186
|
+
166 /* Parameter */,
|
|
13187
|
+
modifiers,
|
|
13188
|
+
name,
|
|
13189
|
+
type,
|
|
13190
|
+
initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer)
|
|
13191
|
+
);
|
|
13243
13192
|
node.dotDotDotToken = dotDotDotToken;
|
|
13244
|
-
node.name = asName(name);
|
|
13245
13193
|
node.questionToken = questionToken;
|
|
13246
|
-
node.type = type;
|
|
13247
|
-
node.initializer = asInitializer(initializer);
|
|
13248
13194
|
if (isThisIdentifier(node.name)) {
|
|
13249
13195
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13250
13196
|
} else {
|
|
13251
|
-
node.transformFlags
|
|
13197
|
+
node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.questionToken);
|
|
13198
|
+
if (questionToken)
|
|
13199
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13200
|
+
if (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */)
|
|
13201
|
+
node.transformFlags |= 8192 /* ContainsTypeScriptClassSyntax */;
|
|
13202
|
+
if (initializer || dotDotDotToken)
|
|
13203
|
+
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
13252
13204
|
}
|
|
13253
|
-
node.jsDoc = void 0;
|
|
13254
|
-
node.jsDocCache = void 0;
|
|
13255
13205
|
return node;
|
|
13256
13206
|
}
|
|
13257
13207
|
function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
@@ -13267,15 +13217,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13267
13217
|
return node.expression !== expression ? update(createDecorator(expression), node) : node;
|
|
13268
13218
|
}
|
|
13269
13219
|
function createPropertySignature(modifiers, name, questionToken, type) {
|
|
13270
|
-
const node =
|
|
13271
|
-
|
|
13272
|
-
|
|
13220
|
+
const node = createBaseNamedDeclaration(
|
|
13221
|
+
168 /* PropertySignature */,
|
|
13222
|
+
modifiers,
|
|
13223
|
+
name
|
|
13224
|
+
);
|
|
13273
13225
|
node.type = type;
|
|
13274
13226
|
node.questionToken = questionToken;
|
|
13275
13227
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13276
13228
|
node.initializer = void 0;
|
|
13277
|
-
node.jsDoc = void 0;
|
|
13278
|
-
node.jsDocCache = void 0;
|
|
13279
13229
|
return node;
|
|
13280
13230
|
}
|
|
13281
13231
|
function updatePropertySignature(node, modifiers, name, questionToken, type) {
|
|
@@ -13288,68 +13238,69 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13288
13238
|
return update(updated, original);
|
|
13289
13239
|
}
|
|
13290
13240
|
function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
13291
|
-
const node =
|
|
13292
|
-
|
|
13293
|
-
|
|
13241
|
+
const node = createBaseVariableLikeDeclaration(
|
|
13242
|
+
169 /* PropertyDeclaration */,
|
|
13243
|
+
modifiers,
|
|
13244
|
+
name,
|
|
13245
|
+
type,
|
|
13246
|
+
initializer
|
|
13247
|
+
);
|
|
13294
13248
|
node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;
|
|
13295
13249
|
node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;
|
|
13296
|
-
node.
|
|
13297
|
-
node.
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
node.
|
|
13301
|
-
|
|
13250
|
+
node.transformFlags |= propagateChildFlags(node.questionToken) | propagateChildFlags(node.exclamationToken) | 16777216 /* ContainsClassFields */;
|
|
13251
|
+
if (isComputedPropertyName(node.name) || hasStaticModifier(node) && node.initializer) {
|
|
13252
|
+
node.transformFlags |= 8192 /* ContainsTypeScriptClassSyntax */;
|
|
13253
|
+
}
|
|
13254
|
+
if (questionOrExclamationToken || modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
13255
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13256
|
+
}
|
|
13302
13257
|
return node;
|
|
13303
13258
|
}
|
|
13304
13259
|
function updatePropertyDeclaration(node, modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
13305
13260
|
return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node;
|
|
13306
13261
|
}
|
|
13307
13262
|
function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) {
|
|
13308
|
-
const node =
|
|
13309
|
-
|
|
13310
|
-
|
|
13263
|
+
const node = createBaseSignatureDeclaration(
|
|
13264
|
+
170 /* MethodSignature */,
|
|
13265
|
+
modifiers,
|
|
13266
|
+
name,
|
|
13267
|
+
typeParameters,
|
|
13268
|
+
parameters,
|
|
13269
|
+
type
|
|
13270
|
+
);
|
|
13311
13271
|
node.questionToken = questionToken;
|
|
13312
|
-
node.typeParameters = asNodeArray(typeParameters);
|
|
13313
|
-
node.parameters = asNodeArray(parameters);
|
|
13314
|
-
node.type = type;
|
|
13315
13272
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13316
|
-
node.jsDoc = void 0;
|
|
13317
|
-
node.jsDocCache = void 0;
|
|
13318
|
-
node.locals = void 0;
|
|
13319
|
-
node.nextContainer = void 0;
|
|
13320
|
-
node.typeArguments = void 0;
|
|
13321
13273
|
return node;
|
|
13322
13274
|
}
|
|
13323
13275
|
function updateMethodSignature(node, modifiers, name, questionToken, typeParameters, parameters, type) {
|
|
13324
13276
|
return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node;
|
|
13325
13277
|
}
|
|
13326
13278
|
function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
13327
|
-
const node =
|
|
13328
|
-
|
|
13279
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
13280
|
+
171 /* MethodDeclaration */,
|
|
13281
|
+
modifiers,
|
|
13282
|
+
name,
|
|
13283
|
+
typeParameters,
|
|
13284
|
+
parameters,
|
|
13285
|
+
type,
|
|
13286
|
+
body
|
|
13287
|
+
);
|
|
13329
13288
|
node.asteriskToken = asteriskToken;
|
|
13330
|
-
node.name = asName(name);
|
|
13331
13289
|
node.questionToken = questionToken;
|
|
13332
|
-
node.
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
node.type = type;
|
|
13336
|
-
node.body = body;
|
|
13337
|
-
if (!node.body) {
|
|
13338
|
-
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13339
|
-
} else {
|
|
13340
|
-
const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
|
|
13341
|
-
const isGenerator = !!node.asteriskToken;
|
|
13342
|
-
const isAsyncGenerator = isAsync && isGenerator;
|
|
13343
|
-
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | 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.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
13290
|
+
node.transformFlags |= propagateChildFlags(node.asteriskToken) | propagateChildFlags(node.questionToken) | 1024 /* ContainsES2015 */;
|
|
13291
|
+
if (questionToken) {
|
|
13292
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13344
13293
|
}
|
|
13345
|
-
node.
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13294
|
+
if (modifiersToFlags(node.modifiers) & 512 /* Async */) {
|
|
13295
|
+
if (asteriskToken) {
|
|
13296
|
+
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
13297
|
+
} else {
|
|
13298
|
+
node.transformFlags |= 256 /* ContainsES2017 */;
|
|
13299
|
+
}
|
|
13300
|
+
} else if (asteriskToken) {
|
|
13301
|
+
node.transformFlags |= 2048 /* ContainsGenerator */;
|
|
13302
|
+
}
|
|
13303
|
+
node.exclamationToken = void 0;
|
|
13353
13304
|
return node;
|
|
13354
13305
|
}
|
|
13355
13306
|
function updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
@@ -13362,17 +13313,16 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13362
13313
|
return update(updated, original);
|
|
13363
13314
|
}
|
|
13364
13315
|
function createClassStaticBlockDeclaration(body) {
|
|
13365
|
-
const node =
|
|
13316
|
+
const node = createBaseGenericNamedDeclaration(
|
|
13317
|
+
172 /* ClassStaticBlockDeclaration */,
|
|
13318
|
+
void 0,
|
|
13319
|
+
void 0,
|
|
13320
|
+
void 0
|
|
13321
|
+
);
|
|
13366
13322
|
node.body = body;
|
|
13367
13323
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */;
|
|
13368
13324
|
node.illegalDecorators = void 0;
|
|
13369
13325
|
node.modifiers = void 0;
|
|
13370
|
-
node.jsDoc = void 0;
|
|
13371
|
-
node.jsDocCache = void 0;
|
|
13372
|
-
node.locals = void 0;
|
|
13373
|
-
node.nextContainer = void 0;
|
|
13374
|
-
node.endFlowNode = void 0;
|
|
13375
|
-
node.returnFlowNode = void 0;
|
|
13376
13326
|
return node;
|
|
13377
13327
|
}
|
|
13378
13328
|
function updateClassStaticBlockDeclaration(node, body) {
|
|
@@ -13386,21 +13336,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13386
13336
|
return update(updated, original);
|
|
13387
13337
|
}
|
|
13388
13338
|
function createConstructorDeclaration(modifiers, parameters, body) {
|
|
13389
|
-
const node =
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13339
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
13340
|
+
173 /* Constructor */,
|
|
13341
|
+
modifiers,
|
|
13342
|
+
void 0,
|
|
13343
|
+
void 0,
|
|
13344
|
+
parameters,
|
|
13345
|
+
void 0,
|
|
13346
|
+
body
|
|
13347
|
+
);
|
|
13348
|
+
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
13394
13349
|
node.illegalDecorators = void 0;
|
|
13395
13350
|
node.typeParameters = void 0;
|
|
13396
13351
|
node.type = void 0;
|
|
13397
|
-
node.typeArguments = void 0;
|
|
13398
|
-
node.jsDoc = void 0;
|
|
13399
|
-
node.jsDocCache = void 0;
|
|
13400
|
-
node.locals = void 0;
|
|
13401
|
-
node.nextContainer = void 0;
|
|
13402
|
-
node.endFlowNode = void 0;
|
|
13403
|
-
node.returnFlowNode = void 0;
|
|
13404
13352
|
return node;
|
|
13405
13353
|
}
|
|
13406
13354
|
function updateConstructorDeclaration(node, modifiers, parameters, body) {
|
|
@@ -13415,26 +13363,16 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13415
13363
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
13416
13364
|
}
|
|
13417
13365
|
function createGetAccessorDeclaration(modifiers, name, parameters, type, body) {
|
|
13418
|
-
const node =
|
|
13419
|
-
|
|
13420
|
-
|
|
13421
|
-
|
|
13422
|
-
|
|
13423
|
-
|
|
13424
|
-
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
13428
|
-
}
|
|
13429
|
-
node.typeArguments = void 0;
|
|
13366
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
13367
|
+
174 /* GetAccessor */,
|
|
13368
|
+
modifiers,
|
|
13369
|
+
name,
|
|
13370
|
+
void 0,
|
|
13371
|
+
parameters,
|
|
13372
|
+
type,
|
|
13373
|
+
body
|
|
13374
|
+
);
|
|
13430
13375
|
node.typeParameters = void 0;
|
|
13431
|
-
node.jsDoc = void 0;
|
|
13432
|
-
node.jsDocCache = void 0;
|
|
13433
|
-
node.locals = void 0;
|
|
13434
|
-
node.nextContainer = void 0;
|
|
13435
|
-
node.flowNode = void 0;
|
|
13436
|
-
node.endFlowNode = void 0;
|
|
13437
|
-
node.returnFlowNode = void 0;
|
|
13438
13376
|
return node;
|
|
13439
13377
|
}
|
|
13440
13378
|
function updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body) {
|
|
@@ -13447,26 +13385,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13447
13385
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
13448
13386
|
}
|
|
13449
13387
|
function createSetAccessorDeclaration(modifiers, name, parameters, body) {
|
|
13450
|
-
const node =
|
|
13451
|
-
|
|
13452
|
-
|
|
13453
|
-
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
|
|
13459
|
-
}
|
|
13460
|
-
node.typeArguments = void 0;
|
|
13388
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
13389
|
+
175 /* SetAccessor */,
|
|
13390
|
+
modifiers,
|
|
13391
|
+
name,
|
|
13392
|
+
void 0,
|
|
13393
|
+
parameters,
|
|
13394
|
+
void 0,
|
|
13395
|
+
body
|
|
13396
|
+
);
|
|
13461
13397
|
node.typeParameters = void 0;
|
|
13462
13398
|
node.type = void 0;
|
|
13463
|
-
node.jsDoc = void 0;
|
|
13464
|
-
node.jsDocCache = void 0;
|
|
13465
|
-
node.locals = void 0;
|
|
13466
|
-
node.nextContainer = void 0;
|
|
13467
|
-
node.flowNode = void 0;
|
|
13468
|
-
node.endFlowNode = void 0;
|
|
13469
|
-
node.returnFlowNode = void 0;
|
|
13470
13399
|
return node;
|
|
13471
13400
|
}
|
|
13472
13401
|
function updateSetAccessorDeclaration(node, modifiers, name, parameters, body) {
|
|
@@ -13480,49 +13409,45 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13480
13409
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
13481
13410
|
}
|
|
13482
13411
|
function createCallSignature(typeParameters, parameters, type) {
|
|
13483
|
-
const node =
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13412
|
+
const node = createBaseSignatureDeclaration(
|
|
13413
|
+
176 /* CallSignature */,
|
|
13414
|
+
void 0,
|
|
13415
|
+
void 0,
|
|
13416
|
+
typeParameters,
|
|
13417
|
+
parameters,
|
|
13418
|
+
type
|
|
13419
|
+
);
|
|
13487
13420
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13488
|
-
node.jsDoc = void 0;
|
|
13489
|
-
node.jsDocCache = void 0;
|
|
13490
|
-
node.locals = void 0;
|
|
13491
|
-
node.nextContainer = void 0;
|
|
13492
|
-
node.typeArguments = void 0;
|
|
13493
13421
|
return node;
|
|
13494
13422
|
}
|
|
13495
13423
|
function updateCallSignature(node, typeParameters, parameters, type) {
|
|
13496
13424
|
return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node;
|
|
13497
13425
|
}
|
|
13498
13426
|
function createConstructSignature(typeParameters, parameters, type) {
|
|
13499
|
-
const node =
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13427
|
+
const node = createBaseSignatureDeclaration(
|
|
13428
|
+
177 /* ConstructSignature */,
|
|
13429
|
+
void 0,
|
|
13430
|
+
void 0,
|
|
13431
|
+
typeParameters,
|
|
13432
|
+
parameters,
|
|
13433
|
+
type
|
|
13434
|
+
);
|
|
13503
13435
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13504
|
-
node.jsDoc = void 0;
|
|
13505
|
-
node.jsDocCache = void 0;
|
|
13506
|
-
node.locals = void 0;
|
|
13507
|
-
node.nextContainer = void 0;
|
|
13508
|
-
node.typeArguments = void 0;
|
|
13509
13436
|
return node;
|
|
13510
13437
|
}
|
|
13511
13438
|
function updateConstructSignature(node, typeParameters, parameters, type) {
|
|
13512
13439
|
return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node;
|
|
13513
13440
|
}
|
|
13514
13441
|
function createIndexSignature(modifiers, parameters, type) {
|
|
13515
|
-
const node =
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
|
|
13442
|
+
const node = createBaseSignatureDeclaration(
|
|
13443
|
+
178 /* IndexSignature */,
|
|
13444
|
+
modifiers,
|
|
13445
|
+
void 0,
|
|
13446
|
+
void 0,
|
|
13447
|
+
parameters,
|
|
13448
|
+
type
|
|
13449
|
+
);
|
|
13519
13450
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13520
|
-
node.illegalDecorators = void 0;
|
|
13521
|
-
node.jsDoc = void 0;
|
|
13522
|
-
node.jsDocCache = void 0;
|
|
13523
|
-
node.locals = void 0;
|
|
13524
|
-
node.nextContainer = void 0;
|
|
13525
|
-
node.typeArguments = void 0;
|
|
13526
13451
|
return node;
|
|
13527
13452
|
}
|
|
13528
13453
|
function updateIndexSignature(node, modifiers, parameters, type) {
|
|
@@ -13563,17 +13488,16 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13563
13488
|
return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node;
|
|
13564
13489
|
}
|
|
13565
13490
|
function createFunctionTypeNode(typeParameters, parameters, type) {
|
|
13566
|
-
const node =
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13491
|
+
const node = createBaseSignatureDeclaration(
|
|
13492
|
+
181 /* FunctionType */,
|
|
13493
|
+
void 0,
|
|
13494
|
+
void 0,
|
|
13495
|
+
typeParameters,
|
|
13496
|
+
parameters,
|
|
13497
|
+
type
|
|
13498
|
+
);
|
|
13570
13499
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13571
13500
|
node.modifiers = void 0;
|
|
13572
|
-
node.jsDoc = void 0;
|
|
13573
|
-
node.jsDocCache = void 0;
|
|
13574
|
-
node.locals = void 0;
|
|
13575
|
-
node.nextContainer = void 0;
|
|
13576
|
-
node.typeArguments = void 0;
|
|
13577
13501
|
return node;
|
|
13578
13502
|
}
|
|
13579
13503
|
function updateFunctionTypeNode(node, typeParameters, parameters, type) {
|
|
@@ -13589,17 +13513,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13589
13513
|
return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified.");
|
|
13590
13514
|
}
|
|
13591
13515
|
function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {
|
|
13592
|
-
const node =
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
|
|
13516
|
+
const node = createBaseSignatureDeclaration(
|
|
13517
|
+
182 /* ConstructorType */,
|
|
13518
|
+
modifiers,
|
|
13519
|
+
void 0,
|
|
13520
|
+
typeParameters,
|
|
13521
|
+
parameters,
|
|
13522
|
+
type
|
|
13523
|
+
);
|
|
13597
13524
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13598
|
-
node.jsDoc = void 0;
|
|
13599
|
-
node.jsDocCache = void 0;
|
|
13600
|
-
node.locals = void 0;
|
|
13601
|
-
node.nextContainer = void 0;
|
|
13602
|
-
node.typeArguments = void 0;
|
|
13603
13525
|
return node;
|
|
13604
13526
|
}
|
|
13605
13527
|
function createConstructorTypeNode2(typeParameters, parameters, type) {
|
|
@@ -13625,7 +13547,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13625
13547
|
return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node;
|
|
13626
13548
|
}
|
|
13627
13549
|
function createTypeLiteralNode(members) {
|
|
13628
|
-
const node =
|
|
13550
|
+
const node = createBaseNode(184 /* TypeLiteral */);
|
|
13629
13551
|
node.members = createNodeArray(members);
|
|
13630
13552
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13631
13553
|
return node;
|
|
@@ -13652,14 +13574,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13652
13574
|
return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node;
|
|
13653
13575
|
}
|
|
13654
13576
|
function createNamedTupleMember(dotDotDotToken, name, questionToken, type) {
|
|
13655
|
-
const node =
|
|
13577
|
+
const node = createBaseNode(199 /* NamedTupleMember */);
|
|
13656
13578
|
node.dotDotDotToken = dotDotDotToken;
|
|
13657
13579
|
node.name = name;
|
|
13658
13580
|
node.questionToken = questionToken;
|
|
13659
13581
|
node.type = type;
|
|
13660
13582
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13661
|
-
node.jsDoc = void 0;
|
|
13662
|
-
node.jsDocCache = void 0;
|
|
13663
13583
|
return node;
|
|
13664
13584
|
}
|
|
13665
13585
|
function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {
|
|
@@ -13711,8 +13631,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13711
13631
|
node.trueType = trueType;
|
|
13712
13632
|
node.falseType = falseType;
|
|
13713
13633
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13714
|
-
node.locals = void 0;
|
|
13715
|
-
node.nextContainer = void 0;
|
|
13716
13634
|
return node;
|
|
13717
13635
|
}
|
|
13718
13636
|
function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) {
|
|
@@ -13785,7 +13703,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13785
13703
|
return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node;
|
|
13786
13704
|
}
|
|
13787
13705
|
function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
|
|
13788
|
-
const node =
|
|
13706
|
+
const node = createBaseNode(197 /* MappedType */);
|
|
13789
13707
|
node.readonlyToken = readonlyToken;
|
|
13790
13708
|
node.typeParameter = typeParameter;
|
|
13791
13709
|
node.nameType = nameType;
|
|
@@ -13793,8 +13711,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13793
13711
|
node.type = type;
|
|
13794
13712
|
node.members = members && createNodeArray(members);
|
|
13795
13713
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13796
|
-
node.locals = void 0;
|
|
13797
|
-
node.nextContainer = void 0;
|
|
13798
13714
|
return node;
|
|
13799
13715
|
}
|
|
13800
13716
|
function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
|
|
@@ -13831,20 +13747,31 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13831
13747
|
return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node;
|
|
13832
13748
|
}
|
|
13833
13749
|
function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
|
|
13834
|
-
const node =
|
|
13835
|
-
|
|
13750
|
+
const node = createBaseBindingLikeDeclaration(
|
|
13751
|
+
205 /* BindingElement */,
|
|
13752
|
+
void 0,
|
|
13753
|
+
name,
|
|
13754
|
+
initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer)
|
|
13755
|
+
);
|
|
13836
13756
|
node.propertyName = asName(propertyName);
|
|
13837
|
-
node.
|
|
13838
|
-
node.
|
|
13839
|
-
|
|
13840
|
-
|
|
13757
|
+
node.dotDotDotToken = dotDotDotToken;
|
|
13758
|
+
node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | 1024 /* ContainsES2015 */;
|
|
13759
|
+
if (node.propertyName) {
|
|
13760
|
+
node.transformFlags |= isIdentifier(node.propertyName) ? propagateIdentifierNameFlags(node.propertyName) : propagateChildFlags(node.propertyName);
|
|
13761
|
+
}
|
|
13762
|
+
if (dotDotDotToken)
|
|
13763
|
+
node.transformFlags |= 32768 /* ContainsRestOrSpread */;
|
|
13841
13764
|
return node;
|
|
13842
13765
|
}
|
|
13843
13766
|
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
|
|
13844
13767
|
return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node;
|
|
13845
13768
|
}
|
|
13769
|
+
function createBaseExpression(kind) {
|
|
13770
|
+
const node = createBaseNode(kind);
|
|
13771
|
+
return node;
|
|
13772
|
+
}
|
|
13846
13773
|
function createArrayLiteralExpression(elements, multiLine) {
|
|
13847
|
-
const node =
|
|
13774
|
+
const node = createBaseExpression(206 /* ArrayLiteralExpression */);
|
|
13848
13775
|
const lastElement = elements && lastOrUndefined(elements);
|
|
13849
13776
|
const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0);
|
|
13850
13777
|
node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray);
|
|
@@ -13856,34 +13783,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13856
13783
|
return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node;
|
|
13857
13784
|
}
|
|
13858
13785
|
function createObjectLiteralExpression(properties, multiLine) {
|
|
13859
|
-
const node =
|
|
13786
|
+
const node = createBaseExpression(207 /* ObjectLiteralExpression */);
|
|
13860
13787
|
node.properties = createNodeArray(properties);
|
|
13861
13788
|
node.multiLine = multiLine;
|
|
13862
13789
|
node.transformFlags |= propagateChildrenFlags(node.properties);
|
|
13863
|
-
node.jsDoc = void 0;
|
|
13864
|
-
node.jsDocCache = void 0;
|
|
13865
13790
|
return node;
|
|
13866
13791
|
}
|
|
13867
13792
|
function updateObjectLiteralExpression(node, properties) {
|
|
13868
13793
|
return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node;
|
|
13869
13794
|
}
|
|
13870
|
-
function createBasePropertyAccessExpression(expression, questionDotToken, name) {
|
|
13871
|
-
const node = createBaseDeclaration(208 /* PropertyAccessExpression */);
|
|
13872
|
-
node.expression = expression;
|
|
13873
|
-
node.questionDotToken = questionDotToken;
|
|
13874
|
-
node.name = name;
|
|
13875
|
-
node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
13876
|
-
node.jsDoc = void 0;
|
|
13877
|
-
node.jsDocCache = void 0;
|
|
13878
|
-
node.flowNode = void 0;
|
|
13879
|
-
return node;
|
|
13880
|
-
}
|
|
13881
13795
|
function createPropertyAccessExpression(expression, name) {
|
|
13882
|
-
const node =
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
);
|
|
13796
|
+
const node = createBaseExpression(208 /* PropertyAccessExpression */);
|
|
13797
|
+
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false);
|
|
13798
|
+
node.name = asName(name);
|
|
13799
|
+
node.transformFlags = propagateChildFlags(node.expression) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
13887
13800
|
if (isSuperKeyword(expression)) {
|
|
13888
13801
|
node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;
|
|
13889
13802
|
}
|
|
@@ -13896,36 +13809,23 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13896
13809
|
return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node;
|
|
13897
13810
|
}
|
|
13898
13811
|
function createPropertyAccessChain(expression, questionDotToken, name) {
|
|
13899
|
-
const node =
|
|
13900
|
-
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true),
|
|
13901
|
-
questionDotToken,
|
|
13902
|
-
asName(name)
|
|
13903
|
-
);
|
|
13812
|
+
const node = createBaseExpression(208 /* PropertyAccessExpression */);
|
|
13904
13813
|
node.flags |= 32 /* OptionalChain */;
|
|
13905
|
-
node.
|
|
13814
|
+
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true);
|
|
13815
|
+
node.questionDotToken = questionDotToken;
|
|
13816
|
+
node.name = asName(name);
|
|
13817
|
+
node.transformFlags |= 32 /* ContainsES2020 */ | propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
13906
13818
|
return node;
|
|
13907
13819
|
}
|
|
13908
13820
|
function updatePropertyAccessChain(node, expression, questionDotToken, name) {
|
|
13909
13821
|
Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead.");
|
|
13910
13822
|
return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node;
|
|
13911
13823
|
}
|
|
13912
|
-
function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) {
|
|
13913
|
-
const node = createBaseDeclaration(209 /* ElementAccessExpression */);
|
|
13914
|
-
node.expression = expression;
|
|
13915
|
-
node.questionDotToken = questionDotToken;
|
|
13916
|
-
node.argumentExpression = argumentExpression;
|
|
13917
|
-
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression);
|
|
13918
|
-
node.jsDoc = void 0;
|
|
13919
|
-
node.jsDocCache = void 0;
|
|
13920
|
-
node.flowNode = void 0;
|
|
13921
|
-
return node;
|
|
13922
|
-
}
|
|
13923
13824
|
function createElementAccessExpression(expression, index) {
|
|
13924
|
-
const node =
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
);
|
|
13825
|
+
const node = createBaseExpression(209 /* ElementAccessExpression */);
|
|
13826
|
+
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false);
|
|
13827
|
+
node.argumentExpression = asExpression(index);
|
|
13828
|
+
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.argumentExpression);
|
|
13929
13829
|
if (isSuperKeyword(expression)) {
|
|
13930
13830
|
node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;
|
|
13931
13831
|
}
|
|
@@ -13938,43 +13838,31 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13938
13838
|
return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node;
|
|
13939
13839
|
}
|
|
13940
13840
|
function createElementAccessChain(expression, questionDotToken, index) {
|
|
13941
|
-
const node =
|
|
13942
|
-
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true),
|
|
13943
|
-
questionDotToken,
|
|
13944
|
-
asExpression(index)
|
|
13945
|
-
);
|
|
13841
|
+
const node = createBaseExpression(209 /* ElementAccessExpression */);
|
|
13946
13842
|
node.flags |= 32 /* OptionalChain */;
|
|
13947
|
-
node.
|
|
13843
|
+
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true);
|
|
13844
|
+
node.questionDotToken = questionDotToken;
|
|
13845
|
+
node.argumentExpression = asExpression(index);
|
|
13846
|
+
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression) | 32 /* ContainsES2020 */;
|
|
13948
13847
|
return node;
|
|
13949
13848
|
}
|
|
13950
13849
|
function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) {
|
|
13951
13850
|
Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead.");
|
|
13952
13851
|
return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node;
|
|
13953
13852
|
}
|
|
13954
|
-
function
|
|
13955
|
-
const node =
|
|
13956
|
-
node.expression = expression;
|
|
13957
|
-
node.
|
|
13958
|
-
node.
|
|
13959
|
-
node.
|
|
13960
|
-
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments);
|
|
13853
|
+
function createCallExpression(expression, typeArguments, argumentsArray) {
|
|
13854
|
+
const node = createBaseExpression(210 /* CallExpression */);
|
|
13855
|
+
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false);
|
|
13856
|
+
node.typeArguments = asNodeArray(typeArguments);
|
|
13857
|
+
node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray));
|
|
13858
|
+
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments);
|
|
13961
13859
|
if (node.typeArguments) {
|
|
13962
13860
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13963
13861
|
}
|
|
13964
|
-
if (isSuperProperty(node.expression)) {
|
|
13965
|
-
node.transformFlags |= 16384 /* ContainsLexicalThis */;
|
|
13966
|
-
}
|
|
13967
|
-
return node;
|
|
13968
|
-
}
|
|
13969
|
-
function createCallExpression(expression, typeArguments, argumentsArray) {
|
|
13970
|
-
const node = createBaseCallExpression(
|
|
13971
|
-
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false),
|
|
13972
|
-
void 0,
|
|
13973
|
-
asNodeArray(typeArguments),
|
|
13974
|
-
parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray))
|
|
13975
|
-
);
|
|
13976
13862
|
if (isImportKeyword(node.expression)) {
|
|
13977
13863
|
node.transformFlags |= 8388608 /* ContainsDynamicImport */;
|
|
13864
|
+
} else if (isSuperProperty(node.expression)) {
|
|
13865
|
+
node.transformFlags |= 16384 /* ContainsLexicalThis */;
|
|
13978
13866
|
}
|
|
13979
13867
|
return node;
|
|
13980
13868
|
}
|
|
@@ -13985,14 +13873,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13985
13873
|
return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node;
|
|
13986
13874
|
}
|
|
13987
13875
|
function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) {
|
|
13988
|
-
const node =
|
|
13989
|
-
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true),
|
|
13990
|
-
questionDotToken,
|
|
13991
|
-
asNodeArray(typeArguments),
|
|
13992
|
-
parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray))
|
|
13993
|
-
);
|
|
13876
|
+
const node = createBaseExpression(210 /* CallExpression */);
|
|
13994
13877
|
node.flags |= 32 /* OptionalChain */;
|
|
13995
|
-
node.
|
|
13878
|
+
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true);
|
|
13879
|
+
node.questionDotToken = questionDotToken;
|
|
13880
|
+
node.typeArguments = asNodeArray(typeArguments);
|
|
13881
|
+
node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray));
|
|
13882
|
+
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments) | 32 /* ContainsES2020 */;
|
|
13883
|
+
if (node.typeArguments) {
|
|
13884
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13885
|
+
}
|
|
13886
|
+
if (isSuperProperty(node.expression)) {
|
|
13887
|
+
node.transformFlags |= 16384 /* ContainsLexicalThis */;
|
|
13888
|
+
}
|
|
13996
13889
|
return node;
|
|
13997
13890
|
}
|
|
13998
13891
|
function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) {
|
|
@@ -14000,7 +13893,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14000
13893
|
return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node;
|
|
14001
13894
|
}
|
|
14002
13895
|
function createNewExpression(expression, typeArguments, argumentsArray) {
|
|
14003
|
-
const node =
|
|
13896
|
+
const node = createBaseExpression(211 /* NewExpression */);
|
|
14004
13897
|
node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression);
|
|
14005
13898
|
node.typeArguments = asNodeArray(typeArguments);
|
|
14006
13899
|
node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0;
|
|
@@ -14014,7 +13907,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14014
13907
|
return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node;
|
|
14015
13908
|
}
|
|
14016
13909
|
function createTaggedTemplateExpression(tag, typeArguments, template) {
|
|
14017
|
-
const node =
|
|
13910
|
+
const node = createBaseExpression(212 /* TaggedTemplateExpression */);
|
|
14018
13911
|
node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false);
|
|
14019
13912
|
node.typeArguments = asNodeArray(typeArguments);
|
|
14020
13913
|
node.template = template;
|
|
@@ -14031,7 +13924,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14031
13924
|
return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node;
|
|
14032
13925
|
}
|
|
14033
13926
|
function createTypeAssertion(type, expression) {
|
|
14034
|
-
const node =
|
|
13927
|
+
const node = createBaseExpression(213 /* TypeAssertionExpression */);
|
|
14035
13928
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14036
13929
|
node.type = type;
|
|
14037
13930
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;
|
|
@@ -14041,67 +13934,65 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14041
13934
|
return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node;
|
|
14042
13935
|
}
|
|
14043
13936
|
function createParenthesizedExpression(expression) {
|
|
14044
|
-
const node =
|
|
13937
|
+
const node = createBaseExpression(214 /* ParenthesizedExpression */);
|
|
14045
13938
|
node.expression = expression;
|
|
14046
13939
|
node.transformFlags = propagateChildFlags(node.expression);
|
|
14047
|
-
node.jsDoc = void 0;
|
|
14048
|
-
node.jsDocCache = void 0;
|
|
14049
13940
|
return node;
|
|
14050
13941
|
}
|
|
14051
13942
|
function updateParenthesizedExpression(node, expression) {
|
|
14052
13943
|
return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node;
|
|
14053
13944
|
}
|
|
14054
13945
|
function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
14055
|
-
const node =
|
|
14056
|
-
|
|
13946
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
13947
|
+
215 /* FunctionExpression */,
|
|
13948
|
+
modifiers,
|
|
13949
|
+
name,
|
|
13950
|
+
typeParameters,
|
|
13951
|
+
parameters,
|
|
13952
|
+
type,
|
|
13953
|
+
body
|
|
13954
|
+
);
|
|
14057
13955
|
node.asteriskToken = asteriskToken;
|
|
14058
|
-
node.
|
|
14059
|
-
node.typeParameters
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
node.
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
node.
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
node.nextContainer = void 0;
|
|
14072
|
-
node.flowNode = void 0;
|
|
14073
|
-
node.endFlowNode = void 0;
|
|
14074
|
-
node.returnFlowNode = void 0;
|
|
13956
|
+
node.transformFlags |= propagateChildFlags(node.asteriskToken);
|
|
13957
|
+
if (node.typeParameters) {
|
|
13958
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13959
|
+
}
|
|
13960
|
+
if (modifiersToFlags(node.modifiers) & 512 /* Async */) {
|
|
13961
|
+
if (node.asteriskToken) {
|
|
13962
|
+
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
13963
|
+
} else {
|
|
13964
|
+
node.transformFlags |= 256 /* ContainsES2017 */;
|
|
13965
|
+
}
|
|
13966
|
+
} else if (node.asteriskToken) {
|
|
13967
|
+
node.transformFlags |= 2048 /* ContainsGenerator */;
|
|
13968
|
+
}
|
|
14075
13969
|
return node;
|
|
14076
13970
|
}
|
|
14077
13971
|
function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
14078
13972
|
return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node;
|
|
14079
13973
|
}
|
|
14080
13974
|
function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
14081
|
-
const node =
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
13975
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
13976
|
+
216 /* ArrowFunction */,
|
|
13977
|
+
modifiers,
|
|
13978
|
+
void 0,
|
|
13979
|
+
typeParameters,
|
|
13980
|
+
parameters,
|
|
13981
|
+
type,
|
|
13982
|
+
parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body)
|
|
13983
|
+
);
|
|
14086
13984
|
node.equalsGreaterThanToken = equalsGreaterThanToken != null ? equalsGreaterThanToken : createToken(38 /* EqualsGreaterThanToken */);
|
|
14087
|
-
node.
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
node.jsDoc = void 0;
|
|
14092
|
-
node.jsDocCache = void 0;
|
|
14093
|
-
node.locals = void 0;
|
|
14094
|
-
node.nextContainer = void 0;
|
|
14095
|
-
node.flowNode = void 0;
|
|
14096
|
-
node.endFlowNode = void 0;
|
|
14097
|
-
node.returnFlowNode = void 0;
|
|
13985
|
+
node.transformFlags |= propagateChildFlags(node.equalsGreaterThanToken) | 1024 /* ContainsES2015 */;
|
|
13986
|
+
if (modifiersToFlags(node.modifiers) & 512 /* Async */) {
|
|
13987
|
+
node.transformFlags |= 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */;
|
|
13988
|
+
}
|
|
14098
13989
|
return node;
|
|
14099
13990
|
}
|
|
14100
13991
|
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
14101
13992
|
return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node;
|
|
14102
13993
|
}
|
|
14103
13994
|
function createDeleteExpression(expression) {
|
|
14104
|
-
const node =
|
|
13995
|
+
const node = createBaseExpression(217 /* DeleteExpression */);
|
|
14105
13996
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14106
13997
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14107
13998
|
return node;
|
|
@@ -14110,7 +14001,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14110
14001
|
return node.expression !== expression ? update(createDeleteExpression(expression), node) : node;
|
|
14111
14002
|
}
|
|
14112
14003
|
function createTypeOfExpression(expression) {
|
|
14113
|
-
const node =
|
|
14004
|
+
const node = createBaseExpression(218 /* TypeOfExpression */);
|
|
14114
14005
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14115
14006
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14116
14007
|
return node;
|
|
@@ -14119,7 +14010,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14119
14010
|
return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node;
|
|
14120
14011
|
}
|
|
14121
14012
|
function createVoidExpression(expression) {
|
|
14122
|
-
const node =
|
|
14013
|
+
const node = createBaseExpression(219 /* VoidExpression */);
|
|
14123
14014
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14124
14015
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14125
14016
|
return node;
|
|
@@ -14128,7 +14019,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14128
14019
|
return node.expression !== expression ? update(createVoidExpression(expression), node) : node;
|
|
14129
14020
|
}
|
|
14130
14021
|
function createAwaitExpression(expression) {
|
|
14131
|
-
const node =
|
|
14022
|
+
const node = createBaseExpression(220 /* AwaitExpression */);
|
|
14132
14023
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14133
14024
|
node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */;
|
|
14134
14025
|
return node;
|
|
@@ -14137,7 +14028,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14137
14028
|
return node.expression !== expression ? update(createAwaitExpression(expression), node) : node;
|
|
14138
14029
|
}
|
|
14139
14030
|
function createPrefixUnaryExpression(operator, operand) {
|
|
14140
|
-
const node =
|
|
14031
|
+
const node = createBaseExpression(221 /* PrefixUnaryExpression */);
|
|
14141
14032
|
node.operator = operator;
|
|
14142
14033
|
node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand);
|
|
14143
14034
|
node.transformFlags |= propagateChildFlags(node.operand);
|
|
@@ -14150,7 +14041,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14150
14041
|
return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node;
|
|
14151
14042
|
}
|
|
14152
14043
|
function createPostfixUnaryExpression(operand, operator) {
|
|
14153
|
-
const node =
|
|
14044
|
+
const node = createBaseExpression(222 /* PostfixUnaryExpression */);
|
|
14154
14045
|
node.operator = operator;
|
|
14155
14046
|
node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand);
|
|
14156
14047
|
node.transformFlags |= propagateChildFlags(node.operand);
|
|
@@ -14163,7 +14054,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14163
14054
|
return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node;
|
|
14164
14055
|
}
|
|
14165
14056
|
function createBinaryExpression(left, operator, right) {
|
|
14166
|
-
const node =
|
|
14057
|
+
const node = createBaseExpression(223 /* BinaryExpression */);
|
|
14167
14058
|
const operatorToken = asToken(operator);
|
|
14168
14059
|
const operatorKind = operatorToken.kind;
|
|
14169
14060
|
node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left);
|
|
@@ -14186,8 +14077,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14186
14077
|
if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) {
|
|
14187
14078
|
node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */;
|
|
14188
14079
|
}
|
|
14189
|
-
node.jsDoc = void 0;
|
|
14190
|
-
node.jsDocCache = void 0;
|
|
14191
14080
|
return node;
|
|
14192
14081
|
}
|
|
14193
14082
|
function propagateAssignmentPatternFlags(node) {
|
|
@@ -14214,7 +14103,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14214
14103
|
return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node;
|
|
14215
14104
|
}
|
|
14216
14105
|
function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) {
|
|
14217
|
-
const node =
|
|
14106
|
+
const node = createBaseExpression(224 /* ConditionalExpression */);
|
|
14218
14107
|
node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition);
|
|
14219
14108
|
node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */);
|
|
14220
14109
|
node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue);
|
|
@@ -14227,7 +14116,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14227
14116
|
return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node;
|
|
14228
14117
|
}
|
|
14229
14118
|
function createTemplateExpression(head, templateSpans) {
|
|
14230
|
-
const node =
|
|
14119
|
+
const node = createBaseExpression(225 /* TemplateExpression */);
|
|
14231
14120
|
node.head = head;
|
|
14232
14121
|
node.templateSpans = createNodeArray(templateSpans);
|
|
14233
14122
|
node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */;
|
|
@@ -14236,7 +14125,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14236
14125
|
function updateTemplateExpression(node, head, templateSpans) {
|
|
14237
14126
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateExpression(head, templateSpans), node) : node;
|
|
14238
14127
|
}
|
|
14239
|
-
function
|
|
14128
|
+
function createTemplateLiteralLikeNodeChecked(kind, text, rawText, templateFlags = 0 /* None */) {
|
|
14240
14129
|
Debug.assert(!(templateFlags & ~2048 /* TemplateLiteralLikeFlags */), "Unsupported template flags.");
|
|
14241
14130
|
let cooked = void 0;
|
|
14242
14131
|
if (rawText !== void 0 && rawText !== text) {
|
|
@@ -14253,56 +14142,34 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14253
14142
|
} else if (cooked !== void 0) {
|
|
14254
14143
|
Debug.assert(text === cooked, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");
|
|
14255
14144
|
}
|
|
14256
|
-
return text;
|
|
14257
|
-
}
|
|
14258
|
-
function getTransformFlagsOfTemplateLiteralLike(templateFlags) {
|
|
14259
|
-
let transformFlags = 1024 /* ContainsES2015 */;
|
|
14260
|
-
if (templateFlags) {
|
|
14261
|
-
transformFlags |= 128 /* ContainsES2018 */;
|
|
14262
|
-
}
|
|
14263
|
-
return transformFlags;
|
|
14145
|
+
return createTemplateLiteralLikeNode(kind, text, rawText, templateFlags);
|
|
14264
14146
|
}
|
|
14265
|
-
function
|
|
14147
|
+
function createTemplateLiteralLikeNode(kind, text, rawText, templateFlags) {
|
|
14266
14148
|
const node = createBaseToken(kind);
|
|
14267
14149
|
node.text = text;
|
|
14268
14150
|
node.rawText = rawText;
|
|
14269
14151
|
node.templateFlags = templateFlags & 2048 /* TemplateLiteralLikeFlags */;
|
|
14270
|
-
node.transformFlags
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
function createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags) {
|
|
14274
|
-
const node = createBaseDeclaration(kind);
|
|
14275
|
-
node.text = text;
|
|
14276
|
-
node.rawText = rawText;
|
|
14277
|
-
node.templateFlags = templateFlags & 2048 /* TemplateLiteralLikeFlags */;
|
|
14278
|
-
node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);
|
|
14279
|
-
return node;
|
|
14280
|
-
}
|
|
14281
|
-
function createTemplateLiteralLikeNode(kind, text, rawText, templateFlags) {
|
|
14282
|
-
if (kind === 14 /* NoSubstitutionTemplateLiteral */) {
|
|
14283
|
-
return createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags);
|
|
14152
|
+
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
14153
|
+
if (node.templateFlags) {
|
|
14154
|
+
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
14284
14155
|
}
|
|
14285
|
-
return
|
|
14156
|
+
return node;
|
|
14286
14157
|
}
|
|
14287
14158
|
function createTemplateHead(text, rawText, templateFlags) {
|
|
14288
|
-
|
|
14289
|
-
return createTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14159
|
+
return createTemplateLiteralLikeNodeChecked(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14290
14160
|
}
|
|
14291
14161
|
function createTemplateMiddle(text, rawText, templateFlags) {
|
|
14292
|
-
|
|
14293
|
-
return createTemplateLiteralLikeNode(16 /* TemplateMiddle */, text, rawText, templateFlags);
|
|
14162
|
+
return createTemplateLiteralLikeNodeChecked(16 /* TemplateMiddle */, text, rawText, templateFlags);
|
|
14294
14163
|
}
|
|
14295
14164
|
function createTemplateTail(text, rawText, templateFlags) {
|
|
14296
|
-
|
|
14297
|
-
return createTemplateLiteralLikeNode(17 /* TemplateTail */, text, rawText, templateFlags);
|
|
14165
|
+
return createTemplateLiteralLikeNodeChecked(17 /* TemplateTail */, text, rawText, templateFlags);
|
|
14298
14166
|
}
|
|
14299
14167
|
function createNoSubstitutionTemplateLiteral(text, rawText, templateFlags) {
|
|
14300
|
-
|
|
14301
|
-
return createTemplateLiteralLikeDeclaration(14 /* NoSubstitutionTemplateLiteral */, text, rawText, templateFlags);
|
|
14168
|
+
return createTemplateLiteralLikeNodeChecked(14 /* NoSubstitutionTemplateLiteral */, text, rawText, templateFlags);
|
|
14302
14169
|
}
|
|
14303
14170
|
function createYieldExpression(asteriskToken, expression) {
|
|
14304
14171
|
Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression.");
|
|
14305
|
-
const node =
|
|
14172
|
+
const node = createBaseExpression(226 /* YieldExpression */);
|
|
14306
14173
|
node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
14307
14174
|
node.asteriskToken = asteriskToken;
|
|
14308
14175
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */;
|
|
@@ -14312,7 +14179,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14312
14179
|
return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node;
|
|
14313
14180
|
}
|
|
14314
14181
|
function createSpreadElement(expression) {
|
|
14315
|
-
const node =
|
|
14182
|
+
const node = createBaseExpression(227 /* SpreadElement */);
|
|
14316
14183
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
14317
14184
|
node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */;
|
|
14318
14185
|
return node;
|
|
@@ -14321,22 +14188,22 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14321
14188
|
return node.expression !== expression ? update(createSpreadElement(expression), node) : node;
|
|
14322
14189
|
}
|
|
14323
14190
|
function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14324
|
-
const node =
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
node.
|
|
14191
|
+
const node = createBaseClassLikeDeclaration(
|
|
14192
|
+
228 /* ClassExpression */,
|
|
14193
|
+
modifiers,
|
|
14194
|
+
name,
|
|
14195
|
+
typeParameters,
|
|
14196
|
+
heritageClauses,
|
|
14197
|
+
members
|
|
14198
|
+
);
|
|
14199
|
+
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
14333
14200
|
return node;
|
|
14334
14201
|
}
|
|
14335
14202
|
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
14336
14203
|
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node;
|
|
14337
14204
|
}
|
|
14338
14205
|
function createOmittedExpression() {
|
|
14339
|
-
return
|
|
14206
|
+
return createBaseExpression(229 /* OmittedExpression */);
|
|
14340
14207
|
}
|
|
14341
14208
|
function createExpressionWithTypeArguments(expression, typeArguments) {
|
|
14342
14209
|
const node = createBaseNode(230 /* ExpressionWithTypeArguments */);
|
|
@@ -14349,7 +14216,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14349
14216
|
return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node;
|
|
14350
14217
|
}
|
|
14351
14218
|
function createAsExpression(expression, type) {
|
|
14352
|
-
const node =
|
|
14219
|
+
const node = createBaseExpression(231 /* AsExpression */);
|
|
14353
14220
|
node.expression = expression;
|
|
14354
14221
|
node.type = type;
|
|
14355
14222
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;
|
|
@@ -14359,7 +14226,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14359
14226
|
return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node;
|
|
14360
14227
|
}
|
|
14361
14228
|
function createNonNullExpression(expression) {
|
|
14362
|
-
const node =
|
|
14229
|
+
const node = createBaseExpression(232 /* NonNullExpression */);
|
|
14363
14230
|
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false);
|
|
14364
14231
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
14365
14232
|
return node;
|
|
@@ -14371,7 +14238,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14371
14238
|
return node.expression !== expression ? update(createNonNullExpression(expression), node) : node;
|
|
14372
14239
|
}
|
|
14373
14240
|
function createSatisfiesExpression(expression, type) {
|
|
14374
|
-
const node =
|
|
14241
|
+
const node = createBaseExpression(235 /* SatisfiesExpression */);
|
|
14375
14242
|
node.expression = expression;
|
|
14376
14243
|
node.type = type;
|
|
14377
14244
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;
|
|
@@ -14381,7 +14248,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14381
14248
|
return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node;
|
|
14382
14249
|
}
|
|
14383
14250
|
function createNonNullChain(expression) {
|
|
14384
|
-
const node =
|
|
14251
|
+
const node = createBaseExpression(232 /* NonNullExpression */);
|
|
14385
14252
|
node.flags |= 32 /* OptionalChain */;
|
|
14386
14253
|
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true);
|
|
14387
14254
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -14392,7 +14259,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14392
14259
|
return node.expression !== expression ? update(createNonNullChain(expression), node) : node;
|
|
14393
14260
|
}
|
|
14394
14261
|
function createMetaProperty(keywordToken, name) {
|
|
14395
|
-
const node =
|
|
14262
|
+
const node = createBaseExpression(233 /* MetaProperty */);
|
|
14396
14263
|
node.keywordToken = keywordToken;
|
|
14397
14264
|
node.name = name;
|
|
14398
14265
|
node.transformFlags |= propagateChildFlags(node.name);
|
|
@@ -14406,7 +14273,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14406
14273
|
default:
|
|
14407
14274
|
return Debug.assertNever(keywordToken);
|
|
14408
14275
|
}
|
|
14409
|
-
node.flowNode = void 0;
|
|
14410
14276
|
return node;
|
|
14411
14277
|
}
|
|
14412
14278
|
function updateMetaProperty(node, name) {
|
|
@@ -14432,45 +14298,31 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14432
14298
|
node.statements = createNodeArray(statements);
|
|
14433
14299
|
node.multiLine = multiLine;
|
|
14434
14300
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
14435
|
-
node.jsDoc = void 0;
|
|
14436
|
-
node.jsDocCache = void 0;
|
|
14437
|
-
node.locals = void 0;
|
|
14438
|
-
node.nextContainer = void 0;
|
|
14439
14301
|
return node;
|
|
14440
14302
|
}
|
|
14441
14303
|
function updateBlock(node, statements) {
|
|
14442
14304
|
return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node;
|
|
14443
14305
|
}
|
|
14444
14306
|
function createVariableStatement(modifiers, declarationList) {
|
|
14445
|
-
const node =
|
|
14307
|
+
const node = createBaseDeclaration(240 /* VariableStatement */);
|
|
14446
14308
|
node.modifiers = asNodeArray(modifiers);
|
|
14447
14309
|
node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
|
|
14448
14310
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList);
|
|
14449
14311
|
if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
14450
14312
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14451
14313
|
}
|
|
14452
|
-
node.illegalDecorators = void 0;
|
|
14453
|
-
node.jsDoc = void 0;
|
|
14454
|
-
node.jsDocCache = void 0;
|
|
14455
|
-
node.flowNode = void 0;
|
|
14456
14314
|
return node;
|
|
14457
14315
|
}
|
|
14458
14316
|
function updateVariableStatement(node, modifiers, declarationList) {
|
|
14459
14317
|
return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node;
|
|
14460
14318
|
}
|
|
14461
14319
|
function createEmptyStatement() {
|
|
14462
|
-
|
|
14463
|
-
node.jsDoc = void 0;
|
|
14464
|
-
node.jsDocCache = void 0;
|
|
14465
|
-
return node;
|
|
14320
|
+
return createBaseNode(239 /* EmptyStatement */);
|
|
14466
14321
|
}
|
|
14467
14322
|
function createExpressionStatement(expression) {
|
|
14468
14323
|
const node = createBaseNode(241 /* ExpressionStatement */);
|
|
14469
14324
|
node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);
|
|
14470
14325
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14471
|
-
node.jsDoc = void 0;
|
|
14472
|
-
node.jsDocCache = void 0;
|
|
14473
|
-
node.flowNode = void 0;
|
|
14474
14326
|
return node;
|
|
14475
14327
|
}
|
|
14476
14328
|
function updateExpressionStatement(node, expression) {
|
|
@@ -14482,9 +14334,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14482
14334
|
node.thenStatement = asEmbeddedStatement(thenStatement);
|
|
14483
14335
|
node.elseStatement = asEmbeddedStatement(elseStatement);
|
|
14484
14336
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement);
|
|
14485
|
-
node.jsDoc = void 0;
|
|
14486
|
-
node.jsDocCache = void 0;
|
|
14487
|
-
node.flowNode = void 0;
|
|
14488
14337
|
return node;
|
|
14489
14338
|
}
|
|
14490
14339
|
function updateIfStatement(node, expression, thenStatement, elseStatement) {
|
|
@@ -14495,9 +14344,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14495
14344
|
node.statement = asEmbeddedStatement(statement);
|
|
14496
14345
|
node.expression = expression;
|
|
14497
14346
|
node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression);
|
|
14498
|
-
node.jsDoc = void 0;
|
|
14499
|
-
node.jsDocCache = void 0;
|
|
14500
|
-
node.flowNode = void 0;
|
|
14501
14347
|
return node;
|
|
14502
14348
|
}
|
|
14503
14349
|
function updateDoStatement(node, statement, expression) {
|
|
@@ -14508,9 +14354,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14508
14354
|
node.expression = expression;
|
|
14509
14355
|
node.statement = asEmbeddedStatement(statement);
|
|
14510
14356
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
14511
|
-
node.jsDoc = void 0;
|
|
14512
|
-
node.jsDocCache = void 0;
|
|
14513
|
-
node.flowNode = void 0;
|
|
14514
14357
|
return node;
|
|
14515
14358
|
}
|
|
14516
14359
|
function updateWhileStatement(node, expression, statement) {
|
|
@@ -14523,11 +14366,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14523
14366
|
node.incrementor = incrementor;
|
|
14524
14367
|
node.statement = asEmbeddedStatement(statement);
|
|
14525
14368
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement);
|
|
14526
|
-
node.jsDoc = void 0;
|
|
14527
|
-
node.jsDocCache = void 0;
|
|
14528
|
-
node.locals = void 0;
|
|
14529
|
-
node.nextContainer = void 0;
|
|
14530
|
-
node.flowNode = void 0;
|
|
14531
14369
|
return node;
|
|
14532
14370
|
}
|
|
14533
14371
|
function updateForStatement(node, initializer, condition, incrementor, statement) {
|
|
@@ -14539,11 +14377,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14539
14377
|
node.expression = expression;
|
|
14540
14378
|
node.statement = asEmbeddedStatement(statement);
|
|
14541
14379
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
14542
|
-
node.jsDoc = void 0;
|
|
14543
|
-
node.jsDocCache = void 0;
|
|
14544
|
-
node.locals = void 0;
|
|
14545
|
-
node.nextContainer = void 0;
|
|
14546
|
-
node.flowNode = void 0;
|
|
14547
14380
|
return node;
|
|
14548
14381
|
}
|
|
14549
14382
|
function updateForInStatement(node, initializer, expression, statement) {
|
|
@@ -14558,11 +14391,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14558
14391
|
node.transformFlags |= propagateChildFlags(node.awaitModifier) | propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement) | 1024 /* ContainsES2015 */;
|
|
14559
14392
|
if (awaitModifier)
|
|
14560
14393
|
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
14561
|
-
node.jsDoc = void 0;
|
|
14562
|
-
node.jsDocCache = void 0;
|
|
14563
|
-
node.locals = void 0;
|
|
14564
|
-
node.nextContainer = void 0;
|
|
14565
|
-
node.flowNode = void 0;
|
|
14566
14394
|
return node;
|
|
14567
14395
|
}
|
|
14568
14396
|
function updateForOfStatement(node, awaitModifier, initializer, expression, statement) {
|
|
@@ -14572,9 +14400,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14572
14400
|
const node = createBaseNode(248 /* ContinueStatement */);
|
|
14573
14401
|
node.label = asName(label);
|
|
14574
14402
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14575
|
-
node.jsDoc = void 0;
|
|
14576
|
-
node.jsDocCache = void 0;
|
|
14577
|
-
node.flowNode = void 0;
|
|
14578
14403
|
return node;
|
|
14579
14404
|
}
|
|
14580
14405
|
function updateContinueStatement(node, label) {
|
|
@@ -14584,9 +14409,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14584
14409
|
const node = createBaseNode(249 /* BreakStatement */);
|
|
14585
14410
|
node.label = asName(label);
|
|
14586
14411
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14587
|
-
node.jsDoc = void 0;
|
|
14588
|
-
node.jsDocCache = void 0;
|
|
14589
|
-
node.flowNode = void 0;
|
|
14590
14412
|
return node;
|
|
14591
14413
|
}
|
|
14592
14414
|
function updateBreakStatement(node, label) {
|
|
@@ -14596,9 +14418,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14596
14418
|
const node = createBaseNode(250 /* ReturnStatement */);
|
|
14597
14419
|
node.expression = expression;
|
|
14598
14420
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14599
|
-
node.jsDoc = void 0;
|
|
14600
|
-
node.jsDocCache = void 0;
|
|
14601
|
-
node.flowNode = void 0;
|
|
14602
14421
|
return node;
|
|
14603
14422
|
}
|
|
14604
14423
|
function updateReturnStatement(node, expression) {
|
|
@@ -14609,9 +14428,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14609
14428
|
node.expression = expression;
|
|
14610
14429
|
node.statement = asEmbeddedStatement(statement);
|
|
14611
14430
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
14612
|
-
node.jsDoc = void 0;
|
|
14613
|
-
node.jsDocCache = void 0;
|
|
14614
|
-
node.flowNode = void 0;
|
|
14615
14431
|
return node;
|
|
14616
14432
|
}
|
|
14617
14433
|
function updateWithStatement(node, expression, statement) {
|
|
@@ -14622,10 +14438,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14622
14438
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
14623
14439
|
node.caseBlock = caseBlock;
|
|
14624
14440
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock);
|
|
14625
|
-
node.jsDoc = void 0;
|
|
14626
|
-
node.jsDocCache = void 0;
|
|
14627
|
-
node.flowNode = void 0;
|
|
14628
|
-
node.possiblyExhaustive = false;
|
|
14629
14441
|
return node;
|
|
14630
14442
|
}
|
|
14631
14443
|
function updateSwitchStatement(node, expression, caseBlock) {
|
|
@@ -14636,9 +14448,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14636
14448
|
node.label = asName(label);
|
|
14637
14449
|
node.statement = asEmbeddedStatement(statement);
|
|
14638
14450
|
node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement);
|
|
14639
|
-
node.jsDoc = void 0;
|
|
14640
|
-
node.jsDocCache = void 0;
|
|
14641
|
-
node.flowNode = void 0;
|
|
14642
14451
|
return node;
|
|
14643
14452
|
}
|
|
14644
14453
|
function updateLabeledStatement(node, label, statement) {
|
|
@@ -14648,9 +14457,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14648
14457
|
const node = createBaseNode(254 /* ThrowStatement */);
|
|
14649
14458
|
node.expression = expression;
|
|
14650
14459
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14651
|
-
node.jsDoc = void 0;
|
|
14652
|
-
node.jsDocCache = void 0;
|
|
14653
|
-
node.flowNode = void 0;
|
|
14654
14460
|
return node;
|
|
14655
14461
|
}
|
|
14656
14462
|
function updateThrowStatement(node, expression) {
|
|
@@ -14662,31 +14468,27 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14662
14468
|
node.catchClause = catchClause;
|
|
14663
14469
|
node.finallyBlock = finallyBlock;
|
|
14664
14470
|
node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock);
|
|
14665
|
-
node.jsDoc = void 0;
|
|
14666
|
-
node.jsDocCache = void 0;
|
|
14667
|
-
node.flowNode = void 0;
|
|
14668
14471
|
return node;
|
|
14669
14472
|
}
|
|
14670
14473
|
function updateTryStatement(node, tryBlock, catchClause, finallyBlock) {
|
|
14671
14474
|
return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node;
|
|
14672
14475
|
}
|
|
14673
14476
|
function createDebuggerStatement() {
|
|
14674
|
-
|
|
14675
|
-
node.jsDoc = void 0;
|
|
14676
|
-
node.jsDocCache = void 0;
|
|
14677
|
-
node.flowNode = void 0;
|
|
14678
|
-
return node;
|
|
14477
|
+
return createBaseNode(256 /* DebuggerStatement */);
|
|
14679
14478
|
}
|
|
14680
14479
|
function createVariableDeclaration(name, exclamationToken, type, initializer) {
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14480
|
+
const node = createBaseVariableLikeDeclaration(
|
|
14481
|
+
257 /* VariableDeclaration */,
|
|
14482
|
+
void 0,
|
|
14483
|
+
name,
|
|
14484
|
+
type,
|
|
14485
|
+
initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer)
|
|
14486
|
+
);
|
|
14684
14487
|
node.exclamationToken = exclamationToken;
|
|
14685
|
-
node.
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
node.jsDocCache = void 0;
|
|
14488
|
+
node.transformFlags |= propagateChildFlags(node.exclamationToken);
|
|
14489
|
+
if (exclamationToken) {
|
|
14490
|
+
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
14491
|
+
}
|
|
14690
14492
|
return node;
|
|
14691
14493
|
}
|
|
14692
14494
|
function updateVariableDeclaration(node, name, exclamationToken, type, initializer) {
|
|
@@ -14706,30 +14508,31 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14706
14508
|
return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node;
|
|
14707
14509
|
}
|
|
14708
14510
|
function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
14709
|
-
const node =
|
|
14710
|
-
|
|
14511
|
+
const node = createBaseFunctionLikeDeclaration(
|
|
14512
|
+
259 /* FunctionDeclaration */,
|
|
14513
|
+
modifiers,
|
|
14514
|
+
name,
|
|
14515
|
+
typeParameters,
|
|
14516
|
+
parameters,
|
|
14517
|
+
type,
|
|
14518
|
+
body
|
|
14519
|
+
);
|
|
14711
14520
|
node.asteriskToken = asteriskToken;
|
|
14712
|
-
node.name = asName(name);
|
|
14713
|
-
node.typeParameters = asNodeArray(typeParameters);
|
|
14714
|
-
node.parameters = createNodeArray(parameters);
|
|
14715
|
-
node.type = type;
|
|
14716
|
-
node.body = body;
|
|
14717
14521
|
if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
14718
14522
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14719
14523
|
} else {
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14524
|
+
node.transformFlags |= propagateChildFlags(node.asteriskToken) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14525
|
+
if (modifiersToFlags(node.modifiers) & 512 /* Async */) {
|
|
14526
|
+
if (node.asteriskToken) {
|
|
14527
|
+
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
14528
|
+
} else {
|
|
14529
|
+
node.transformFlags |= 256 /* ContainsES2017 */;
|
|
14530
|
+
}
|
|
14531
|
+
} else if (node.asteriskToken) {
|
|
14532
|
+
node.transformFlags |= 2048 /* ContainsGenerator */;
|
|
14533
|
+
}
|
|
14724
14534
|
}
|
|
14725
14535
|
node.illegalDecorators = void 0;
|
|
14726
|
-
node.typeArguments = void 0;
|
|
14727
|
-
node.jsDoc = void 0;
|
|
14728
|
-
node.jsDocCache = void 0;
|
|
14729
|
-
node.locals = void 0;
|
|
14730
|
-
node.nextContainer = void 0;
|
|
14731
|
-
node.endFlowNode = void 0;
|
|
14732
|
-
node.returnFlowNode = void 0;
|
|
14733
14536
|
return node;
|
|
14734
14537
|
}
|
|
14735
14538
|
function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
@@ -14742,38 +14545,38 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14742
14545
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
14743
14546
|
}
|
|
14744
14547
|
function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14745
|
-
const node =
|
|
14746
|
-
|
|
14747
|
-
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14548
|
+
const node = createBaseClassLikeDeclaration(
|
|
14549
|
+
260 /* ClassDeclaration */,
|
|
14550
|
+
modifiers,
|
|
14551
|
+
name,
|
|
14552
|
+
typeParameters,
|
|
14553
|
+
heritageClauses,
|
|
14554
|
+
members
|
|
14555
|
+
);
|
|
14751
14556
|
if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
14752
14557
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14753
14558
|
} else {
|
|
14754
|
-
node.transformFlags |=
|
|
14559
|
+
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
14755
14560
|
if (node.transformFlags & 8192 /* ContainsTypeScriptClassSyntax */) {
|
|
14756
14561
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
14757
14562
|
}
|
|
14758
14563
|
}
|
|
14759
|
-
node.jsDoc = void 0;
|
|
14760
|
-
node.jsDocCache = void 0;
|
|
14761
14564
|
return node;
|
|
14762
14565
|
}
|
|
14763
14566
|
function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
14764
14567
|
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node;
|
|
14765
14568
|
}
|
|
14766
14569
|
function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14767
|
-
const node =
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14570
|
+
const node = createBaseInterfaceOrClassLikeDeclaration(
|
|
14571
|
+
261 /* InterfaceDeclaration */,
|
|
14572
|
+
modifiers,
|
|
14573
|
+
name,
|
|
14574
|
+
typeParameters,
|
|
14575
|
+
heritageClauses
|
|
14576
|
+
);
|
|
14772
14577
|
node.members = createNodeArray(members);
|
|
14773
14578
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14774
14579
|
node.illegalDecorators = void 0;
|
|
14775
|
-
node.jsDoc = void 0;
|
|
14776
|
-
node.jsDocCache = void 0;
|
|
14777
14580
|
return node;
|
|
14778
14581
|
}
|
|
14779
14582
|
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -14786,17 +14589,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14786
14589
|
return update(updated, original);
|
|
14787
14590
|
}
|
|
14788
14591
|
function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
|
|
14789
|
-
const node =
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14592
|
+
const node = createBaseGenericNamedDeclaration(
|
|
14593
|
+
262 /* TypeAliasDeclaration */,
|
|
14594
|
+
modifiers,
|
|
14595
|
+
name,
|
|
14596
|
+
typeParameters
|
|
14597
|
+
);
|
|
14793
14598
|
node.type = type;
|
|
14794
14599
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14795
14600
|
node.illegalDecorators = void 0;
|
|
14796
|
-
node.jsDoc = void 0;
|
|
14797
|
-
node.jsDocCache = void 0;
|
|
14798
|
-
node.locals = void 0;
|
|
14799
|
-
node.nextContainer = void 0;
|
|
14800
14601
|
return node;
|
|
14801
14602
|
}
|
|
14802
14603
|
function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
|
|
@@ -14809,15 +14610,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14809
14610
|
return update(updated, original);
|
|
14810
14611
|
}
|
|
14811
14612
|
function createEnumDeclaration(modifiers, name, members) {
|
|
14812
|
-
const node =
|
|
14813
|
-
|
|
14814
|
-
|
|
14613
|
+
const node = createBaseNamedDeclaration(
|
|
14614
|
+
263 /* EnumDeclaration */,
|
|
14615
|
+
modifiers,
|
|
14616
|
+
name
|
|
14617
|
+
);
|
|
14815
14618
|
node.members = createNodeArray(members);
|
|
14816
|
-
node.transformFlags |= propagateChildrenFlags(node.
|
|
14619
|
+
node.transformFlags |= propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */;
|
|
14817
14620
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14818
14621
|
node.illegalDecorators = void 0;
|
|
14819
|
-
node.jsDoc = void 0;
|
|
14820
|
-
node.jsDocCache = void 0;
|
|
14821
14622
|
return node;
|
|
14822
14623
|
}
|
|
14823
14624
|
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
@@ -14842,10 +14643,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14842
14643
|
}
|
|
14843
14644
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14844
14645
|
node.illegalDecorators = void 0;
|
|
14845
|
-
node.jsDoc = void 0;
|
|
14846
|
-
node.jsDocCache = void 0;
|
|
14847
|
-
node.locals = void 0;
|
|
14848
|
-
node.nextContainer = void 0;
|
|
14849
14646
|
return node;
|
|
14850
14647
|
}
|
|
14851
14648
|
function updateModuleDeclaration(node, modifiers, name, body) {
|
|
@@ -14861,8 +14658,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14861
14658
|
const node = createBaseNode(265 /* ModuleBlock */);
|
|
14862
14659
|
node.statements = createNodeArray(statements);
|
|
14863
14660
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
14864
|
-
node.jsDoc = void 0;
|
|
14865
|
-
node.jsDocCache = void 0;
|
|
14866
14661
|
return node;
|
|
14867
14662
|
}
|
|
14868
14663
|
function updateModuleBlock(node, statements) {
|
|
@@ -14872,21 +14667,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14872
14667
|
const node = createBaseNode(266 /* CaseBlock */);
|
|
14873
14668
|
node.clauses = createNodeArray(clauses);
|
|
14874
14669
|
node.transformFlags |= propagateChildrenFlags(node.clauses);
|
|
14875
|
-
node.locals = void 0;
|
|
14876
|
-
node.nextContainer = void 0;
|
|
14877
14670
|
return node;
|
|
14878
14671
|
}
|
|
14879
14672
|
function updateCaseBlock(node, clauses) {
|
|
14880
14673
|
return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node;
|
|
14881
14674
|
}
|
|
14882
14675
|
function createNamespaceExportDeclaration(name) {
|
|
14883
|
-
const node =
|
|
14884
|
-
|
|
14885
|
-
|
|
14676
|
+
const node = createBaseNamedDeclaration(
|
|
14677
|
+
267 /* NamespaceExportDeclaration */,
|
|
14678
|
+
void 0,
|
|
14679
|
+
name
|
|
14680
|
+
);
|
|
14681
|
+
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14886
14682
|
node.illegalDecorators = void 0;
|
|
14887
14683
|
node.modifiers = void 0;
|
|
14888
|
-
node.jsDoc = void 0;
|
|
14889
|
-
node.jsDocCache = void 0;
|
|
14890
14684
|
return node;
|
|
14891
14685
|
}
|
|
14892
14686
|
function updateNamespaceExportDeclaration(node, name) {
|
|
@@ -14900,19 +14694,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14900
14694
|
return update(updated, original);
|
|
14901
14695
|
}
|
|
14902
14696
|
function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) {
|
|
14903
|
-
const node =
|
|
14904
|
-
|
|
14905
|
-
|
|
14697
|
+
const node = createBaseNamedDeclaration(
|
|
14698
|
+
268 /* ImportEqualsDeclaration */,
|
|
14699
|
+
modifiers,
|
|
14700
|
+
name
|
|
14701
|
+
);
|
|
14906
14702
|
node.isTypeOnly = isTypeOnly;
|
|
14907
14703
|
node.moduleReference = moduleReference;
|
|
14908
|
-
node.transformFlags |=
|
|
14909
|
-
if (!isExternalModuleReference(node.moduleReference))
|
|
14704
|
+
node.transformFlags |= propagateChildFlags(node.moduleReference);
|
|
14705
|
+
if (!isExternalModuleReference(node.moduleReference))
|
|
14910
14706
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
14911
|
-
}
|
|
14912
14707
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14913
14708
|
node.illegalDecorators = void 0;
|
|
14914
|
-
node.jsDoc = void 0;
|
|
14915
|
-
node.jsDocCache = void 0;
|
|
14916
14709
|
return node;
|
|
14917
14710
|
}
|
|
14918
14711
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
@@ -14925,7 +14718,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14925
14718
|
return update(updated, original);
|
|
14926
14719
|
}
|
|
14927
14720
|
function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
|
|
14928
|
-
const node =
|
|
14721
|
+
const node = createBaseDeclaration(269 /* ImportDeclaration */);
|
|
14929
14722
|
node.modifiers = asNodeArray(modifiers);
|
|
14930
14723
|
node.importClause = importClause;
|
|
14931
14724
|
node.moduleSpecifier = moduleSpecifier;
|
|
@@ -14933,8 +14726,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14933
14726
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14934
14727
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14935
14728
|
node.illegalDecorators = void 0;
|
|
14936
|
-
node.jsDoc = void 0;
|
|
14937
|
-
node.jsDocCache = void 0;
|
|
14938
14729
|
return node;
|
|
14939
14730
|
}
|
|
14940
14731
|
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
@@ -14947,7 +14738,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14947
14738
|
return update(updated, original);
|
|
14948
14739
|
}
|
|
14949
14740
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
14950
|
-
const node =
|
|
14741
|
+
const node = createBaseNode(270 /* ImportClause */);
|
|
14951
14742
|
node.isTypeOnly = isTypeOnly;
|
|
14952
14743
|
node.name = name;
|
|
14953
14744
|
node.namedBindings = namedBindings;
|
|
@@ -14991,7 +14782,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14991
14782
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
14992
14783
|
}
|
|
14993
14784
|
function createNamespaceImport(name) {
|
|
14994
|
-
const node =
|
|
14785
|
+
const node = createBaseNode(271 /* NamespaceImport */);
|
|
14995
14786
|
node.name = name;
|
|
14996
14787
|
node.transformFlags |= propagateChildFlags(node.name);
|
|
14997
14788
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
@@ -15001,7 +14792,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15001
14792
|
return node.name !== name ? update(createNamespaceImport(name), node) : node;
|
|
15002
14793
|
}
|
|
15003
14794
|
function createNamespaceExport(name) {
|
|
15004
|
-
const node =
|
|
14795
|
+
const node = createBaseNode(277 /* NamespaceExport */);
|
|
15005
14796
|
node.name = name;
|
|
15006
14797
|
node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */;
|
|
15007
14798
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
@@ -15021,7 +14812,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15021
14812
|
return node.elements !== elements ? update(createNamedImports(elements), node) : node;
|
|
15022
14813
|
}
|
|
15023
14814
|
function createImportSpecifier(isTypeOnly, propertyName, name) {
|
|
15024
|
-
const node =
|
|
14815
|
+
const node = createBaseNode(273 /* ImportSpecifier */);
|
|
15025
14816
|
node.isTypeOnly = isTypeOnly;
|
|
15026
14817
|
node.propertyName = propertyName;
|
|
15027
14818
|
node.name = name;
|
|
@@ -15040,8 +14831,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15040
14831
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
15041
14832
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15042
14833
|
node.illegalDecorators = void 0;
|
|
15043
|
-
node.jsDoc = void 0;
|
|
15044
|
-
node.jsDocCache = void 0;
|
|
15045
14834
|
return node;
|
|
15046
14835
|
}
|
|
15047
14836
|
function updateExportAssignment(node, modifiers, expression) {
|
|
@@ -15063,8 +14852,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15063
14852
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15064
14853
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15065
14854
|
node.illegalDecorators = void 0;
|
|
15066
|
-
node.jsDoc = void 0;
|
|
15067
|
-
node.jsDocCache = void 0;
|
|
15068
14855
|
return node;
|
|
15069
14856
|
}
|
|
15070
14857
|
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
@@ -15093,8 +14880,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15093
14880
|
node.name = asName(name);
|
|
15094
14881
|
node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);
|
|
15095
14882
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15096
|
-
node.jsDoc = void 0;
|
|
15097
|
-
node.jsDocCache = void 0;
|
|
15098
14883
|
return node;
|
|
15099
14884
|
}
|
|
15100
14885
|
function updateExportSpecifier(node, isTypeOnly, propertyName, name) {
|
|
@@ -15102,8 +14887,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15102
14887
|
}
|
|
15103
14888
|
function createMissingDeclaration() {
|
|
15104
14889
|
const node = createBaseDeclaration(279 /* MissingDeclaration */);
|
|
15105
|
-
node.jsDoc = void 0;
|
|
15106
|
-
node.jsDocCache = void 0;
|
|
15107
14890
|
return node;
|
|
15108
14891
|
}
|
|
15109
14892
|
function createExternalModuleReference(expression) {
|
|
@@ -15139,22 +14922,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15139
14922
|
return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node;
|
|
15140
14923
|
}
|
|
15141
14924
|
function createJSDocFunctionType(parameters, type) {
|
|
15142
|
-
const node =
|
|
15143
|
-
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
node.typeArguments = void 0;
|
|
14925
|
+
const node = createBaseSignatureDeclaration(
|
|
14926
|
+
320 /* JSDocFunctionType */,
|
|
14927
|
+
void 0,
|
|
14928
|
+
void 0,
|
|
14929
|
+
void 0,
|
|
14930
|
+
parameters,
|
|
14931
|
+
type
|
|
14932
|
+
);
|
|
15151
14933
|
return node;
|
|
15152
14934
|
}
|
|
15153
14935
|
function updateJSDocFunctionType(node, parameters, type) {
|
|
15154
14936
|
return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node;
|
|
15155
14937
|
}
|
|
15156
14938
|
function createJSDocTypeLiteral(propertyTags, isArrayType = false) {
|
|
15157
|
-
const node =
|
|
14939
|
+
const node = createBaseNode(325 /* JSDocTypeLiteral */);
|
|
15158
14940
|
node.jsDocPropertyTags = asNodeArray(propertyTags);
|
|
15159
14941
|
node.isArrayType = isArrayType;
|
|
15160
14942
|
return node;
|
|
@@ -15171,14 +14953,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15171
14953
|
return node.type !== type ? update(createJSDocTypeExpression(type), node) : node;
|
|
15172
14954
|
}
|
|
15173
14955
|
function createJSDocSignature(typeParameters, parameters, type) {
|
|
15174
|
-
const node =
|
|
14956
|
+
const node = createBaseNode(326 /* JSDocSignature */);
|
|
15175
14957
|
node.typeParameters = asNodeArray(typeParameters);
|
|
15176
14958
|
node.parameters = createNodeArray(parameters);
|
|
15177
14959
|
node.type = type;
|
|
15178
|
-
node.jsDoc = void 0;
|
|
15179
|
-
node.jsDocCache = void 0;
|
|
15180
|
-
node.locals = void 0;
|
|
15181
|
-
node.nextContainer = void 0;
|
|
15182
14960
|
return node;
|
|
15183
14961
|
}
|
|
15184
14962
|
function updateJSDocSignature(node, typeParameters, parameters, type) {
|
|
@@ -15194,12 +14972,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15194
14972
|
node.comment = comment;
|
|
15195
14973
|
return node;
|
|
15196
14974
|
}
|
|
15197
|
-
function createBaseJSDocTagDeclaration(kind, tagName, comment) {
|
|
15198
|
-
const node = createBaseDeclaration(kind);
|
|
15199
|
-
node.tagName = tagName;
|
|
15200
|
-
node.comment = comment;
|
|
15201
|
-
return node;
|
|
15202
|
-
}
|
|
15203
14975
|
function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
|
|
15204
14976
|
const node = createBaseJSDocTag(347 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment);
|
|
15205
14977
|
node.constraint = constraint;
|
|
@@ -15210,19 +14982,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15210
14982
|
return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node;
|
|
15211
14983
|
}
|
|
15212
14984
|
function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {
|
|
15213
|
-
const node =
|
|
14985
|
+
const node = createBaseJSDocTag(348 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment);
|
|
15214
14986
|
node.typeExpression = typeExpression;
|
|
15215
14987
|
node.fullName = fullName;
|
|
15216
14988
|
node.name = getJSDocTypeAliasName(fullName);
|
|
15217
|
-
node.locals = void 0;
|
|
15218
|
-
node.nextContainer = void 0;
|
|
15219
14989
|
return node;
|
|
15220
14990
|
}
|
|
15221
14991
|
function updateJSDocTypedefTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) {
|
|
15222
14992
|
return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node;
|
|
15223
14993
|
}
|
|
15224
14994
|
function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
15225
|
-
const node =
|
|
14995
|
+
const node = createBaseJSDocTag(343 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment);
|
|
15226
14996
|
node.typeExpression = typeExpression;
|
|
15227
14997
|
node.name = name;
|
|
15228
14998
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -15233,7 +15003,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15233
15003
|
return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node;
|
|
15234
15004
|
}
|
|
15235
15005
|
function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
15236
|
-
const node =
|
|
15006
|
+
const node = createBaseJSDocTag(350 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment);
|
|
15237
15007
|
node.typeExpression = typeExpression;
|
|
15238
15008
|
node.name = name;
|
|
15239
15009
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -15244,12 +15014,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15244
15014
|
return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node;
|
|
15245
15015
|
}
|
|
15246
15016
|
function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {
|
|
15247
|
-
const node =
|
|
15017
|
+
const node = createBaseJSDocTag(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment);
|
|
15248
15018
|
node.typeExpression = typeExpression;
|
|
15249
15019
|
node.fullName = fullName;
|
|
15250
15020
|
node.name = getJSDocTypeAliasName(fullName);
|
|
15251
|
-
node.locals = void 0;
|
|
15252
|
-
node.nextContainer = void 0;
|
|
15253
15021
|
return node;
|
|
15254
15022
|
}
|
|
15255
15023
|
function updateJSDocCallbackTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) {
|
|
@@ -15346,16 +15114,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15346
15114
|
function updateJSDocUnknownTag(node, tagName, comment) {
|
|
15347
15115
|
return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node;
|
|
15348
15116
|
}
|
|
15349
|
-
function createJSDocEnumTag(tagName, typeExpression, comment) {
|
|
15350
|
-
const node = createBaseJSDocTagDeclaration(342 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(342 /* JSDocEnumTag */)), comment);
|
|
15351
|
-
node.typeExpression = typeExpression;
|
|
15352
|
-
node.locals = void 0;
|
|
15353
|
-
node.nextContainer = void 0;
|
|
15354
|
-
return node;
|
|
15355
|
-
}
|
|
15356
|
-
function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {
|
|
15357
|
-
return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node;
|
|
15358
|
-
}
|
|
15359
15117
|
function createJSDocText(text) {
|
|
15360
15118
|
const node = createBaseNode(324 /* JSDocText */);
|
|
15361
15119
|
node.text = text;
|
|
@@ -15453,7 +15211,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15453
15211
|
return node;
|
|
15454
15212
|
}
|
|
15455
15213
|
function createJsxAttribute(name, initializer) {
|
|
15456
|
-
const node =
|
|
15214
|
+
const node = createBaseNode(288 /* JsxAttribute */);
|
|
15457
15215
|
node.name = name;
|
|
15458
15216
|
node.initializer = initializer;
|
|
15459
15217
|
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */;
|
|
@@ -15463,7 +15221,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15463
15221
|
return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node;
|
|
15464
15222
|
}
|
|
15465
15223
|
function createJsxAttributes(properties) {
|
|
15466
|
-
const node =
|
|
15224
|
+
const node = createBaseNode(289 /* JsxAttributes */);
|
|
15467
15225
|
node.properties = createNodeArray(properties);
|
|
15468
15226
|
node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */;
|
|
15469
15227
|
return node;
|
|
@@ -15495,8 +15253,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15495
15253
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
15496
15254
|
node.statements = createNodeArray(statements);
|
|
15497
15255
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements);
|
|
15498
|
-
node.jsDoc = void 0;
|
|
15499
|
-
node.jsDocCache = void 0;
|
|
15500
15256
|
return node;
|
|
15501
15257
|
}
|
|
15502
15258
|
function updateCaseClause(node, expression, statements) {
|
|
@@ -15533,27 +15289,36 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15533
15289
|
}
|
|
15534
15290
|
function createCatchClause(variableDeclaration, block) {
|
|
15535
15291
|
const node = createBaseNode(295 /* CatchClause */);
|
|
15536
|
-
|
|
15292
|
+
if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) {
|
|
15293
|
+
variableDeclaration = createVariableDeclaration(
|
|
15294
|
+
variableDeclaration,
|
|
15295
|
+
void 0,
|
|
15296
|
+
void 0,
|
|
15297
|
+
void 0
|
|
15298
|
+
);
|
|
15299
|
+
}
|
|
15300
|
+
node.variableDeclaration = variableDeclaration;
|
|
15537
15301
|
node.block = block;
|
|
15538
|
-
node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block)
|
|
15539
|
-
|
|
15540
|
-
|
|
15302
|
+
node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block);
|
|
15303
|
+
if (!variableDeclaration)
|
|
15304
|
+
node.transformFlags |= 64 /* ContainsES2019 */;
|
|
15541
15305
|
return node;
|
|
15542
15306
|
}
|
|
15543
15307
|
function updateCatchClause(node, variableDeclaration, block) {
|
|
15544
15308
|
return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node;
|
|
15545
15309
|
}
|
|
15546
15310
|
function createPropertyAssignment(name, initializer) {
|
|
15547
|
-
const node =
|
|
15548
|
-
|
|
15311
|
+
const node = createBaseNamedDeclaration(
|
|
15312
|
+
299 /* PropertyAssignment */,
|
|
15313
|
+
void 0,
|
|
15314
|
+
name
|
|
15315
|
+
);
|
|
15549
15316
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
15550
|
-
node.transformFlags |=
|
|
15317
|
+
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer);
|
|
15551
15318
|
node.illegalDecorators = void 0;
|
|
15552
15319
|
node.modifiers = void 0;
|
|
15553
15320
|
node.questionToken = void 0;
|
|
15554
15321
|
node.exclamationToken = void 0;
|
|
15555
|
-
node.jsDoc = void 0;
|
|
15556
|
-
node.jsDocCache = void 0;
|
|
15557
15322
|
return node;
|
|
15558
15323
|
}
|
|
15559
15324
|
function updatePropertyAssignment(node, name, initializer) {
|
|
@@ -15569,17 +15334,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15569
15334
|
return update(updated, original);
|
|
15570
15335
|
}
|
|
15571
15336
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
15572
|
-
const node =
|
|
15573
|
-
|
|
15337
|
+
const node = createBaseNamedDeclaration(
|
|
15338
|
+
300 /* ShorthandPropertyAssignment */,
|
|
15339
|
+
void 0,
|
|
15340
|
+
name
|
|
15341
|
+
);
|
|
15574
15342
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
15575
|
-
node.transformFlags |=
|
|
15343
|
+
node.transformFlags |= propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */;
|
|
15576
15344
|
node.equalsToken = void 0;
|
|
15577
15345
|
node.illegalDecorators = void 0;
|
|
15578
15346
|
node.modifiers = void 0;
|
|
15579
15347
|
node.questionToken = void 0;
|
|
15580
15348
|
node.exclamationToken = void 0;
|
|
15581
|
-
node.jsDoc = void 0;
|
|
15582
|
-
node.jsDocCache = void 0;
|
|
15583
15349
|
return node;
|
|
15584
15350
|
}
|
|
15585
15351
|
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
|
|
@@ -15596,23 +15362,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15596
15362
|
return update(updated, original);
|
|
15597
15363
|
}
|
|
15598
15364
|
function createSpreadAssignment(expression) {
|
|
15599
|
-
const node =
|
|
15365
|
+
const node = createBaseNode(301 /* SpreadAssignment */);
|
|
15600
15366
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
15601
15367
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;
|
|
15602
|
-
node.jsDoc = void 0;
|
|
15603
|
-
node.jsDocCache = void 0;
|
|
15604
15368
|
return node;
|
|
15605
15369
|
}
|
|
15606
15370
|
function updateSpreadAssignment(node, expression) {
|
|
15607
15371
|
return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node;
|
|
15608
15372
|
}
|
|
15609
15373
|
function createEnumMember(name, initializer) {
|
|
15610
|
-
const node =
|
|
15374
|
+
const node = createBaseNode(302 /* EnumMember */);
|
|
15611
15375
|
node.name = asName(name);
|
|
15612
15376
|
node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
15613
15377
|
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */;
|
|
15614
|
-
node.jsDoc = void 0;
|
|
15615
|
-
node.jsDocCache = void 0;
|
|
15616
15378
|
return node;
|
|
15617
15379
|
}
|
|
15618
15380
|
function updateEnumMember(node, name, initializer) {
|
|
@@ -15623,111 +15385,33 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15623
15385
|
node.statements = createNodeArray(statements);
|
|
15624
15386
|
node.endOfFileToken = endOfFileToken;
|
|
15625
15387
|
node.flags |= flags2;
|
|
15626
|
-
node.text = "";
|
|
15627
15388
|
node.fileName = "";
|
|
15628
|
-
node.
|
|
15629
|
-
node.resolvedPath = "";
|
|
15630
|
-
node.originalFileName = "";
|
|
15389
|
+
node.text = "";
|
|
15631
15390
|
node.languageVersion = 0;
|
|
15632
15391
|
node.languageVariant = 0;
|
|
15633
15392
|
node.scriptKind = 0;
|
|
15634
15393
|
node.isDeclarationFile = false;
|
|
15635
15394
|
node.hasNoDefaultLib = false;
|
|
15636
15395
|
node.transformFlags |= propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
|
15637
|
-
node.locals = void 0;
|
|
15638
|
-
node.nextContainer = void 0;
|
|
15639
|
-
node.endFlowNode = void 0;
|
|
15640
|
-
node.nodeCount = 0;
|
|
15641
|
-
node.identifierCount = 0;
|
|
15642
|
-
node.symbolCount = 0;
|
|
15643
|
-
node.parseDiagnostics = void 0;
|
|
15644
|
-
node.bindDiagnostics = void 0;
|
|
15645
|
-
node.bindSuggestionDiagnostics = void 0;
|
|
15646
|
-
node.lineMap = void 0;
|
|
15647
|
-
node.externalModuleIndicator = void 0;
|
|
15648
|
-
node.setExternalModuleIndicator = void 0;
|
|
15649
|
-
node.pragmas = void 0;
|
|
15650
|
-
node.checkJsDirective = void 0;
|
|
15651
|
-
node.referencedFiles = void 0;
|
|
15652
|
-
node.typeReferenceDirectives = void 0;
|
|
15653
|
-
node.libReferenceDirectives = void 0;
|
|
15654
|
-
node.amdDependencies = void 0;
|
|
15655
|
-
node.commentDirectives = void 0;
|
|
15656
|
-
node.identifiers = void 0;
|
|
15657
|
-
node.packageJsonLocations = void 0;
|
|
15658
|
-
node.packageJsonScope = void 0;
|
|
15659
|
-
node.imports = void 0;
|
|
15660
|
-
node.moduleAugmentations = void 0;
|
|
15661
|
-
node.ambientModuleNames = void 0;
|
|
15662
|
-
node.resolvedModules = void 0;
|
|
15663
|
-
node.classifiableNames = void 0;
|
|
15664
|
-
node.impliedNodeFormat = void 0;
|
|
15665
15396
|
return node;
|
|
15666
15397
|
}
|
|
15667
|
-
function
|
|
15668
|
-
const node = Object.create(redirectInfo.redirectTarget);
|
|
15669
|
-
Object.defineProperties(node, {
|
|
15670
|
-
id: {
|
|
15671
|
-
get() {
|
|
15672
|
-
return this.redirectInfo.redirectTarget.id;
|
|
15673
|
-
},
|
|
15674
|
-
set(value) {
|
|
15675
|
-
this.redirectInfo.redirectTarget.id = value;
|
|
15676
|
-
}
|
|
15677
|
-
},
|
|
15678
|
-
symbol: {
|
|
15679
|
-
get() {
|
|
15680
|
-
return this.redirectInfo.redirectTarget.symbol;
|
|
15681
|
-
},
|
|
15682
|
-
set(value) {
|
|
15683
|
-
this.redirectInfo.redirectTarget.symbol = value;
|
|
15684
|
-
}
|
|
15685
|
-
}
|
|
15686
|
-
});
|
|
15687
|
-
node.redirectInfo = redirectInfo;
|
|
15688
|
-
return node;
|
|
15689
|
-
}
|
|
15690
|
-
function cloneRedirectedSourceFile(source) {
|
|
15691
|
-
const node = createRedirectedSourceFile(source.redirectInfo);
|
|
15692
|
-
node.flags |= source.flags & ~8 /* Synthesized */;
|
|
15693
|
-
node.fileName = source.fileName;
|
|
15694
|
-
node.path = source.path;
|
|
15695
|
-
node.resolvedPath = source.resolvedPath;
|
|
15696
|
-
node.originalFileName = source.originalFileName;
|
|
15697
|
-
node.packageJsonLocations = source.packageJsonLocations;
|
|
15698
|
-
node.packageJsonScope = source.packageJsonScope;
|
|
15699
|
-
node.emitNode = void 0;
|
|
15700
|
-
return node;
|
|
15701
|
-
}
|
|
15702
|
-
function cloneSourceFileWorker(source) {
|
|
15703
|
-
const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */);
|
|
15704
|
-
node.flags |= source.flags & ~8 /* Synthesized */;
|
|
15398
|
+
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
15399
|
+
const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(308 /* SourceFile */);
|
|
15705
15400
|
for (const p in source) {
|
|
15706
|
-
if (hasProperty(node, p) || !hasProperty(source, p))
|
|
15707
|
-
continue;
|
|
15708
|
-
}
|
|
15709
|
-
if (p === "emitNode") {
|
|
15710
|
-
node.emitNode = void 0;
|
|
15401
|
+
if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p))
|
|
15711
15402
|
continue;
|
|
15712
|
-
}
|
|
15713
15403
|
node[p] = source[p];
|
|
15714
15404
|
}
|
|
15715
|
-
|
|
15716
|
-
}
|
|
15717
|
-
function cloneSourceFile(source) {
|
|
15718
|
-
const node = source.redirectInfo ? cloneRedirectedSourceFile(source) : cloneSourceFileWorker(source);
|
|
15719
|
-
setOriginalNode(node, source);
|
|
15720
|
-
return node;
|
|
15721
|
-
}
|
|
15722
|
-
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
15723
|
-
const node = cloneSourceFile(source);
|
|
15405
|
+
node.flags |= source.flags;
|
|
15724
15406
|
node.statements = createNodeArray(statements);
|
|
15407
|
+
node.endOfFileToken = source.endOfFileToken;
|
|
15725
15408
|
node.isDeclarationFile = isDeclarationFile;
|
|
15726
15409
|
node.referencedFiles = referencedFiles;
|
|
15727
15410
|
node.typeReferenceDirectives = typeReferences;
|
|
15728
15411
|
node.hasNoDefaultLib = hasNoDefaultLib;
|
|
15729
15412
|
node.libReferenceDirectives = libReferences;
|
|
15730
15413
|
node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
|
15414
|
+
node.impliedNodeFormat = source.impliedNodeFormat;
|
|
15731
15415
|
return node;
|
|
15732
15416
|
}
|
|
15733
15417
|
function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) {
|
|
@@ -15737,10 +15421,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15737
15421
|
const node = createBaseNode(309 /* Bundle */);
|
|
15738
15422
|
node.prepends = prepends;
|
|
15739
15423
|
node.sourceFiles = sourceFiles;
|
|
15740
|
-
node.syntheticFileReferences = void 0;
|
|
15741
|
-
node.syntheticTypeReferences = void 0;
|
|
15742
|
-
node.syntheticLibReferences = void 0;
|
|
15743
|
-
node.hasNoDefaultLib = void 0;
|
|
15744
15424
|
return node;
|
|
15745
15425
|
}
|
|
15746
15426
|
function updateBundle(node, sourceFiles, prepends = emptyArray) {
|
|
@@ -15857,68 +15537,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15857
15537
|
function updateSyntheticReferenceExpression(node, expression, thisArg) {
|
|
15858
15538
|
return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node;
|
|
15859
15539
|
}
|
|
15860
|
-
function cloneGeneratedIdentifier(node) {
|
|
15861
|
-
const clone2 = createBaseIdentifier(node.escapedText, void 0);
|
|
15862
|
-
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15863
|
-
clone2.autoGenerateFlags = node.autoGenerateFlags;
|
|
15864
|
-
clone2.autoGenerateId = node.autoGenerateId;
|
|
15865
|
-
clone2.autoGeneratePrefix = node.autoGeneratePrefix;
|
|
15866
|
-
clone2.autoGenerateSuffix = node.autoGenerateSuffix;
|
|
15867
|
-
clone2.transformFlags = node.transformFlags;
|
|
15868
|
-
setOriginalNode(clone2, node);
|
|
15869
|
-
return clone2;
|
|
15870
|
-
}
|
|
15871
|
-
function cloneIdentifier(node) {
|
|
15872
|
-
const clone2 = createBaseIdentifier(node.escapedText, node.originalKeywordKind);
|
|
15873
|
-
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15874
|
-
clone2.typeArguments = node.typeArguments;
|
|
15875
|
-
clone2.hasExtendedUnicodeEscape = node.hasExtendedUnicodeEscape;
|
|
15876
|
-
clone2.jsDoc = node.jsDoc;
|
|
15877
|
-
clone2.jsDocCache = node.jsDocCache;
|
|
15878
|
-
clone2.flowNode = node.flowNode;
|
|
15879
|
-
clone2.symbol = node.symbol;
|
|
15880
|
-
clone2.transformFlags = node.transformFlags;
|
|
15881
|
-
setOriginalNode(clone2, node);
|
|
15882
|
-
return clone2;
|
|
15883
|
-
}
|
|
15884
|
-
function cloneGeneratedPrivateIdentifier(node) {
|
|
15885
|
-
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15886
|
-
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15887
|
-
clone2.autoGenerateFlags = node.autoGenerateFlags;
|
|
15888
|
-
clone2.autoGenerateId = node.autoGenerateId;
|
|
15889
|
-
clone2.autoGeneratePrefix = node.autoGeneratePrefix;
|
|
15890
|
-
clone2.autoGenerateSuffix = node.autoGenerateSuffix;
|
|
15891
|
-
clone2.transformFlags = node.transformFlags;
|
|
15892
|
-
setOriginalNode(clone2, node);
|
|
15893
|
-
return clone2;
|
|
15894
|
-
}
|
|
15895
|
-
function clonePrivateIdentifier(node) {
|
|
15896
|
-
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15897
|
-
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15898
|
-
clone2.transformFlags = node.transformFlags;
|
|
15899
|
-
setOriginalNode(clone2, node);
|
|
15900
|
-
return clone2;
|
|
15901
|
-
}
|
|
15902
15540
|
function cloneNode(node) {
|
|
15903
15541
|
if (node === void 0) {
|
|
15904
15542
|
return node;
|
|
15905
15543
|
}
|
|
15906
|
-
|
|
15907
|
-
return cloneSourceFile(node);
|
|
15908
|
-
}
|
|
15909
|
-
if (isGeneratedIdentifier(node)) {
|
|
15910
|
-
return cloneGeneratedIdentifier(node);
|
|
15911
|
-
}
|
|
15912
|
-
if (isIdentifier(node)) {
|
|
15913
|
-
return cloneIdentifier(node);
|
|
15914
|
-
}
|
|
15915
|
-
if (isGeneratedPrivateIdentifier(node)) {
|
|
15916
|
-
return cloneGeneratedPrivateIdentifier(node);
|
|
15917
|
-
}
|
|
15918
|
-
if (isPrivateIdentifier(node)) {
|
|
15919
|
-
return clonePrivateIdentifier(node);
|
|
15920
|
-
}
|
|
15921
|
-
const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind);
|
|
15544
|
+
const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(308 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind);
|
|
15922
15545
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15923
15546
|
clone2.transformFlags = node.transformFlags;
|
|
15924
15547
|
setOriginalNode(clone2, node);
|
|
@@ -16357,26 +15980,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16357
15980
|
function asExpression(value) {
|
|
16358
15981
|
return typeof value === "string" ? createStringLiteral(value) : typeof value === "number" ? createNumericLiteral(value) : typeof value === "boolean" ? value ? createTrue() : createFalse() : value;
|
|
16359
15982
|
}
|
|
16360
|
-
function asInitializer(node) {
|
|
16361
|
-
return node && parenthesizerRules().parenthesizeExpressionForDisallowedComma(node);
|
|
16362
|
-
}
|
|
16363
15983
|
function asToken(value) {
|
|
16364
15984
|
return typeof value === "number" ? createToken(value) : value;
|
|
16365
15985
|
}
|
|
16366
15986
|
function asEmbeddedStatement(statement) {
|
|
16367
15987
|
return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginalNode(createEmptyStatement(), statement), statement) : statement;
|
|
16368
15988
|
}
|
|
16369
|
-
function asVariableDeclaration(variableDeclaration) {
|
|
16370
|
-
if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) {
|
|
16371
|
-
return createVariableDeclaration(
|
|
16372
|
-
variableDeclaration,
|
|
16373
|
-
void 0,
|
|
16374
|
-
void 0,
|
|
16375
|
-
void 0
|
|
16376
|
-
);
|
|
16377
|
-
}
|
|
16378
|
-
return variableDeclaration;
|
|
16379
|
-
}
|
|
16380
15989
|
}
|
|
16381
15990
|
function updateWithoutOriginal(updated, original) {
|
|
16382
15991
|
if (updated !== original) {
|
|
@@ -16477,9 +16086,6 @@ function getCookedText(kind, rawText) {
|
|
|
16477
16086
|
rawTextScanner.setText(void 0);
|
|
16478
16087
|
return tokenValue;
|
|
16479
16088
|
}
|
|
16480
|
-
function propagateNameFlags(node) {
|
|
16481
|
-
return node && isIdentifier(node) ? propagateIdentifierNameFlags(node) : propagateChildFlags(node);
|
|
16482
|
-
}
|
|
16483
16089
|
function propagateIdentifierNameFlags(node) {
|
|
16484
16090
|
return propagateChildFlags(node) & ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
16485
16091
|
}
|
|
@@ -19137,7 +18743,7 @@ var Parser;
|
|
|
19137
18743
|
if (!canReuseNode(node, parsingContext2)) {
|
|
19138
18744
|
return void 0;
|
|
19139
18745
|
}
|
|
19140
|
-
if (
|
|
18746
|
+
if (node.jsDocCache) {
|
|
19141
18747
|
node.jsDocCache = void 0;
|
|
19142
18748
|
}
|
|
19143
18749
|
return node;
|
|
@@ -24687,7 +24293,7 @@ var targetOptionDeclaration = {
|
|
|
24687
24293
|
showInSimplifiedHelpView: true,
|
|
24688
24294
|
category: Diagnostics.Language_and_Environment,
|
|
24689
24295
|
description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
24690
|
-
defaultValueDescription:
|
|
24296
|
+
defaultValueDescription: 1 /* ES5 */
|
|
24691
24297
|
};
|
|
24692
24298
|
var moduleOptionDeclaration = {
|
|
24693
24299
|
name: "module",
|
|
@@ -25111,7 +24717,8 @@ var commandOptionsWithoutBuild = [
|
|
|
25111
24717
|
node: 2 /* NodeJs */,
|
|
25112
24718
|
classic: 1 /* Classic */,
|
|
25113
24719
|
node16: 3 /* Node16 */,
|
|
25114
|
-
nodenext: 99 /* NodeNext
|
|
24720
|
+
nodenext: 99 /* NodeNext */,
|
|
24721
|
+
hybrid: 100 /* Hybrid */
|
|
25115
24722
|
})),
|
|
25116
24723
|
affectsModuleResolution: true,
|
|
25117
24724
|
paramType: Diagnostics.STRATEGY,
|
|
@@ -25224,6 +24831,41 @@ var commandOptionsWithoutBuild = [
|
|
|
25224
24831
|
category: Diagnostics.Modules,
|
|
25225
24832
|
description: Diagnostics.List_of_file_name_suffixes_to_search_when_resolving_a_module
|
|
25226
24833
|
},
|
|
24834
|
+
{
|
|
24835
|
+
name: "allowImportingTsExtensions",
|
|
24836
|
+
type: "boolean",
|
|
24837
|
+
affectsModuleResolution: true,
|
|
24838
|
+
category: Diagnostics.Modules,
|
|
24839
|
+
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_hybrid_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
24840
|
+
defaultValueDescription: false
|
|
24841
|
+
},
|
|
24842
|
+
{
|
|
24843
|
+
name: "resolvePackageJsonExports",
|
|
24844
|
+
type: "boolean",
|
|
24845
|
+
affectsModuleResolution: true,
|
|
24846
|
+
category: Diagnostics.Modules,
|
|
24847
|
+
description: Diagnostics.Use_the_package_json_exports_field_when_resolving_package_imports,
|
|
24848
|
+
defaultValueDescription: Diagnostics.true_when_moduleResolution_is_node16_nodenext_or_hybrid_otherwise_false
|
|
24849
|
+
},
|
|
24850
|
+
{
|
|
24851
|
+
name: "resolvePackageJsonImports",
|
|
24852
|
+
type: "boolean",
|
|
24853
|
+
affectsModuleResolution: true,
|
|
24854
|
+
category: Diagnostics.Modules,
|
|
24855
|
+
description: Diagnostics.Use_the_package_json_imports_field_when_resolving_imports,
|
|
24856
|
+
defaultValueDescription: Diagnostics.true_when_moduleResolution_is_node16_nodenext_or_hybrid_otherwise_false
|
|
24857
|
+
},
|
|
24858
|
+
{
|
|
24859
|
+
name: "customConditions",
|
|
24860
|
+
type: "list",
|
|
24861
|
+
element: {
|
|
24862
|
+
name: "condition",
|
|
24863
|
+
type: "string"
|
|
24864
|
+
},
|
|
24865
|
+
affectsModuleResolution: true,
|
|
24866
|
+
category: Diagnostics.Modules,
|
|
24867
|
+
description: Diagnostics.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports
|
|
24868
|
+
},
|
|
25227
24869
|
{
|
|
25228
24870
|
name: "sourceRoot",
|
|
25229
24871
|
type: "string",
|
|
@@ -26128,7 +25770,7 @@ function withPackageId(packageInfo, r) {
|
|
|
26128
25770
|
};
|
|
26129
25771
|
}
|
|
26130
25772
|
}
|
|
26131
|
-
return r && { path: r.path, extension: r.ext, packageId };
|
|
25773
|
+
return r && { path: r.path, extension: r.ext, packageId, resolvedUsingTsExtension: r.resolvedUsingTsExtension };
|
|
26132
25774
|
}
|
|
26133
25775
|
function noPackageId(r) {
|
|
26134
25776
|
return withPackageId(void 0, r);
|
|
@@ -26136,7 +25778,7 @@ function noPackageId(r) {
|
|
|
26136
25778
|
function removeIgnoredPackageId(r) {
|
|
26137
25779
|
if (r) {
|
|
26138
25780
|
Debug.assert(r.packageId === void 0);
|
|
26139
|
-
return { path: r.path, ext: r.extension };
|
|
25781
|
+
return { path: r.path, ext: r.extension, resolvedUsingTsExtension: r.resolvedUsingTsExtension };
|
|
26140
25782
|
}
|
|
26141
25783
|
}
|
|
26142
25784
|
function formatExtensions(extensions) {
|
|
@@ -26159,7 +25801,14 @@ function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibra
|
|
|
26159
25801
|
return resultFromCache;
|
|
26160
25802
|
}
|
|
26161
25803
|
return {
|
|
26162
|
-
resolvedModule: resolved && {
|
|
25804
|
+
resolvedModule: resolved && {
|
|
25805
|
+
resolvedFileName: resolved.path,
|
|
25806
|
+
originalPath: resolved.originalPath === true ? void 0 : resolved.originalPath,
|
|
25807
|
+
extension: resolved.extension,
|
|
25808
|
+
isExternalLibraryImport,
|
|
25809
|
+
packageId: resolved.packageId,
|
|
25810
|
+
resolvedUsingTsExtension: !!resolved.resolvedUsingTsExtension
|
|
25811
|
+
},
|
|
26163
25812
|
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
26164
25813
|
affectingLocations: initializeResolutionField(affectingLocations),
|
|
26165
25814
|
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
@@ -26275,6 +25924,38 @@ function arePathsEqual(path1, path2, host) {
|
|
|
26275
25924
|
const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
|
|
26276
25925
|
return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */;
|
|
26277
25926
|
}
|
|
25927
|
+
function getNodeResolutionFeatures(options) {
|
|
25928
|
+
let features = NodeResolutionFeatures.None;
|
|
25929
|
+
switch (getEmitModuleResolutionKind(options)) {
|
|
25930
|
+
case 3 /* Node16 */:
|
|
25931
|
+
features = NodeResolutionFeatures.Node16Default;
|
|
25932
|
+
break;
|
|
25933
|
+
case 99 /* NodeNext */:
|
|
25934
|
+
features = NodeResolutionFeatures.NodeNextDefault;
|
|
25935
|
+
break;
|
|
25936
|
+
case 100 /* Hybrid */:
|
|
25937
|
+
features = NodeResolutionFeatures.HybridDefault;
|
|
25938
|
+
break;
|
|
25939
|
+
}
|
|
25940
|
+
if (options.resolvePackageJsonExports) {
|
|
25941
|
+
features |= NodeResolutionFeatures.Exports;
|
|
25942
|
+
} else if (options.resolvePackageJsonExports === false) {
|
|
25943
|
+
features &= ~NodeResolutionFeatures.Exports;
|
|
25944
|
+
}
|
|
25945
|
+
if (options.resolvePackageJsonImports) {
|
|
25946
|
+
features |= NodeResolutionFeatures.Imports;
|
|
25947
|
+
} else if (options.resolvePackageJsonImports === false) {
|
|
25948
|
+
features &= ~NodeResolutionFeatures.Imports;
|
|
25949
|
+
}
|
|
25950
|
+
return features;
|
|
25951
|
+
}
|
|
25952
|
+
function getConditions(options, esmMode) {
|
|
25953
|
+
const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Hybrid */ ? ["node", "import"] : ["node", "require"];
|
|
25954
|
+
if (!options.noDtsResolution) {
|
|
25955
|
+
conditions.push("types");
|
|
25956
|
+
}
|
|
25957
|
+
return concatenate(conditions, options.customConditions);
|
|
25958
|
+
}
|
|
26278
25959
|
function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
26279
25960
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
26280
25961
|
if (redirectedReference) {
|
|
@@ -26331,6 +26012,9 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
26331
26012
|
case 1 /* Classic */:
|
|
26332
26013
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
26333
26014
|
break;
|
|
26015
|
+
case 100 /* Hybrid */:
|
|
26016
|
+
result = hybridModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
26017
|
+
break;
|
|
26334
26018
|
default:
|
|
26335
26019
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
26336
26020
|
}
|
|
@@ -26460,6 +26144,19 @@ function resolveJSModule(moduleName, initialDir, host) {
|
|
|
26460
26144
|
}
|
|
26461
26145
|
return resolvedModule.resolvedFileName;
|
|
26462
26146
|
}
|
|
26147
|
+
var NodeResolutionFeatures = /* @__PURE__ */ ((NodeResolutionFeatures2) => {
|
|
26148
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["None"] = 0] = "None";
|
|
26149
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["Imports"] = 2] = "Imports";
|
|
26150
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["SelfName"] = 4] = "SelfName";
|
|
26151
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["Exports"] = 8] = "Exports";
|
|
26152
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
26153
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["AllFeatures"] = 30] = "AllFeatures";
|
|
26154
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["Node16Default"] = 30] = "Node16Default";
|
|
26155
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["NodeNextDefault"] = 30 /* AllFeatures */] = "NodeNextDefault";
|
|
26156
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["HybridDefault"] = 30] = "HybridDefault";
|
|
26157
|
+
NodeResolutionFeatures2[NodeResolutionFeatures2["EsmMode"] = 32] = "EsmMode";
|
|
26158
|
+
return NodeResolutionFeatures2;
|
|
26159
|
+
})(NodeResolutionFeatures || {});
|
|
26463
26160
|
function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
26464
26161
|
return nodeNextModuleNameResolverWorker(
|
|
26465
26162
|
30 /* Node16Default */,
|
|
@@ -26488,7 +26185,7 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile,
|
|
|
26488
26185
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
26489
26186
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
26490
26187
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
26491
|
-
if (compilerOptions
|
|
26188
|
+
if (getResolveJsonModule(compilerOptions)) {
|
|
26492
26189
|
extensions |= 8 /* Json */;
|
|
26493
26190
|
}
|
|
26494
26191
|
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, false, redirectedReference);
|
|
@@ -26506,16 +26203,24 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
26506
26203
|
void 0
|
|
26507
26204
|
);
|
|
26508
26205
|
}
|
|
26206
|
+
function hybridModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
26207
|
+
const containingDirectory = getDirectoryPath(containingFile);
|
|
26208
|
+
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
26209
|
+
if (getResolveJsonModule(compilerOptions)) {
|
|
26210
|
+
extensions |= 8 /* Json */;
|
|
26211
|
+
}
|
|
26212
|
+
return nodeModuleNameResolverWorker(getNodeResolutionFeatures(compilerOptions), moduleName, containingDirectory, compilerOptions, host, cache, extensions, false, redirectedReference);
|
|
26213
|
+
}
|
|
26509
26214
|
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
26510
26215
|
let extensions;
|
|
26511
26216
|
if (isConfigLookup) {
|
|
26512
26217
|
extensions = 8 /* Json */;
|
|
26513
26218
|
} else if (compilerOptions.noDtsResolution) {
|
|
26514
26219
|
extensions = 3 /* ImplementationFiles */;
|
|
26515
|
-
if (compilerOptions
|
|
26220
|
+
if (getResolveJsonModule(compilerOptions))
|
|
26516
26221
|
extensions |= 8 /* Json */;
|
|
26517
26222
|
} else {
|
|
26518
|
-
extensions = compilerOptions
|
|
26223
|
+
extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
26519
26224
|
}
|
|
26520
26225
|
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
26521
26226
|
}
|
|
@@ -26524,10 +26229,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
26524
26229
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
26525
26230
|
const failedLookupLocations = [];
|
|
26526
26231
|
const affectingLocations = [];
|
|
26527
|
-
const conditions = features & 32 /* EsmMode */
|
|
26528
|
-
if (compilerOptions.noDtsResolution) {
|
|
26529
|
-
conditions.pop();
|
|
26530
|
-
}
|
|
26232
|
+
const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */));
|
|
26531
26233
|
const diagnostics = [];
|
|
26532
26234
|
const state = {
|
|
26533
26235
|
compilerOptions,
|
|
@@ -26688,7 +26390,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
|
|
|
26688
26390
|
}
|
|
26689
26391
|
}
|
|
26690
26392
|
function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
|
|
26691
|
-
if (hasJSFileExtension(candidate) || extensions & 8 /* Json */ && fileExtensionIs(candidate, ".json" /* Json */)) {
|
|
26393
|
+
if (hasJSFileExtension(candidate) || extensions & 8 /* Json */ && fileExtensionIs(candidate, ".json" /* Json */) || extensions & (1 /* TypeScript */ | 4 /* Declaration */) && moduleResolutionSupportsResolvingTsExtensions(state.compilerOptions) && fileExtensionIsOneOf(candidate, supportedTSExtensionsFlat)) {
|
|
26692
26394
|
const extensionless = removeFileExtension(candidate);
|
|
26693
26395
|
const extension = candidate.substring(extensionless.length);
|
|
26694
26396
|
if (state.traceEnabled) {
|
|
@@ -26700,7 +26402,7 @@ function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecor
|
|
|
26700
26402
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
26701
26403
|
if (extensions & 1 /* TypeScript */ && fileExtensionIsOneOf(candidate, supportedTSImplementationExtensions) || extensions & 4 /* Declaration */ && fileExtensionIsOneOf(candidate, supportedDeclarationExtensions)) {
|
|
26702
26404
|
const result = tryFile(candidate, onlyRecordFailures, state);
|
|
26703
|
-
return result !== void 0 ? { path: candidate, ext: tryExtractTSExtension(candidate) } : void 0;
|
|
26405
|
+
return result !== void 0 ? { path: candidate, ext: tryExtractTSExtension(candidate), resolvedUsingTsExtension: void 0 } : void 0;
|
|
26704
26406
|
}
|
|
26705
26407
|
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
26706
26408
|
}
|
|
@@ -26735,12 +26437,18 @@ function tryAddingExtensions(candidate, extensions, originalExtension, onlyRecor
|
|
|
26735
26437
|
return result;
|
|
26736
26438
|
}
|
|
26737
26439
|
return void 0;
|
|
26440
|
+
case ".ts" /* Ts */:
|
|
26441
|
+
case ".tsx" /* Tsx */:
|
|
26442
|
+
case ".d.ts" /* Dts */:
|
|
26443
|
+
if (moduleResolutionSupportsResolvingTsExtensions(state.compilerOptions) && extensionIsOk(extensions, originalExtension)) {
|
|
26444
|
+
return tryExtension(originalExtension, true);
|
|
26445
|
+
}
|
|
26738
26446
|
default:
|
|
26739
26447
|
return extensions & 1 /* TypeScript */ && (tryExtension(".ts" /* Ts */) || tryExtension(".tsx" /* Tsx */)) || extensions & 4 /* Declaration */ && tryExtension(".d.ts" /* Dts */) || extensions & 2 /* JavaScript */ && (tryExtension(".js" /* Js */) || tryExtension(".jsx" /* Jsx */)) || state.isConfigLookup && tryExtension(".json" /* Json */) || void 0;
|
|
26740
26448
|
}
|
|
26741
|
-
function tryExtension(ext) {
|
|
26449
|
+
function tryExtension(ext, resolvedUsingTsExtension) {
|
|
26742
26450
|
const path2 = tryFile(candidate + ext, onlyRecordFailures, state);
|
|
26743
|
-
return path2 === void 0 ? void 0 : { path: path2, ext };
|
|
26451
|
+
return path2 === void 0 ? void 0 : { path: path2, ext, resolvedUsingTsExtension };
|
|
26744
26452
|
}
|
|
26745
26453
|
}
|
|
26746
26454
|
function tryFile(fileName, onlyRecordFailures, state) {
|
|
@@ -26881,9 +26589,9 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
|
|
|
26881
26589
|
return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
|
|
26882
26590
|
}
|
|
26883
26591
|
}
|
|
26884
|
-
function resolvedIfExtensionMatches(extensions, path2) {
|
|
26592
|
+
function resolvedIfExtensionMatches(extensions, path2, resolvedUsingTsExtension) {
|
|
26885
26593
|
const ext = tryGetExtensionFromPath2(path2);
|
|
26886
|
-
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path: path2, ext } : void 0;
|
|
26594
|
+
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path: path2, ext, resolvedUsingTsExtension } : void 0;
|
|
26887
26595
|
}
|
|
26888
26596
|
function extensionIsOk(extensions, extension) {
|
|
26889
26597
|
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
@@ -27049,7 +26757,13 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
27049
26757
|
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports", key, combinedLookup);
|
|
27050
26758
|
traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/");
|
|
27051
26759
|
const result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache, extensions, false, redirectedReference);
|
|
27052
|
-
return toSearchResult(result.resolvedModule ? {
|
|
26760
|
+
return toSearchResult(result.resolvedModule ? {
|
|
26761
|
+
path: result.resolvedModule.resolvedFileName,
|
|
26762
|
+
extension: result.resolvedModule.extension,
|
|
26763
|
+
packageId: result.resolvedModule.packageId,
|
|
26764
|
+
originalPath: result.resolvedModule.originalPath,
|
|
26765
|
+
resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension
|
|
26766
|
+
} : void 0);
|
|
27053
26767
|
}
|
|
27054
26768
|
if (state.traceEnabled) {
|
|
27055
26769
|
trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
@@ -27344,7 +27058,7 @@ function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, p
|
|
|
27344
27058
|
if (extension !== void 0) {
|
|
27345
27059
|
const path3 = tryFile(candidate, onlyRecordFailures, state);
|
|
27346
27060
|
if (path3 !== void 0) {
|
|
27347
|
-
return noPackageId({ path: path3, ext: extension });
|
|
27061
|
+
return noPackageId({ path: path3, ext: extension, resolvedUsingTsExtension: void 0 });
|
|
27348
27062
|
}
|
|
27349
27063
|
}
|
|
27350
27064
|
return loader(extensions, candidate, onlyRecordFailures || !directoryProbablyExists(getDirectoryPath(candidate), state.host), state);
|
|
@@ -27376,7 +27090,15 @@ function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containing
|
|
|
27376
27090
|
trace(state.host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);
|
|
27377
27091
|
}
|
|
27378
27092
|
state.resultFromCache = result;
|
|
27379
|
-
return {
|
|
27093
|
+
return {
|
|
27094
|
+
value: result.resolvedModule && {
|
|
27095
|
+
path: result.resolvedModule.resolvedFileName,
|
|
27096
|
+
originalPath: result.resolvedModule.originalPath || true,
|
|
27097
|
+
extension: result.resolvedModule.extension,
|
|
27098
|
+
packageId: result.resolvedModule.packageId,
|
|
27099
|
+
resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension
|
|
27100
|
+
}
|
|
27101
|
+
};
|
|
27380
27102
|
}
|
|
27381
27103
|
}
|
|
27382
27104
|
function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
@@ -27401,7 +27123,7 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
27401
27123
|
const resolved = tryResolve(1 /* TypeScript */ | 4 /* Declaration */) || tryResolve(2 /* JavaScript */ | (compilerOptions.resolveJsonModule ? 8 /* Json */ : 0));
|
|
27402
27124
|
return createResolvedModuleWithFailedLookupLocations(
|
|
27403
27125
|
resolved && resolved.value,
|
|
27404
|
-
|
|
27126
|
+
(resolved == null ? void 0 : resolved.value) && pathContainsNodeModules(resolved.value.path),
|
|
27405
27127
|
failedLookupLocations,
|
|
27406
27128
|
affectingLocations,
|
|
27407
27129
|
diagnostics,
|
|
@@ -27433,6 +27155,9 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
27433
27155
|
}
|
|
27434
27156
|
}
|
|
27435
27157
|
}
|
|
27158
|
+
function moduleResolutionSupportsResolvingTsExtensions(compilerOptions) {
|
|
27159
|
+
return getEmitModuleResolutionKind(compilerOptions) === 100 /* Hybrid */;
|
|
27160
|
+
}
|
|
27436
27161
|
function toSearchResult(value) {
|
|
27437
27162
|
return value !== void 0 ? { value } : void 0;
|
|
27438
27163
|
}
|
|
@@ -27803,14 +27528,13 @@ function createBinder() {
|
|
|
27803
27528
|
if (node.kind === 278 /* ExportSpecifier */ || node.kind === 268 /* ImportEqualsDeclaration */ && hasExportModifier) {
|
|
27804
27529
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
27805
27530
|
} else {
|
|
27806
|
-
Debug.assertNode(container, canHaveLocals);
|
|
27807
27531
|
return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes);
|
|
27808
27532
|
}
|
|
27809
27533
|
} else {
|
|
27810
27534
|
if (isJSDocTypeAlias(node))
|
|
27811
27535
|
Debug.assert(isInJSFile(node));
|
|
27812
27536
|
if (!isAmbientModule(node) && (hasExportModifier || container.flags & 64 /* ExportContext */)) {
|
|
27813
|
-
if (!
|
|
27537
|
+
if (!container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) {
|
|
27814
27538
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
27815
27539
|
}
|
|
27816
27540
|
const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0;
|
|
@@ -27819,7 +27543,6 @@ function createBinder() {
|
|
|
27819
27543
|
node.localSymbol = local;
|
|
27820
27544
|
return local;
|
|
27821
27545
|
} else {
|
|
27822
|
-
Debug.assertNode(container, canHaveLocals);
|
|
27823
27546
|
return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes);
|
|
27824
27547
|
}
|
|
27825
27548
|
}
|
|
@@ -27852,13 +27575,11 @@ function createBinder() {
|
|
|
27852
27575
|
container = blockScopeContainer = node;
|
|
27853
27576
|
if (containerFlags & 32 /* HasLocals */) {
|
|
27854
27577
|
container.locals = createSymbolTable();
|
|
27855
|
-
addToContainerChain(container);
|
|
27856
27578
|
}
|
|
27579
|
+
addToContainerChain(container);
|
|
27857
27580
|
} else if (containerFlags & 2 /* IsBlockScopedContainer */) {
|
|
27858
27581
|
blockScopeContainer = node;
|
|
27859
|
-
|
|
27860
|
-
blockScopeContainer.locals = void 0;
|
|
27861
|
-
}
|
|
27582
|
+
blockScopeContainer.locals = void 0;
|
|
27862
27583
|
}
|
|
27863
27584
|
if (containerFlags & 4 /* IsControlFlowContainer */) {
|
|
27864
27585
|
const saveCurrentFlow = currentFlow;
|
|
@@ -28823,6 +28544,60 @@ function createBinder() {
|
|
|
28823
28544
|
}
|
|
28824
28545
|
}
|
|
28825
28546
|
}
|
|
28547
|
+
function getContainerFlags(node) {
|
|
28548
|
+
switch (node.kind) {
|
|
28549
|
+
case 228 /* ClassExpression */:
|
|
28550
|
+
case 260 /* ClassDeclaration */:
|
|
28551
|
+
case 263 /* EnumDeclaration */:
|
|
28552
|
+
case 207 /* ObjectLiteralExpression */:
|
|
28553
|
+
case 184 /* TypeLiteral */:
|
|
28554
|
+
case 325 /* JSDocTypeLiteral */:
|
|
28555
|
+
case 289 /* JsxAttributes */:
|
|
28556
|
+
return 1 /* IsContainer */;
|
|
28557
|
+
case 261 /* InterfaceDeclaration */:
|
|
28558
|
+
return 1 /* IsContainer */ | 64 /* IsInterface */;
|
|
28559
|
+
case 264 /* ModuleDeclaration */:
|
|
28560
|
+
case 262 /* TypeAliasDeclaration */:
|
|
28561
|
+
case 197 /* MappedType */:
|
|
28562
|
+
case 178 /* IndexSignature */:
|
|
28563
|
+
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
28564
|
+
case 308 /* SourceFile */:
|
|
28565
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
|
|
28566
|
+
case 174 /* GetAccessor */:
|
|
28567
|
+
case 175 /* SetAccessor */:
|
|
28568
|
+
case 171 /* MethodDeclaration */:
|
|
28569
|
+
if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {
|
|
28570
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */;
|
|
28571
|
+
}
|
|
28572
|
+
case 173 /* Constructor */:
|
|
28573
|
+
case 259 /* FunctionDeclaration */:
|
|
28574
|
+
case 170 /* MethodSignature */:
|
|
28575
|
+
case 176 /* CallSignature */:
|
|
28576
|
+
case 326 /* JSDocSignature */:
|
|
28577
|
+
case 320 /* JSDocFunctionType */:
|
|
28578
|
+
case 181 /* FunctionType */:
|
|
28579
|
+
case 177 /* ConstructSignature */:
|
|
28580
|
+
case 182 /* ConstructorType */:
|
|
28581
|
+
case 172 /* ClassStaticBlockDeclaration */:
|
|
28582
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
28583
|
+
case 215 /* FunctionExpression */:
|
|
28584
|
+
case 216 /* ArrowFunction */:
|
|
28585
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
28586
|
+
case 265 /* ModuleBlock */:
|
|
28587
|
+
return 4 /* IsControlFlowContainer */;
|
|
28588
|
+
case 169 /* PropertyDeclaration */:
|
|
28589
|
+
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
|
|
28590
|
+
case 295 /* CatchClause */:
|
|
28591
|
+
case 245 /* ForStatement */:
|
|
28592
|
+
case 246 /* ForInStatement */:
|
|
28593
|
+
case 247 /* ForOfStatement */:
|
|
28594
|
+
case 266 /* CaseBlock */:
|
|
28595
|
+
return 2 /* IsBlockScopedContainer */;
|
|
28596
|
+
case 238 /* Block */:
|
|
28597
|
+
return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */;
|
|
28598
|
+
}
|
|
28599
|
+
return 0 /* None */;
|
|
28600
|
+
}
|
|
28826
28601
|
function addToContainerChain(next) {
|
|
28827
28602
|
if (lastContainer) {
|
|
28828
28603
|
lastContainer.nextContainer = next;
|
|
@@ -28861,11 +28636,11 @@ function createBinder() {
|
|
|
28861
28636
|
case 215 /* FunctionExpression */:
|
|
28862
28637
|
case 216 /* ArrowFunction */:
|
|
28863
28638
|
case 320 /* JSDocFunctionType */:
|
|
28639
|
+
case 348 /* JSDocTypedefTag */:
|
|
28640
|
+
case 341 /* JSDocCallbackTag */:
|
|
28864
28641
|
case 172 /* ClassStaticBlockDeclaration */:
|
|
28865
28642
|
case 262 /* TypeAliasDeclaration */:
|
|
28866
28643
|
case 197 /* MappedType */:
|
|
28867
|
-
if (container.locals)
|
|
28868
|
-
Debug.assertNode(container, canHaveLocals);
|
|
28869
28644
|
return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes);
|
|
28870
28645
|
}
|
|
28871
28646
|
}
|
|
@@ -28960,7 +28735,6 @@ function createBinder() {
|
|
|
28960
28735
|
break;
|
|
28961
28736
|
}
|
|
28962
28737
|
default:
|
|
28963
|
-
Debug.assertNode(blockScopeContainer, canHaveLocals);
|
|
28964
28738
|
if (!blockScopeContainer.locals) {
|
|
28965
28739
|
blockScopeContainer.locals = createSymbolTable();
|
|
28966
28740
|
addToContainerChain(blockScopeContainer);
|
|
@@ -29617,7 +29391,7 @@ function createBinder() {
|
|
|
29617
29391
|
if (hasPrivateIdentifier) {
|
|
29618
29392
|
return;
|
|
29619
29393
|
}
|
|
29620
|
-
const thisContainer = getThisContainer(node, false
|
|
29394
|
+
const thisContainer = getThisContainer(node, false);
|
|
29621
29395
|
switch (thisContainer.kind) {
|
|
29622
29396
|
case 259 /* FunctionDeclaration */:
|
|
29623
29397
|
case 215 /* FunctionExpression */:
|
|
@@ -29881,7 +29655,7 @@ function createBinder() {
|
|
|
29881
29655
|
}
|
|
29882
29656
|
if (!isBindingPattern(node.name)) {
|
|
29883
29657
|
const possibleVariableDecl = node.kind === 257 /* VariableDeclaration */ ? node : node.parent.parent;
|
|
29884
|
-
if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) {
|
|
29658
|
+
if (isInJSFile(node) && getEmitModuleResolutionKind(options) !== 100 /* Hybrid */ && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) {
|
|
29885
29659
|
declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);
|
|
29886
29660
|
} else if (isBlockOrCatchScoped(node)) {
|
|
29887
29661
|
bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */);
|
|
@@ -29950,12 +29724,12 @@ function createBinder() {
|
|
|
29950
29724
|
return extendsType && extendsType.parent;
|
|
29951
29725
|
}
|
|
29952
29726
|
function bindTypeParameter(node) {
|
|
29953
|
-
var _a2, _b;
|
|
29954
29727
|
if (isJSDocTemplateTag(node.parent)) {
|
|
29955
29728
|
const container2 = getEffectiveContainerForJSDocTemplateTag(node.parent);
|
|
29956
29729
|
if (container2) {
|
|
29957
|
-
|
|
29958
|
-
|
|
29730
|
+
if (!container2.locals) {
|
|
29731
|
+
container2.locals = createSymbolTable();
|
|
29732
|
+
}
|
|
29959
29733
|
declareSymbol(container2.locals, void 0, node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);
|
|
29960
29734
|
} else {
|
|
29961
29735
|
declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);
|
|
@@ -29963,8 +29737,9 @@ function createBinder() {
|
|
|
29963
29737
|
} else if (node.parent.kind === 192 /* InferType */) {
|
|
29964
29738
|
const container2 = getInferTypeContainer(node.parent);
|
|
29965
29739
|
if (container2) {
|
|
29966
|
-
|
|
29967
|
-
|
|
29740
|
+
if (!container2.locals) {
|
|
29741
|
+
container2.locals = createSymbolTable();
|
|
29742
|
+
}
|
|
29968
29743
|
declareSymbol(container2.locals, void 0, node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);
|
|
29969
29744
|
} else {
|
|
29970
29745
|
bindAnonymousDeclaration(node, 262144 /* TypeParameter */, getDeclarationName(node));
|
|
@@ -30042,72 +29817,15 @@ function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
|
30042
29817
|
}
|
|
30043
29818
|
return false;
|
|
30044
29819
|
}
|
|
30045
|
-
function getContainerFlags(node) {
|
|
30046
|
-
switch (node.kind) {
|
|
30047
|
-
case 228 /* ClassExpression */:
|
|
30048
|
-
case 260 /* ClassDeclaration */:
|
|
30049
|
-
case 263 /* EnumDeclaration */:
|
|
30050
|
-
case 207 /* ObjectLiteralExpression */:
|
|
30051
|
-
case 184 /* TypeLiteral */:
|
|
30052
|
-
case 325 /* JSDocTypeLiteral */:
|
|
30053
|
-
case 289 /* JsxAttributes */:
|
|
30054
|
-
return 1 /* IsContainer */;
|
|
30055
|
-
case 261 /* InterfaceDeclaration */:
|
|
30056
|
-
return 1 /* IsContainer */ | 64 /* IsInterface */;
|
|
30057
|
-
case 264 /* ModuleDeclaration */:
|
|
30058
|
-
case 262 /* TypeAliasDeclaration */:
|
|
30059
|
-
case 197 /* MappedType */:
|
|
30060
|
-
case 178 /* IndexSignature */:
|
|
30061
|
-
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
30062
|
-
case 308 /* SourceFile */:
|
|
30063
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
|
|
30064
|
-
case 174 /* GetAccessor */:
|
|
30065
|
-
case 175 /* SetAccessor */:
|
|
30066
|
-
case 171 /* MethodDeclaration */:
|
|
30067
|
-
if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {
|
|
30068
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */;
|
|
30069
|
-
}
|
|
30070
|
-
case 173 /* Constructor */:
|
|
30071
|
-
case 259 /* FunctionDeclaration */:
|
|
30072
|
-
case 170 /* MethodSignature */:
|
|
30073
|
-
case 176 /* CallSignature */:
|
|
30074
|
-
case 326 /* JSDocSignature */:
|
|
30075
|
-
case 320 /* JSDocFunctionType */:
|
|
30076
|
-
case 181 /* FunctionType */:
|
|
30077
|
-
case 177 /* ConstructSignature */:
|
|
30078
|
-
case 182 /* ConstructorType */:
|
|
30079
|
-
case 172 /* ClassStaticBlockDeclaration */:
|
|
30080
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
30081
|
-
case 215 /* FunctionExpression */:
|
|
30082
|
-
case 216 /* ArrowFunction */:
|
|
30083
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
30084
|
-
case 265 /* ModuleBlock */:
|
|
30085
|
-
return 4 /* IsControlFlowContainer */;
|
|
30086
|
-
case 169 /* PropertyDeclaration */:
|
|
30087
|
-
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
|
|
30088
|
-
case 295 /* CatchClause */:
|
|
30089
|
-
case 245 /* ForStatement */:
|
|
30090
|
-
case 246 /* ForInStatement */:
|
|
30091
|
-
case 247 /* ForOfStatement */:
|
|
30092
|
-
case 266 /* CaseBlock */:
|
|
30093
|
-
return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;
|
|
30094
|
-
case 238 /* Block */:
|
|
30095
|
-
return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;
|
|
30096
|
-
}
|
|
30097
|
-
return 0 /* None */;
|
|
30098
|
-
}
|
|
30099
29820
|
function lookupSymbolForName(container, name) {
|
|
30100
|
-
|
|
30101
|
-
const local = (_b = (_a2 = tryCast(container, canHaveLocals)) == null ? void 0 : _a2.locals) == null ? void 0 : _b.get(name);
|
|
29821
|
+
const local = container.locals && container.locals.get(name);
|
|
30102
29822
|
if (local) {
|
|
30103
|
-
return
|
|
29823
|
+
return local.exportSymbol || local;
|
|
30104
29824
|
}
|
|
30105
29825
|
if (isSourceFile(container) && container.jsGlobalAugmentations && container.jsGlobalAugmentations.has(name)) {
|
|
30106
29826
|
return container.jsGlobalAugmentations.get(name);
|
|
30107
29827
|
}
|
|
30108
|
-
|
|
30109
|
-
return (_e = (_d = container.symbol) == null ? void 0 : _d.exports) == null ? void 0 : _e.get(name);
|
|
30110
|
-
}
|
|
29828
|
+
return container.symbol && container.symbol.exports && container.symbol.exports.get(name);
|
|
30111
29829
|
}
|
|
30112
29830
|
|
|
30113
29831
|
// src/compiler/checker.ts
|