@typescript-deploys/pr-build 4.7.0-pr-48080-12 → 4.7.0-pr-48112-6
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/de/diagnosticMessages.generated.json +3 -0
- package/lib/fr/diagnosticMessages.generated.json +3 -0
- package/lib/ja/diagnosticMessages.generated.json +3 -0
- package/lib/ko/diagnosticMessages.generated.json +3 -0
- package/lib/lib.es2015.reflect.d.ts +1 -1
- package/lib/lib.es2020.intl.d.ts +1 -1
- package/lib/lib.es5.d.ts +6 -0
- package/lib/pt-br/diagnosticMessages.generated.json +3 -0
- package/lib/ru/diagnosticMessages.generated.json +3 -0
- package/lib/tsc.js +935 -729
- package/lib/tsserver.js +1251 -1045
- package/lib/tsserverlibrary.d.ts +84 -66
- package/lib/tsserverlibrary.js +1251 -1045
- package/lib/typescript.d.ts +84 -66
- package/lib/typescript.js +1239 -1033
- package/lib/typescriptServices.d.ts +84 -66
- package/lib/typescriptServices.js +1239 -1033
- package/lib/typingsInstaller.js +1068 -862
- package/lib/zh-cn/diagnosticMessages.generated.json +3 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +3 -0
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220304";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -5420,6 +5420,9 @@ var ts;
|
|
|
5420
5420
|
Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
|
|
5421
5421
|
Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext_1452", "Resolution modes are only supported when `moduleResolution` is `node12` or `nodenext`."),
|
|
5422
5422
|
resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
|
|
5423
|
+
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
5424
|
+
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
5425
|
+
Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, ts.DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),
|
|
5423
5426
|
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
5424
5427
|
Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
|
|
5425
5428
|
catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -5912,6 +5915,7 @@ var ts;
|
|
|
5912
5915
|
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"),
|
|
5913
5916
|
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
5914
5917
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
5918
|
+
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
5915
5919
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
5916
5920
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.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}'."),
|
|
5917
5921
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.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}'."),
|
|
@@ -9330,8 +9334,8 @@ var ts;
|
|
|
9330
9334
|
switch (declaration.kind) {
|
|
9331
9335
|
case 79:
|
|
9332
9336
|
return declaration;
|
|
9333
|
-
case
|
|
9334
|
-
case
|
|
9337
|
+
case 346:
|
|
9338
|
+
case 339: {
|
|
9335
9339
|
var name = declaration.name;
|
|
9336
9340
|
if (name.kind === 160) {
|
|
9337
9341
|
return name.right;
|
|
@@ -9355,9 +9359,9 @@ var ts;
|
|
|
9355
9359
|
return undefined;
|
|
9356
9360
|
}
|
|
9357
9361
|
}
|
|
9358
|
-
case
|
|
9362
|
+
case 344:
|
|
9359
9363
|
return getNameOfJSDocTypedef(declaration);
|
|
9360
|
-
case
|
|
9364
|
+
case 338:
|
|
9361
9365
|
return nameForNamelessJSDocTypedef(declaration);
|
|
9362
9366
|
case 270: {
|
|
9363
9367
|
var expression = declaration.expression;
|
|
@@ -9581,12 +9585,12 @@ var ts;
|
|
|
9581
9585
|
ts.getAllJSDocTagsOfKind = getAllJSDocTagsOfKind;
|
|
9582
9586
|
function getTextOfJSDocComment(comment) {
|
|
9583
9587
|
return typeof comment === "string" ? comment
|
|
9584
|
-
: comment === null || comment === void 0 ? void 0 : comment.map(function (c) { return c.kind ===
|
|
9588
|
+
: comment === null || comment === void 0 ? void 0 : comment.map(function (c) { return c.kind === 320 ? c.text : formatJSDocLink(c); }).join("");
|
|
9585
9589
|
}
|
|
9586
9590
|
ts.getTextOfJSDocComment = getTextOfJSDocComment;
|
|
9587
9591
|
function formatJSDocLink(link) {
|
|
9588
|
-
var kind = link.kind ===
|
|
9589
|
-
: link.kind ===
|
|
9592
|
+
var kind = link.kind === 323 ? "link"
|
|
9593
|
+
: link.kind === 324 ? "linkcode"
|
|
9590
9594
|
: "linkplain";
|
|
9591
9595
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
9592
9596
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
@@ -9597,7 +9601,7 @@ var ts;
|
|
|
9597
9601
|
return ts.emptyArray;
|
|
9598
9602
|
}
|
|
9599
9603
|
if (ts.isJSDocTypeAlias(node)) {
|
|
9600
|
-
ts.Debug.assert(node.parent.kind ===
|
|
9604
|
+
ts.Debug.assert(node.parent.kind === 319);
|
|
9601
9605
|
return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
|
|
9602
9606
|
}
|
|
9603
9607
|
if (node.typeParameters) {
|
|
@@ -9692,8 +9696,8 @@ var ts;
|
|
|
9692
9696
|
ts.isNamedExportBindings = isNamedExportBindings;
|
|
9693
9697
|
function isUnparsedTextLike(node) {
|
|
9694
9698
|
switch (node.kind) {
|
|
9695
|
-
case 300:
|
|
9696
9699
|
case 301:
|
|
9700
|
+
case 302:
|
|
9697
9701
|
return true;
|
|
9698
9702
|
default:
|
|
9699
9703
|
return false;
|
|
@@ -9702,12 +9706,12 @@ var ts;
|
|
|
9702
9706
|
ts.isUnparsedTextLike = isUnparsedTextLike;
|
|
9703
9707
|
function isUnparsedNode(node) {
|
|
9704
9708
|
return isUnparsedTextLike(node) ||
|
|
9705
|
-
node.kind ===
|
|
9706
|
-
node.kind ===
|
|
9709
|
+
node.kind === 299 ||
|
|
9710
|
+
node.kind === 303;
|
|
9707
9711
|
}
|
|
9708
9712
|
ts.isUnparsedNode = isUnparsedNode;
|
|
9709
9713
|
function isJSDocPropertyLikeTag(node) {
|
|
9710
|
-
return node.kind ===
|
|
9714
|
+
return node.kind === 346 || node.kind === 339;
|
|
9711
9715
|
}
|
|
9712
9716
|
ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag;
|
|
9713
9717
|
function isNode(node) {
|
|
@@ -9878,11 +9882,11 @@ var ts;
|
|
|
9878
9882
|
switch (kind) {
|
|
9879
9883
|
case 167:
|
|
9880
9884
|
case 173:
|
|
9881
|
-
case
|
|
9885
|
+
case 322:
|
|
9882
9886
|
case 174:
|
|
9883
9887
|
case 175:
|
|
9884
9888
|
case 178:
|
|
9885
|
-
case
|
|
9889
|
+
case 316:
|
|
9886
9890
|
case 179:
|
|
9887
9891
|
return true;
|
|
9888
9892
|
default:
|
|
@@ -9940,9 +9944,9 @@ var ts;
|
|
|
9940
9944
|
ts.isClassOrTypeElement = isClassOrTypeElement;
|
|
9941
9945
|
function isObjectLiteralElementLike(node) {
|
|
9942
9946
|
var kind = node.kind;
|
|
9943
|
-
return kind ===
|
|
9944
|
-
|| kind === 295
|
|
9947
|
+
return kind === 295
|
|
9945
9948
|
|| kind === 296
|
|
9949
|
+
|| kind === 297
|
|
9946
9950
|
|| kind === 168
|
|
9947
9951
|
|| kind === 171
|
|
9948
9952
|
|| kind === 172;
|
|
@@ -10009,9 +10013,9 @@ var ts;
|
|
|
10009
10013
|
function isObjectBindingOrAssignmentElement(node) {
|
|
10010
10014
|
switch (node.kind) {
|
|
10011
10015
|
case 202:
|
|
10012
|
-
case 294:
|
|
10013
10016
|
case 295:
|
|
10014
10017
|
case 296:
|
|
10018
|
+
case 297:
|
|
10015
10019
|
return true;
|
|
10016
10020
|
}
|
|
10017
10021
|
return false;
|
|
@@ -10147,8 +10151,8 @@ var ts;
|
|
|
10147
10151
|
case 224:
|
|
10148
10152
|
case 228:
|
|
10149
10153
|
case 226:
|
|
10154
|
+
case 350:
|
|
10150
10155
|
case 349:
|
|
10151
|
-
case 348:
|
|
10152
10156
|
return true;
|
|
10153
10157
|
default:
|
|
10154
10158
|
return isUnaryExpressionKind(kind);
|
|
@@ -10250,7 +10254,7 @@ var ts;
|
|
|
10250
10254
|
|| kind === 169
|
|
10251
10255
|
|| kind === 170
|
|
10252
10256
|
|| kind === 259
|
|
10253
|
-
|| kind ===
|
|
10257
|
+
|| kind === 298
|
|
10254
10258
|
|| kind === 274
|
|
10255
10259
|
|| kind === 255
|
|
10256
10260
|
|| kind === 212
|
|
@@ -10267,17 +10271,17 @@ var ts;
|
|
|
10267
10271
|
|| kind === 267
|
|
10268
10272
|
|| kind === 273
|
|
10269
10273
|
|| kind === 163
|
|
10270
|
-
|| kind ===
|
|
10274
|
+
|| kind === 295
|
|
10271
10275
|
|| kind === 166
|
|
10272
10276
|
|| kind === 165
|
|
10273
10277
|
|| kind === 172
|
|
10274
|
-
|| kind ===
|
|
10278
|
+
|| kind === 296
|
|
10275
10279
|
|| kind === 258
|
|
10276
10280
|
|| kind === 162
|
|
10277
10281
|
|| kind === 253
|
|
10278
|
-
|| kind ===
|
|
10279
|
-
|| kind ===
|
|
10280
|
-
|| kind ===
|
|
10282
|
+
|| kind === 344
|
|
10283
|
+
|| kind === 337
|
|
10284
|
+
|| kind === 346;
|
|
10281
10285
|
}
|
|
10282
10286
|
function isDeclarationStatementKind(kind) {
|
|
10283
10287
|
return kind === 255
|
|
@@ -10312,13 +10316,13 @@ var ts;
|
|
|
10312
10316
|
|| kind === 236
|
|
10313
10317
|
|| kind === 240
|
|
10314
10318
|
|| kind === 247
|
|
10315
|
-
|| kind ===
|
|
10316
|
-
|| kind ===
|
|
10317
|
-
|| kind ===
|
|
10319
|
+
|| kind === 348
|
|
10320
|
+
|| kind === 352
|
|
10321
|
+
|| kind === 351;
|
|
10318
10322
|
}
|
|
10319
10323
|
function isDeclaration(node) {
|
|
10320
10324
|
if (node.kind === 162) {
|
|
10321
|
-
return (node.parent && node.parent.kind !==
|
|
10325
|
+
return (node.parent && node.parent.kind !== 343) || ts.isInJSFile(node);
|
|
10322
10326
|
}
|
|
10323
10327
|
return isDeclarationKind(node.kind);
|
|
10324
10328
|
}
|
|
@@ -10403,13 +10407,13 @@ var ts;
|
|
|
10403
10407
|
}
|
|
10404
10408
|
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
|
|
10405
10409
|
function isJSDocNode(node) {
|
|
10406
|
-
return node.kind >=
|
|
10410
|
+
return node.kind >= 308 && node.kind <= 346;
|
|
10407
10411
|
}
|
|
10408
10412
|
ts.isJSDocNode = isJSDocNode;
|
|
10409
10413
|
function isJSDocCommentContainingNode(node) {
|
|
10410
|
-
return node.kind ===
|
|
10411
|
-
|| node.kind ===
|
|
10412
|
-
|| node.kind ===
|
|
10414
|
+
return node.kind === 319
|
|
10415
|
+
|| node.kind === 318
|
|
10416
|
+
|| node.kind === 320
|
|
10413
10417
|
|| isJSDocLinkLike(node)
|
|
10414
10418
|
|| isJSDocTag(node)
|
|
10415
10419
|
|| ts.isJSDocTypeLiteral(node)
|
|
@@ -10417,7 +10421,7 @@ var ts;
|
|
|
10417
10421
|
}
|
|
10418
10422
|
ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
|
|
10419
10423
|
function isJSDocTag(node) {
|
|
10420
|
-
return node.kind >=
|
|
10424
|
+
return node.kind >= 326 && node.kind <= 346;
|
|
10421
10425
|
}
|
|
10422
10426
|
ts.isJSDocTag = isJSDocTag;
|
|
10423
10427
|
function isSetAccessor(node) {
|
|
@@ -10448,8 +10452,8 @@ var ts;
|
|
|
10448
10452
|
case 202:
|
|
10449
10453
|
case 165:
|
|
10450
10454
|
case 166:
|
|
10451
|
-
case
|
|
10452
|
-
case
|
|
10455
|
+
case 295:
|
|
10456
|
+
case 298:
|
|
10453
10457
|
return true;
|
|
10454
10458
|
default:
|
|
10455
10459
|
return false;
|
|
@@ -10493,7 +10497,7 @@ var ts;
|
|
|
10493
10497
|
}
|
|
10494
10498
|
ts.isStringLiteralLike = isStringLiteralLike;
|
|
10495
10499
|
function isJSDocLinkLike(node) {
|
|
10496
|
-
return node.kind ===
|
|
10500
|
+
return node.kind === 323 || node.kind === 324 || node.kind === 325;
|
|
10497
10501
|
}
|
|
10498
10502
|
ts.isJSDocLinkLike = isJSDocLinkLike;
|
|
10499
10503
|
})(ts || (ts = {}));
|
|
@@ -10732,7 +10736,7 @@ var ts;
|
|
|
10732
10736
|
}
|
|
10733
10737
|
}
|
|
10734
10738
|
function getSourceFileOfNode(node) {
|
|
10735
|
-
while (node && node.kind !==
|
|
10739
|
+
while (node && node.kind !== 304) {
|
|
10736
10740
|
node = node.parent;
|
|
10737
10741
|
}
|
|
10738
10742
|
return node;
|
|
@@ -10902,7 +10906,7 @@ var ts;
|
|
|
10902
10906
|
if (includeJsDoc && ts.hasJSDocNodes(node)) {
|
|
10903
10907
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
10904
10908
|
}
|
|
10905
|
-
if (node.kind ===
|
|
10909
|
+
if (node.kind === 347 && node._children.length > 0) {
|
|
10906
10910
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
10907
10911
|
}
|
|
10908
10912
|
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, false, false, isInJSDoc(node));
|
|
@@ -11140,7 +11144,7 @@ var ts;
|
|
|
11140
11144
|
return !!node && node.kind === 260 && (!node.body);
|
|
11141
11145
|
}
|
|
11142
11146
|
function isBlockScopedContainerTopLevel(node) {
|
|
11143
|
-
return node.kind ===
|
|
11147
|
+
return node.kind === 304 ||
|
|
11144
11148
|
node.kind === 260 ||
|
|
11145
11149
|
ts.isFunctionLikeOrClassStaticBlockDeclaration(node);
|
|
11146
11150
|
}
|
|
@@ -11155,7 +11159,7 @@ var ts;
|
|
|
11155
11159
|
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
|
|
11156
11160
|
function isModuleAugmentationExternal(node) {
|
|
11157
11161
|
switch (node.parent.kind) {
|
|
11158
|
-
case
|
|
11162
|
+
case 304:
|
|
11159
11163
|
return ts.isExternalModule(node.parent);
|
|
11160
11164
|
case 261:
|
|
11161
11165
|
return isAmbientModule(node.parent.parent) && ts.isSourceFile(node.parent.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
|
|
@@ -11205,7 +11209,7 @@ var ts;
|
|
|
11205
11209
|
ts.isEffectiveStrictModeSourceFile = isEffectiveStrictModeSourceFile;
|
|
11206
11210
|
function isBlockScope(node, parentNode) {
|
|
11207
11211
|
switch (node.kind) {
|
|
11208
|
-
case
|
|
11212
|
+
case 304:
|
|
11209
11213
|
case 262:
|
|
11210
11214
|
case 291:
|
|
11211
11215
|
case 260:
|
|
@@ -11230,9 +11234,9 @@ var ts;
|
|
|
11230
11234
|
ts.isBlockScope = isBlockScope;
|
|
11231
11235
|
function isDeclarationWithTypeParameters(node) {
|
|
11232
11236
|
switch (node.kind) {
|
|
11233
|
-
case
|
|
11234
|
-
case
|
|
11235
|
-
case
|
|
11237
|
+
case 337:
|
|
11238
|
+
case 344:
|
|
11239
|
+
case 322:
|
|
11236
11240
|
return true;
|
|
11237
11241
|
default:
|
|
11238
11242
|
ts.assertType(node);
|
|
@@ -11248,12 +11252,12 @@ var ts;
|
|
|
11248
11252
|
case 175:
|
|
11249
11253
|
case 178:
|
|
11250
11254
|
case 179:
|
|
11251
|
-
case
|
|
11255
|
+
case 316:
|
|
11252
11256
|
case 256:
|
|
11253
11257
|
case 225:
|
|
11254
11258
|
case 257:
|
|
11255
11259
|
case 258:
|
|
11256
|
-
case
|
|
11260
|
+
case 343:
|
|
11257
11261
|
case 255:
|
|
11258
11262
|
case 168:
|
|
11259
11263
|
case 170:
|
|
@@ -11361,7 +11365,7 @@ var ts;
|
|
|
11361
11365
|
else {
|
|
11362
11366
|
return ts.Debug.assertNever(name.name);
|
|
11363
11367
|
}
|
|
11364
|
-
case
|
|
11368
|
+
case 310:
|
|
11365
11369
|
return entityNameToString(name.left) + entityNameToString(name.right);
|
|
11366
11370
|
default:
|
|
11367
11371
|
return ts.Debug.assertNever(name);
|
|
@@ -11463,7 +11467,7 @@ var ts;
|
|
|
11463
11467
|
function getErrorSpanForNode(sourceFile, node) {
|
|
11464
11468
|
var errorNode = node;
|
|
11465
11469
|
switch (node.kind) {
|
|
11466
|
-
case
|
|
11470
|
+
case 304:
|
|
11467
11471
|
var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
|
|
11468
11472
|
if (pos_1 === sourceFile.text.length) {
|
|
11469
11473
|
return ts.createTextSpan(0, 0);
|
|
@@ -11476,7 +11480,7 @@ var ts;
|
|
|
11476
11480
|
case 257:
|
|
11477
11481
|
case 260:
|
|
11478
11482
|
case 259:
|
|
11479
|
-
case
|
|
11483
|
+
case 298:
|
|
11480
11484
|
case 255:
|
|
11481
11485
|
case 212:
|
|
11482
11486
|
case 168:
|
|
@@ -11654,7 +11658,7 @@ var ts;
|
|
|
11654
11658
|
return ts.isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
|
|
11655
11659
|
case 162:
|
|
11656
11660
|
return node === parent.constraint;
|
|
11657
|
-
case
|
|
11661
|
+
case 343:
|
|
11658
11662
|
return node === parent.constraint;
|
|
11659
11663
|
case 166:
|
|
11660
11664
|
case 165:
|
|
@@ -11781,12 +11785,12 @@ var ts;
|
|
|
11781
11785
|
if (node) {
|
|
11782
11786
|
switch (node.kind) {
|
|
11783
11787
|
case 202:
|
|
11784
|
-
case
|
|
11788
|
+
case 298:
|
|
11785
11789
|
case 163:
|
|
11786
|
-
case
|
|
11790
|
+
case 295:
|
|
11787
11791
|
case 166:
|
|
11788
11792
|
case 165:
|
|
11789
|
-
case
|
|
11793
|
+
case 296:
|
|
11790
11794
|
case 253:
|
|
11791
11795
|
return true;
|
|
11792
11796
|
}
|
|
@@ -11859,7 +11863,7 @@ var ts;
|
|
|
11859
11863
|
ts.isThisTypePredicate = isThisTypePredicate;
|
|
11860
11864
|
function getPropertyAssignment(objectLiteral, key, key2) {
|
|
11861
11865
|
return objectLiteral.properties.filter(function (property) {
|
|
11862
|
-
if (property.kind ===
|
|
11866
|
+
if (property.kind === 295) {
|
|
11863
11867
|
var propName = getTextOfPropertyName(property.name);
|
|
11864
11868
|
return key === propName || (!!key2 && key2 === propName);
|
|
11865
11869
|
}
|
|
@@ -11921,7 +11925,7 @@ var ts;
|
|
|
11921
11925
|
}
|
|
11922
11926
|
ts.getContainingFunctionOrClassStaticBlock = getContainingFunctionOrClassStaticBlock;
|
|
11923
11927
|
function getThisContainer(node, includeArrowFunctions) {
|
|
11924
|
-
ts.Debug.assert(node.kind !==
|
|
11928
|
+
ts.Debug.assert(node.kind !== 304);
|
|
11925
11929
|
while (true) {
|
|
11926
11930
|
node = node.parent;
|
|
11927
11931
|
if (!node) {
|
|
@@ -11961,7 +11965,7 @@ var ts;
|
|
|
11961
11965
|
case 174:
|
|
11962
11966
|
case 175:
|
|
11963
11967
|
case 259:
|
|
11964
|
-
case
|
|
11968
|
+
case 304:
|
|
11965
11969
|
return node;
|
|
11966
11970
|
}
|
|
11967
11971
|
}
|
|
@@ -12224,7 +12228,7 @@ var ts;
|
|
|
12224
12228
|
node = node.parent;
|
|
12225
12229
|
}
|
|
12226
12230
|
return node.parent.kind === 180 || ts.isJSDocLinkLike(node.parent) || ts.isJSDocNameReference(node.parent) || ts.isJSDocMemberName(node.parent) || isJSXTagName(node);
|
|
12227
|
-
case
|
|
12231
|
+
case 310:
|
|
12228
12232
|
while (ts.isJSDocMemberName(node.parent)) {
|
|
12229
12233
|
node = node.parent;
|
|
12230
12234
|
}
|
|
@@ -12253,8 +12257,8 @@ var ts;
|
|
|
12253
12257
|
case 163:
|
|
12254
12258
|
case 166:
|
|
12255
12259
|
case 165:
|
|
12256
|
-
case
|
|
12257
|
-
case
|
|
12260
|
+
case 298:
|
|
12261
|
+
case 295:
|
|
12258
12262
|
case 202:
|
|
12259
12263
|
return parent.initializer === node;
|
|
12260
12264
|
case 237:
|
|
@@ -12287,11 +12291,11 @@ var ts;
|
|
|
12287
12291
|
case 164:
|
|
12288
12292
|
case 287:
|
|
12289
12293
|
case 286:
|
|
12290
|
-
case
|
|
12294
|
+
case 297:
|
|
12291
12295
|
return true;
|
|
12292
12296
|
case 227:
|
|
12293
12297
|
return parent.expression === node && !isPartOfTypeNode(parent);
|
|
12294
|
-
case
|
|
12298
|
+
case 296:
|
|
12295
12299
|
return parent.objectAssignmentInitializer === node;
|
|
12296
12300
|
default:
|
|
12297
12301
|
return isExpressionNode(parent);
|
|
@@ -12781,8 +12785,8 @@ var ts;
|
|
|
12781
12785
|
case 163:
|
|
12782
12786
|
case 168:
|
|
12783
12787
|
case 167:
|
|
12788
|
+
case 296:
|
|
12784
12789
|
case 295:
|
|
12785
|
-
case 294:
|
|
12786
12790
|
case 166:
|
|
12787
12791
|
case 165:
|
|
12788
12792
|
return node.questionToken !== undefined;
|
|
@@ -12798,7 +12802,7 @@ var ts;
|
|
|
12798
12802
|
}
|
|
12799
12803
|
ts.isJSDocConstructSignature = isJSDocConstructSignature;
|
|
12800
12804
|
function isJSDocTypeAlias(node) {
|
|
12801
|
-
return node.kind ===
|
|
12805
|
+
return node.kind === 344 || node.kind === 337 || node.kind === 338;
|
|
12802
12806
|
}
|
|
12803
12807
|
ts.isJSDocTypeAlias = isJSDocTypeAlias;
|
|
12804
12808
|
function isTypeAlias(node) {
|
|
@@ -12828,7 +12832,7 @@ var ts;
|
|
|
12828
12832
|
return v && v.initializer;
|
|
12829
12833
|
case 166:
|
|
12830
12834
|
return node.initializer;
|
|
12831
|
-
case
|
|
12835
|
+
case 295:
|
|
12832
12836
|
return node.initializer;
|
|
12833
12837
|
}
|
|
12834
12838
|
}
|
|
@@ -12883,7 +12887,7 @@ var ts;
|
|
|
12883
12887
|
}
|
|
12884
12888
|
function getNextJSDocCommentLocation(node) {
|
|
12885
12889
|
var parent = node.parent;
|
|
12886
|
-
if (parent.kind ===
|
|
12890
|
+
if (parent.kind === 295 ||
|
|
12887
12891
|
parent.kind === 270 ||
|
|
12888
12892
|
parent.kind === 166 ||
|
|
12889
12893
|
parent.kind === 237 && node.kind === 205 ||
|
|
@@ -12976,7 +12980,7 @@ var ts;
|
|
|
12976
12980
|
ts.hasRestParameter = hasRestParameter;
|
|
12977
12981
|
function isRestParameter(node) {
|
|
12978
12982
|
var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
|
|
12979
|
-
return node.dotDotDotToken !== undefined || !!type && type.kind ===
|
|
12983
|
+
return node.dotDotDotToken !== undefined || !!type && type.kind === 317;
|
|
12980
12984
|
}
|
|
12981
12985
|
ts.isRestParameter = isRestParameter;
|
|
12982
12986
|
function hasTypeArguments(node) {
|
|
@@ -13005,16 +13009,16 @@ var ts;
|
|
|
13005
13009
|
case 229:
|
|
13006
13010
|
node = parent;
|
|
13007
13011
|
break;
|
|
13008
|
-
case
|
|
13012
|
+
case 297:
|
|
13009
13013
|
node = parent.parent;
|
|
13010
13014
|
break;
|
|
13011
|
-
case
|
|
13015
|
+
case 296:
|
|
13012
13016
|
if (parent.name !== node) {
|
|
13013
13017
|
return 0;
|
|
13014
13018
|
}
|
|
13015
13019
|
node = parent.parent;
|
|
13016
13020
|
break;
|
|
13017
|
-
case
|
|
13021
|
+
case 295:
|
|
13018
13022
|
if (parent.name === node) {
|
|
13019
13023
|
return 0;
|
|
13020
13024
|
}
|
|
@@ -13156,8 +13160,8 @@ var ts;
|
|
|
13156
13160
|
case 167:
|
|
13157
13161
|
case 171:
|
|
13158
13162
|
case 172:
|
|
13159
|
-
case
|
|
13160
|
-
case
|
|
13163
|
+
case 298:
|
|
13164
|
+
case 295:
|
|
13161
13165
|
case 205:
|
|
13162
13166
|
return parent.name === node;
|
|
13163
13167
|
case 160:
|
|
@@ -13183,8 +13187,8 @@ var ts;
|
|
|
13183
13187
|
node.kind === 270 && exportAssignmentIsAlias(node) ||
|
|
13184
13188
|
ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 && exportAssignmentIsAlias(node) ||
|
|
13185
13189
|
ts.isPropertyAccessExpression(node) && ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 && isAliasableExpression(node.parent.right) ||
|
|
13186
|
-
node.kind ===
|
|
13187
|
-
node.kind ===
|
|
13190
|
+
node.kind === 296 ||
|
|
13191
|
+
node.kind === 295 && isAliasableExpression(node.initializer);
|
|
13188
13192
|
}
|
|
13189
13193
|
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
|
|
13190
13194
|
function getAliasDeclarationFromName(node) {
|
|
@@ -13218,7 +13222,7 @@ var ts;
|
|
|
13218
13222
|
}
|
|
13219
13223
|
ts.getExportAssignmentExpression = getExportAssignmentExpression;
|
|
13220
13224
|
function getPropertyAssignmentAliasLikeExpression(node) {
|
|
13221
|
-
return node.kind ===
|
|
13225
|
+
return node.kind === 296 ? node.name : node.kind === 295 ? node.initializer :
|
|
13222
13226
|
node.parent.right;
|
|
13223
13227
|
}
|
|
13224
13228
|
ts.getPropertyAssignmentAliasLikeExpression = getPropertyAssignmentAliasLikeExpression;
|
|
@@ -13466,7 +13470,7 @@ var ts;
|
|
|
13466
13470
|
|| kind === 171
|
|
13467
13471
|
|| kind === 172
|
|
13468
13472
|
|| kind === 260
|
|
13469
|
-
|| kind ===
|
|
13473
|
+
|| kind === 304;
|
|
13470
13474
|
}
|
|
13471
13475
|
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
|
|
13472
13476
|
function nodeIsSynthesized(range) {
|
|
@@ -13541,7 +13545,7 @@ var ts;
|
|
|
13541
13545
|
ts.getOperator = getOperator;
|
|
13542
13546
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
13543
13547
|
switch (nodeKind) {
|
|
13544
|
-
case
|
|
13548
|
+
case 350:
|
|
13545
13549
|
return 0;
|
|
13546
13550
|
case 224:
|
|
13547
13551
|
return 1;
|
|
@@ -14280,7 +14284,7 @@ var ts;
|
|
|
14280
14284
|
}
|
|
14281
14285
|
ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
|
|
14282
14286
|
function isNonTypeAliasTemplate(tag) {
|
|
14283
|
-
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind ===
|
|
14287
|
+
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 && tag.parent.tags.some(isJSDocTypeAlias));
|
|
14284
14288
|
}
|
|
14285
14289
|
function getEffectiveSetAccessorTypeAnnotationNode(node) {
|
|
14286
14290
|
var parameter = getSetAccessorValueParameter(node);
|
|
@@ -15058,11 +15062,11 @@ var ts;
|
|
|
15058
15062
|
: 0;
|
|
15059
15063
|
case 205:
|
|
15060
15064
|
return parent.name !== node ? 0 : accessKind(parent);
|
|
15061
|
-
case
|
|
15065
|
+
case 295: {
|
|
15062
15066
|
var parentAccess = accessKind(parent.parent);
|
|
15063
15067
|
return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess;
|
|
15064
15068
|
}
|
|
15065
|
-
case
|
|
15069
|
+
case 296:
|
|
15066
15070
|
return node === parent.objectAssignmentInitializer ? 0 : accessKind(parent.parent);
|
|
15067
15071
|
case 203:
|
|
15068
15072
|
return accessKind(parent);
|
|
@@ -15210,13 +15214,13 @@ var ts;
|
|
|
15210
15214
|
|| kind === 152
|
|
15211
15215
|
|| kind === 143
|
|
15212
15216
|
|| kind === 227
|
|
15213
|
-
|| kind === 310
|
|
15214
15217
|
|| kind === 311
|
|
15215
15218
|
|| kind === 312
|
|
15216
15219
|
|| kind === 313
|
|
15217
15220
|
|| kind === 314
|
|
15218
15221
|
|| kind === 315
|
|
15219
|
-
|| kind === 316
|
|
15222
|
+
|| kind === 316
|
|
15223
|
+
|| kind === 317;
|
|
15220
15224
|
}
|
|
15221
15225
|
ts.isTypeNodeKind = isTypeNodeKind;
|
|
15222
15226
|
function isAccessExpression(node) {
|
|
@@ -15275,7 +15279,7 @@ var ts;
|
|
|
15275
15279
|
case 206:
|
|
15276
15280
|
case 205:
|
|
15277
15281
|
case 229:
|
|
15278
|
-
case
|
|
15282
|
+
case 349:
|
|
15279
15283
|
node = node.expression;
|
|
15280
15284
|
continue;
|
|
15281
15285
|
}
|
|
@@ -16529,7 +16533,7 @@ var ts;
|
|
|
16529
16533
|
return parent.types;
|
|
16530
16534
|
case 183:
|
|
16531
16535
|
case 203:
|
|
16532
|
-
case
|
|
16536
|
+
case 350:
|
|
16533
16537
|
case 268:
|
|
16534
16538
|
case 272:
|
|
16535
16539
|
return parent.elements;
|
|
@@ -16559,7 +16563,7 @@ var ts;
|
|
|
16559
16563
|
return ts.isClassElement(node) ? parent.members : undefined;
|
|
16560
16564
|
case 259:
|
|
16561
16565
|
return ts.isEnumMember(node) ? parent.members : undefined;
|
|
16562
|
-
case
|
|
16566
|
+
case 304:
|
|
16563
16567
|
return parent.statements;
|
|
16564
16568
|
}
|
|
16565
16569
|
}
|
|
@@ -16713,6 +16717,7 @@ var ts;
|
|
|
16713
16717
|
parenthesizeExpressionForDisallowedComma: parenthesizeExpressionForDisallowedComma,
|
|
16714
16718
|
parenthesizeExpressionOfExpressionStatement: parenthesizeExpressionOfExpressionStatement,
|
|
16715
16719
|
parenthesizeConciseBodyOfArrowFunction: parenthesizeConciseBodyOfArrowFunction,
|
|
16720
|
+
parenthesizeCheckTypeOfConditionalType: parenthesizeCheckTypeOfConditionalType,
|
|
16716
16721
|
parenthesizeMemberOfConditionalType: parenthesizeMemberOfConditionalType,
|
|
16717
16722
|
parenthesizeMemberOfElementType: parenthesizeMemberOfElementType,
|
|
16718
16723
|
parenthesizeElementTypeOfArrayType: parenthesizeElementTypeOfArrayType,
|
|
@@ -16905,6 +16910,10 @@ var ts;
|
|
|
16905
16910
|
}
|
|
16906
16911
|
return body;
|
|
16907
16912
|
}
|
|
16913
|
+
function parenthesizeCheckTypeOfConditionalType(member) {
|
|
16914
|
+
return ts.isInferTypeNode(member) ? factory.createParenthesizedType(member) :
|
|
16915
|
+
parenthesizeMemberOfConditionalType(member);
|
|
16916
|
+
}
|
|
16908
16917
|
function parenthesizeMemberOfConditionalType(member) {
|
|
16909
16918
|
return member.kind === 188 ? factory.createParenthesizedType(member) : member;
|
|
16910
16919
|
}
|
|
@@ -16957,6 +16966,7 @@ var ts;
|
|
|
16957
16966
|
parenthesizeExpressionForDisallowedComma: ts.identity,
|
|
16958
16967
|
parenthesizeExpressionOfExpressionStatement: ts.identity,
|
|
16959
16968
|
parenthesizeConciseBodyOfArrowFunction: ts.identity,
|
|
16969
|
+
parenthesizeCheckTypeOfConditionalType: ts.identity,
|
|
16960
16970
|
parenthesizeMemberOfConditionalType: ts.identity,
|
|
16961
16971
|
parenthesizeMemberOfElementType: ts.identity,
|
|
16962
16972
|
parenthesizeElementTypeOfArrayType: ts.identity,
|
|
@@ -17337,6 +17347,8 @@ var ts;
|
|
|
17337
17347
|
updateAssertClause: updateAssertClause,
|
|
17338
17348
|
createAssertEntry: createAssertEntry,
|
|
17339
17349
|
updateAssertEntry: updateAssertEntry,
|
|
17350
|
+
createImportTypeAssertionContainer: createImportTypeAssertionContainer,
|
|
17351
|
+
updateImportTypeAssertionContainer: updateImportTypeAssertionContainer,
|
|
17340
17352
|
createNamespaceImport: createNamespaceImport,
|
|
17341
17353
|
updateNamespaceImport: updateNamespaceImport,
|
|
17342
17354
|
createNamespaceExport: createNamespaceExport,
|
|
@@ -17356,18 +17368,18 @@ var ts;
|
|
|
17356
17368
|
createMissingDeclaration: createMissingDeclaration,
|
|
17357
17369
|
createExternalModuleReference: createExternalModuleReference,
|
|
17358
17370
|
updateExternalModuleReference: updateExternalModuleReference,
|
|
17359
|
-
get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(
|
|
17360
|
-
get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(
|
|
17361
|
-
get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(
|
|
17362
|
-
get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(
|
|
17363
|
-
get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(
|
|
17364
|
-
get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(
|
|
17365
|
-
get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(
|
|
17366
|
-
get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(
|
|
17367
|
-
get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(
|
|
17368
|
-
get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(
|
|
17369
|
-
get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(
|
|
17370
|
-
get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(
|
|
17371
|
+
get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(311); },
|
|
17372
|
+
get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(312); },
|
|
17373
|
+
get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(314); },
|
|
17374
|
+
get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(314); },
|
|
17375
|
+
get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(313); },
|
|
17376
|
+
get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(313); },
|
|
17377
|
+
get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(315); },
|
|
17378
|
+
get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(315); },
|
|
17379
|
+
get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(317); },
|
|
17380
|
+
get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(317); },
|
|
17381
|
+
get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(318); },
|
|
17382
|
+
get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(318); },
|
|
17371
17383
|
createJSDocFunctionType: createJSDocFunctionType,
|
|
17372
17384
|
updateJSDocFunctionType: updateJSDocFunctionType,
|
|
17373
17385
|
createJSDocTypeLiteral: createJSDocTypeLiteral,
|
|
@@ -17402,30 +17414,30 @@ var ts;
|
|
|
17402
17414
|
updateJSDocLinkCode: updateJSDocLinkCode,
|
|
17403
17415
|
createJSDocLinkPlain: createJSDocLinkPlain,
|
|
17404
17416
|
updateJSDocLinkPlain: updateJSDocLinkPlain,
|
|
17405
|
-
get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(
|
|
17406
|
-
get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(
|
|
17407
|
-
get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(
|
|
17408
|
-
get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(
|
|
17409
|
-
get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(
|
|
17410
|
-
get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(
|
|
17411
|
-
get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(
|
|
17412
|
-
get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(
|
|
17413
|
-
get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(
|
|
17414
|
-
get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17415
|
-
get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(
|
|
17416
|
-
get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17417
|
-
get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(
|
|
17418
|
-
get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17419
|
-
get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(
|
|
17420
|
-
get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17421
|
-
get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(
|
|
17422
|
-
get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17423
|
-
get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(
|
|
17424
|
-
get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17425
|
-
get createJSDocOverrideTag() { return getJSDocSimpleTagCreateFunction(
|
|
17426
|
-
get updateJSDocOverrideTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17427
|
-
get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(
|
|
17428
|
-
get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(
|
|
17417
|
+
get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(342); },
|
|
17418
|
+
get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(342); },
|
|
17419
|
+
get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(340); },
|
|
17420
|
+
get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(340); },
|
|
17421
|
+
get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(341); },
|
|
17422
|
+
get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(341); },
|
|
17423
|
+
get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(338); },
|
|
17424
|
+
get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(338); },
|
|
17425
|
+
get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(329); },
|
|
17426
|
+
get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(329); },
|
|
17427
|
+
get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(331); },
|
|
17428
|
+
get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(331); },
|
|
17429
|
+
get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(332); },
|
|
17430
|
+
get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(332); },
|
|
17431
|
+
get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(333); },
|
|
17432
|
+
get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(333); },
|
|
17433
|
+
get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(334); },
|
|
17434
|
+
get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(334); },
|
|
17435
|
+
get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(335); },
|
|
17436
|
+
get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(335); },
|
|
17437
|
+
get createJSDocOverrideTag() { return getJSDocSimpleTagCreateFunction(336); },
|
|
17438
|
+
get updateJSDocOverrideTag() { return getJSDocSimpleTagUpdateFunction(336); },
|
|
17439
|
+
get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(330); },
|
|
17440
|
+
get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(330); },
|
|
17429
17441
|
createJSDocUnknownTag: createJSDocUnknownTag,
|
|
17430
17442
|
updateJSDocUnknownTag: updateJSDocUnknownTag,
|
|
17431
17443
|
createJSDocText: createJSDocText,
|
|
@@ -17616,7 +17628,7 @@ var ts;
|
|
|
17616
17628
|
case 171:
|
|
17617
17629
|
case 172:
|
|
17618
17630
|
case 166:
|
|
17619
|
-
case
|
|
17631
|
+
case 295:
|
|
17620
17632
|
if (ts.isIdentifier(name)) {
|
|
17621
17633
|
node.transformFlags |= propagateIdentifierNameFlags(name);
|
|
17622
17634
|
break;
|
|
@@ -18386,7 +18398,7 @@ var ts;
|
|
|
18386
18398
|
}
|
|
18387
18399
|
function createConditionalTypeNode(checkType, extendsType, trueType, falseType) {
|
|
18388
18400
|
var node = createBaseNode(188);
|
|
18389
|
-
node.checkType = parenthesizerRules().
|
|
18401
|
+
node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType);
|
|
18390
18402
|
node.extendsType = parenthesizerRules().parenthesizeMemberOfConditionalType(extendsType);
|
|
18391
18403
|
node.trueType = trueType;
|
|
18392
18404
|
node.falseType = falseType;
|
|
@@ -18425,23 +18437,33 @@ var ts;
|
|
|
18425
18437
|
? update(createTemplateLiteralType(head, templateSpans), node)
|
|
18426
18438
|
: node;
|
|
18427
18439
|
}
|
|
18428
|
-
function createImportTypeNode(argument,
|
|
18429
|
-
|
|
18440
|
+
function createImportTypeNode(argument, qualifierOrAssertions, typeArgumentsOrQualifier, isTypeOfOrTypeArguments, isTypeOf) {
|
|
18441
|
+
var assertion = qualifierOrAssertions && qualifierOrAssertions.kind === 294 ? qualifierOrAssertions : undefined;
|
|
18442
|
+
var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
|
|
18443
|
+
: typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
|
|
18444
|
+
var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
|
|
18445
|
+
isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : false;
|
|
18430
18446
|
var node = createBaseNode(199);
|
|
18431
18447
|
node.argument = argument;
|
|
18448
|
+
node.assertions = assertion;
|
|
18432
18449
|
node.qualifier = qualifier;
|
|
18433
18450
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
18434
18451
|
node.isTypeOf = isTypeOf;
|
|
18435
18452
|
node.transformFlags = 1;
|
|
18436
18453
|
return node;
|
|
18437
18454
|
}
|
|
18438
|
-
function updateImportTypeNode(node, argument,
|
|
18439
|
-
|
|
18455
|
+
function updateImportTypeNode(node, argument, qualifierOrAssertions, typeArgumentsOrQualifier, isTypeOfOrTypeArguments, isTypeOf) {
|
|
18456
|
+
var assertion = qualifierOrAssertions && qualifierOrAssertions.kind === 294 ? qualifierOrAssertions : undefined;
|
|
18457
|
+
var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
|
|
18458
|
+
: typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
|
|
18459
|
+
var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
|
|
18460
|
+
isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : node.isTypeOf;
|
|
18440
18461
|
return node.argument !== argument
|
|
18462
|
+
|| node.assertions !== assertion
|
|
18441
18463
|
|| node.qualifier !== qualifier
|
|
18442
18464
|
|| node.typeArguments !== typeArguments
|
|
18443
18465
|
|| node.isTypeOf !== isTypeOf
|
|
18444
|
-
? update(createImportTypeNode(argument, qualifier, typeArguments, isTypeOf), node)
|
|
18466
|
+
? update(createImportTypeNode(argument, assertion, qualifier, typeArguments, isTypeOf), node)
|
|
18445
18467
|
: node;
|
|
18446
18468
|
}
|
|
18447
18469
|
function createParenthesizedType(type) {
|
|
@@ -19829,6 +19851,18 @@ var ts;
|
|
|
19829
19851
|
? update(createAssertEntry(name, value), node)
|
|
19830
19852
|
: node;
|
|
19831
19853
|
}
|
|
19854
|
+
function createImportTypeAssertionContainer(clause, multiLine) {
|
|
19855
|
+
var node = createBaseNode(294);
|
|
19856
|
+
node.assertClause = clause;
|
|
19857
|
+
node.multiLine = multiLine;
|
|
19858
|
+
return node;
|
|
19859
|
+
}
|
|
19860
|
+
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
19861
|
+
return node.assertClause !== clause
|
|
19862
|
+
|| node.multiLine !== multiLine
|
|
19863
|
+
? update(createImportTypeAssertionContainer(clause, multiLine), node)
|
|
19864
|
+
: node;
|
|
19865
|
+
}
|
|
19832
19866
|
function createNamespaceImport(name) {
|
|
19833
19867
|
var node = createBaseNode(267);
|
|
19834
19868
|
node.name = name;
|
|
@@ -19984,7 +20018,7 @@ var ts;
|
|
|
19984
20018
|
: node;
|
|
19985
20019
|
}
|
|
19986
20020
|
function createJSDocFunctionType(parameters, type) {
|
|
19987
|
-
var node = createBaseSignatureDeclaration(
|
|
20021
|
+
var node = createBaseSignatureDeclaration(316, undefined, undefined, undefined, undefined, parameters, type);
|
|
19988
20022
|
return node;
|
|
19989
20023
|
}
|
|
19990
20024
|
function updateJSDocFunctionType(node, parameters, type) {
|
|
@@ -19995,7 +20029,7 @@ var ts;
|
|
|
19995
20029
|
}
|
|
19996
20030
|
function createJSDocTypeLiteral(propertyTags, isArrayType) {
|
|
19997
20031
|
if (isArrayType === void 0) { isArrayType = false; }
|
|
19998
|
-
var node = createBaseNode(
|
|
20032
|
+
var node = createBaseNode(321);
|
|
19999
20033
|
node.jsDocPropertyTags = asNodeArray(propertyTags);
|
|
20000
20034
|
node.isArrayType = isArrayType;
|
|
20001
20035
|
return node;
|
|
@@ -20007,7 +20041,7 @@ var ts;
|
|
|
20007
20041
|
: node;
|
|
20008
20042
|
}
|
|
20009
20043
|
function createJSDocTypeExpression(type) {
|
|
20010
|
-
var node = createBaseNode(
|
|
20044
|
+
var node = createBaseNode(308);
|
|
20011
20045
|
node.type = type;
|
|
20012
20046
|
return node;
|
|
20013
20047
|
}
|
|
@@ -20017,7 +20051,7 @@ var ts;
|
|
|
20017
20051
|
: node;
|
|
20018
20052
|
}
|
|
20019
20053
|
function createJSDocSignature(typeParameters, parameters, type) {
|
|
20020
|
-
var node = createBaseNode(
|
|
20054
|
+
var node = createBaseNode(322);
|
|
20021
20055
|
node.typeParameters = asNodeArray(typeParameters);
|
|
20022
20056
|
node.parameters = createNodeArray(parameters);
|
|
20023
20057
|
node.type = type;
|
|
@@ -20043,7 +20077,7 @@ var ts;
|
|
|
20043
20077
|
return node;
|
|
20044
20078
|
}
|
|
20045
20079
|
function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
|
|
20046
|
-
var node = createBaseJSDocTag(
|
|
20080
|
+
var node = createBaseJSDocTag(343, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("template"), comment);
|
|
20047
20081
|
node.constraint = constraint;
|
|
20048
20082
|
node.typeParameters = createNodeArray(typeParameters);
|
|
20049
20083
|
return node;
|
|
@@ -20058,7 +20092,7 @@ var ts;
|
|
|
20058
20092
|
: node;
|
|
20059
20093
|
}
|
|
20060
20094
|
function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {
|
|
20061
|
-
var node = createBaseJSDocTag(
|
|
20095
|
+
var node = createBaseJSDocTag(344, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("typedef"), comment);
|
|
20062
20096
|
node.typeExpression = typeExpression;
|
|
20063
20097
|
node.fullName = fullName;
|
|
20064
20098
|
node.name = ts.getJSDocTypeAliasName(fullName);
|
|
@@ -20074,7 +20108,7 @@ var ts;
|
|
|
20074
20108
|
: node;
|
|
20075
20109
|
}
|
|
20076
20110
|
function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
20077
|
-
var node = createBaseJSDocTag(
|
|
20111
|
+
var node = createBaseJSDocTag(339, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("param"), comment);
|
|
20078
20112
|
node.typeExpression = typeExpression;
|
|
20079
20113
|
node.name = name;
|
|
20080
20114
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -20093,7 +20127,7 @@ var ts;
|
|
|
20093
20127
|
: node;
|
|
20094
20128
|
}
|
|
20095
20129
|
function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
20096
|
-
var node = createBaseJSDocTag(
|
|
20130
|
+
var node = createBaseJSDocTag(346, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("prop"), comment);
|
|
20097
20131
|
node.typeExpression = typeExpression;
|
|
20098
20132
|
node.name = name;
|
|
20099
20133
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -20112,7 +20146,7 @@ var ts;
|
|
|
20112
20146
|
: node;
|
|
20113
20147
|
}
|
|
20114
20148
|
function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {
|
|
20115
|
-
var node = createBaseJSDocTag(
|
|
20149
|
+
var node = createBaseJSDocTag(337, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("callback"), comment);
|
|
20116
20150
|
node.typeExpression = typeExpression;
|
|
20117
20151
|
node.fullName = fullName;
|
|
20118
20152
|
node.name = ts.getJSDocTypeAliasName(fullName);
|
|
@@ -20128,7 +20162,7 @@ var ts;
|
|
|
20128
20162
|
: node;
|
|
20129
20163
|
}
|
|
20130
20164
|
function createJSDocAugmentsTag(tagName, className, comment) {
|
|
20131
|
-
var node = createBaseJSDocTag(
|
|
20165
|
+
var node = createBaseJSDocTag(327, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("augments"), comment);
|
|
20132
20166
|
node.class = className;
|
|
20133
20167
|
return node;
|
|
20134
20168
|
}
|
|
@@ -20141,12 +20175,12 @@ var ts;
|
|
|
20141
20175
|
: node;
|
|
20142
20176
|
}
|
|
20143
20177
|
function createJSDocImplementsTag(tagName, className, comment) {
|
|
20144
|
-
var node = createBaseJSDocTag(
|
|
20178
|
+
var node = createBaseJSDocTag(328, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("implements"), comment);
|
|
20145
20179
|
node.class = className;
|
|
20146
20180
|
return node;
|
|
20147
20181
|
}
|
|
20148
20182
|
function createJSDocSeeTag(tagName, name, comment) {
|
|
20149
|
-
var node = createBaseJSDocTag(
|
|
20183
|
+
var node = createBaseJSDocTag(345, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("see"), comment);
|
|
20150
20184
|
node.name = name;
|
|
20151
20185
|
return node;
|
|
20152
20186
|
}
|
|
@@ -20158,7 +20192,7 @@ var ts;
|
|
|
20158
20192
|
: node;
|
|
20159
20193
|
}
|
|
20160
20194
|
function createJSDocNameReference(name) {
|
|
20161
|
-
var node = createBaseNode(
|
|
20195
|
+
var node = createBaseNode(309);
|
|
20162
20196
|
node.name = name;
|
|
20163
20197
|
return node;
|
|
20164
20198
|
}
|
|
@@ -20168,7 +20202,7 @@ var ts;
|
|
|
20168
20202
|
: node;
|
|
20169
20203
|
}
|
|
20170
20204
|
function createJSDocMemberName(left, right) {
|
|
20171
|
-
var node = createBaseNode(
|
|
20205
|
+
var node = createBaseNode(310);
|
|
20172
20206
|
node.left = left;
|
|
20173
20207
|
node.right = right;
|
|
20174
20208
|
node.transformFlags |=
|
|
@@ -20183,7 +20217,7 @@ var ts;
|
|
|
20183
20217
|
: node;
|
|
20184
20218
|
}
|
|
20185
20219
|
function createJSDocLink(name, text) {
|
|
20186
|
-
var node = createBaseNode(
|
|
20220
|
+
var node = createBaseNode(323);
|
|
20187
20221
|
node.name = name;
|
|
20188
20222
|
node.text = text;
|
|
20189
20223
|
return node;
|
|
@@ -20194,7 +20228,7 @@ var ts;
|
|
|
20194
20228
|
: node;
|
|
20195
20229
|
}
|
|
20196
20230
|
function createJSDocLinkCode(name, text) {
|
|
20197
|
-
var node = createBaseNode(
|
|
20231
|
+
var node = createBaseNode(324);
|
|
20198
20232
|
node.name = name;
|
|
20199
20233
|
node.text = text;
|
|
20200
20234
|
return node;
|
|
@@ -20205,7 +20239,7 @@ var ts;
|
|
|
20205
20239
|
: node;
|
|
20206
20240
|
}
|
|
20207
20241
|
function createJSDocLinkPlain(name, text) {
|
|
20208
|
-
var node = createBaseNode(
|
|
20242
|
+
var node = createBaseNode(325);
|
|
20209
20243
|
node.name = name;
|
|
20210
20244
|
node.text = text;
|
|
20211
20245
|
return node;
|
|
@@ -20248,7 +20282,7 @@ var ts;
|
|
|
20248
20282
|
: node;
|
|
20249
20283
|
}
|
|
20250
20284
|
function createJSDocUnknownTag(tagName, comment) {
|
|
20251
|
-
var node = createBaseJSDocTag(
|
|
20285
|
+
var node = createBaseJSDocTag(326, tagName, comment);
|
|
20252
20286
|
return node;
|
|
20253
20287
|
}
|
|
20254
20288
|
function updateJSDocUnknownTag(node, tagName, comment) {
|
|
@@ -20258,7 +20292,7 @@ var ts;
|
|
|
20258
20292
|
: node;
|
|
20259
20293
|
}
|
|
20260
20294
|
function createJSDocText(text) {
|
|
20261
|
-
var node = createBaseNode(
|
|
20295
|
+
var node = createBaseNode(320);
|
|
20262
20296
|
node.text = text;
|
|
20263
20297
|
return node;
|
|
20264
20298
|
}
|
|
@@ -20268,7 +20302,7 @@ var ts;
|
|
|
20268
20302
|
: node;
|
|
20269
20303
|
}
|
|
20270
20304
|
function createJSDocComment(comment, tags) {
|
|
20271
|
-
var node = createBaseNode(
|
|
20305
|
+
var node = createBaseNode(319);
|
|
20272
20306
|
node.comment = comment;
|
|
20273
20307
|
node.tags = asNodeArray(tags);
|
|
20274
20308
|
return node;
|
|
@@ -20523,7 +20557,7 @@ var ts;
|
|
|
20523
20557
|
: node;
|
|
20524
20558
|
}
|
|
20525
20559
|
function createPropertyAssignment(name, initializer) {
|
|
20526
|
-
var node = createBaseNamedDeclaration(
|
|
20560
|
+
var node = createBaseNamedDeclaration(295, undefined, undefined, name);
|
|
20527
20561
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
20528
20562
|
node.transformFlags |=
|
|
20529
20563
|
propagateChildFlags(node.name) |
|
|
@@ -20548,7 +20582,7 @@ var ts;
|
|
|
20548
20582
|
: node;
|
|
20549
20583
|
}
|
|
20550
20584
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
20551
|
-
var node = createBaseNamedDeclaration(
|
|
20585
|
+
var node = createBaseNamedDeclaration(296, undefined, undefined, name);
|
|
20552
20586
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
20553
20587
|
node.transformFlags |=
|
|
20554
20588
|
propagateChildFlags(node.objectAssignmentInitializer) |
|
|
@@ -20575,7 +20609,7 @@ var ts;
|
|
|
20575
20609
|
: node;
|
|
20576
20610
|
}
|
|
20577
20611
|
function createSpreadAssignment(expression) {
|
|
20578
|
-
var node = createBaseNode(
|
|
20612
|
+
var node = createBaseNode(297);
|
|
20579
20613
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
20580
20614
|
node.transformFlags |=
|
|
20581
20615
|
propagateChildFlags(node.expression) |
|
|
@@ -20589,7 +20623,7 @@ var ts;
|
|
|
20589
20623
|
: node;
|
|
20590
20624
|
}
|
|
20591
20625
|
function createEnumMember(name, initializer) {
|
|
20592
|
-
var node = createBaseNode(
|
|
20626
|
+
var node = createBaseNode(298);
|
|
20593
20627
|
node.name = asName(name);
|
|
20594
20628
|
node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
20595
20629
|
node.transformFlags |=
|
|
@@ -20605,7 +20639,7 @@ var ts;
|
|
|
20605
20639
|
: node;
|
|
20606
20640
|
}
|
|
20607
20641
|
function createSourceFile(statements, endOfFileToken, flags) {
|
|
20608
|
-
var node = baseFactory.createBaseSourceFileNode(
|
|
20642
|
+
var node = baseFactory.createBaseSourceFileNode(304);
|
|
20609
20643
|
node.statements = createNodeArray(statements);
|
|
20610
20644
|
node.endOfFileToken = endOfFileToken;
|
|
20611
20645
|
node.flags |= flags;
|
|
@@ -20622,7 +20656,7 @@ var ts;
|
|
|
20622
20656
|
return node;
|
|
20623
20657
|
}
|
|
20624
20658
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
20625
|
-
var node = baseFactory.createBaseSourceFileNode(
|
|
20659
|
+
var node = baseFactory.createBaseSourceFileNode(304);
|
|
20626
20660
|
for (var p in source) {
|
|
20627
20661
|
if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
|
|
20628
20662
|
continue;
|
|
@@ -20659,7 +20693,7 @@ var ts;
|
|
|
20659
20693
|
}
|
|
20660
20694
|
function createBundle(sourceFiles, prepends) {
|
|
20661
20695
|
if (prepends === void 0) { prepends = ts.emptyArray; }
|
|
20662
|
-
var node = createBaseNode(
|
|
20696
|
+
var node = createBaseNode(305);
|
|
20663
20697
|
node.prepends = prepends;
|
|
20664
20698
|
node.sourceFiles = sourceFiles;
|
|
20665
20699
|
return node;
|
|
@@ -20672,7 +20706,7 @@ var ts;
|
|
|
20672
20706
|
: node;
|
|
20673
20707
|
}
|
|
20674
20708
|
function createUnparsedSource(prologues, syntheticReferences, texts) {
|
|
20675
|
-
var node = createBaseNode(
|
|
20709
|
+
var node = createBaseNode(306);
|
|
20676
20710
|
node.prologues = prologues;
|
|
20677
20711
|
node.syntheticReferences = syntheticReferences;
|
|
20678
20712
|
node.texts = texts;
|
|
@@ -20689,24 +20723,24 @@ var ts;
|
|
|
20689
20723
|
return node;
|
|
20690
20724
|
}
|
|
20691
20725
|
function createUnparsedPrologue(data) {
|
|
20692
|
-
return createBaseUnparsedNode(
|
|
20726
|
+
return createBaseUnparsedNode(299, data);
|
|
20693
20727
|
}
|
|
20694
20728
|
function createUnparsedPrepend(data, texts) {
|
|
20695
|
-
var node = createBaseUnparsedNode(
|
|
20729
|
+
var node = createBaseUnparsedNode(300, data);
|
|
20696
20730
|
node.texts = texts;
|
|
20697
20731
|
return node;
|
|
20698
20732
|
}
|
|
20699
20733
|
function createUnparsedTextLike(data, internal) {
|
|
20700
|
-
return createBaseUnparsedNode(internal ?
|
|
20734
|
+
return createBaseUnparsedNode(internal ? 302 : 301, data);
|
|
20701
20735
|
}
|
|
20702
20736
|
function createUnparsedSyntheticReference(section) {
|
|
20703
|
-
var node = createBaseNode(
|
|
20737
|
+
var node = createBaseNode(303);
|
|
20704
20738
|
node.data = section.data;
|
|
20705
20739
|
node.section = section;
|
|
20706
20740
|
return node;
|
|
20707
20741
|
}
|
|
20708
20742
|
function createInputFiles() {
|
|
20709
|
-
var node = createBaseNode(
|
|
20743
|
+
var node = createBaseNode(307);
|
|
20710
20744
|
node.javascriptText = "";
|
|
20711
20745
|
node.declarationText = "";
|
|
20712
20746
|
return node;
|
|
@@ -20720,18 +20754,18 @@ var ts;
|
|
|
20720
20754
|
return node;
|
|
20721
20755
|
}
|
|
20722
20756
|
function createSyntaxList(children) {
|
|
20723
|
-
var node = createBaseNode(
|
|
20757
|
+
var node = createBaseNode(347);
|
|
20724
20758
|
node._children = children;
|
|
20725
20759
|
return node;
|
|
20726
20760
|
}
|
|
20727
20761
|
function createNotEmittedStatement(original) {
|
|
20728
|
-
var node = createBaseNode(
|
|
20762
|
+
var node = createBaseNode(348);
|
|
20729
20763
|
node.original = original;
|
|
20730
20764
|
ts.setTextRange(node, original);
|
|
20731
20765
|
return node;
|
|
20732
20766
|
}
|
|
20733
20767
|
function createPartiallyEmittedExpression(expression, original) {
|
|
20734
|
-
var node = createBaseNode(
|
|
20768
|
+
var node = createBaseNode(349);
|
|
20735
20769
|
node.expression = expression;
|
|
20736
20770
|
node.original = original;
|
|
20737
20771
|
node.transformFlags |=
|
|
@@ -20757,7 +20791,7 @@ var ts;
|
|
|
20757
20791
|
return node;
|
|
20758
20792
|
}
|
|
20759
20793
|
function createCommaListExpression(elements) {
|
|
20760
|
-
var node = createBaseNode(
|
|
20794
|
+
var node = createBaseNode(350);
|
|
20761
20795
|
node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
|
|
20762
20796
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
20763
20797
|
return node;
|
|
@@ -20768,19 +20802,19 @@ var ts;
|
|
|
20768
20802
|
: node;
|
|
20769
20803
|
}
|
|
20770
20804
|
function createEndOfDeclarationMarker(original) {
|
|
20771
|
-
var node = createBaseNode(
|
|
20805
|
+
var node = createBaseNode(352);
|
|
20772
20806
|
node.emitNode = {};
|
|
20773
20807
|
node.original = original;
|
|
20774
20808
|
return node;
|
|
20775
20809
|
}
|
|
20776
20810
|
function createMergeDeclarationMarker(original) {
|
|
20777
|
-
var node = createBaseNode(
|
|
20811
|
+
var node = createBaseNode(351);
|
|
20778
20812
|
node.emitNode = {};
|
|
20779
20813
|
node.original = original;
|
|
20780
20814
|
return node;
|
|
20781
20815
|
}
|
|
20782
20816
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
20783
|
-
var node = createBaseNode(
|
|
20817
|
+
var node = createBaseNode(353);
|
|
20784
20818
|
node.expression = expression;
|
|
20785
20819
|
node.thisArg = thisArg;
|
|
20786
20820
|
node.transformFlags |=
|
|
@@ -20798,7 +20832,7 @@ var ts;
|
|
|
20798
20832
|
if (node === undefined) {
|
|
20799
20833
|
return node;
|
|
20800
20834
|
}
|
|
20801
|
-
var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(
|
|
20835
|
+
var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(304) :
|
|
20802
20836
|
ts.isIdentifier(node) ? baseFactory.createBaseIdentifierNode(79) :
|
|
20803
20837
|
ts.isPrivateIdentifier(node) ? baseFactory.createBasePrivateIdentifierNode(80) :
|
|
20804
20838
|
!ts.isNodeKind(node.kind) ? baseFactory.createBaseTokenNode(node.kind) :
|
|
@@ -20893,7 +20927,7 @@ var ts;
|
|
|
20893
20927
|
case 210: return updateTypeAssertion(outerExpression, outerExpression.type, expression);
|
|
20894
20928
|
case 228: return updateAsExpression(outerExpression, expression, outerExpression.type);
|
|
20895
20929
|
case 229: return updateNonNullExpression(outerExpression, expression);
|
|
20896
|
-
case
|
|
20930
|
+
case 349: return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
20897
20931
|
}
|
|
20898
20932
|
}
|
|
20899
20933
|
function isIgnorableParen(node) {
|
|
@@ -21231,24 +21265,24 @@ var ts;
|
|
|
21231
21265
|
}
|
|
21232
21266
|
function getDefaultTagNameForKind(kind) {
|
|
21233
21267
|
switch (kind) {
|
|
21234
|
-
case
|
|
21235
|
-
case
|
|
21236
|
-
case
|
|
21237
|
-
case
|
|
21238
|
-
case
|
|
21239
|
-
case
|
|
21240
|
-
case
|
|
21241
|
-
case
|
|
21242
|
-
case
|
|
21243
|
-
case
|
|
21244
|
-
case
|
|
21245
|
-
case
|
|
21246
|
-
case
|
|
21247
|
-
case
|
|
21248
|
-
case
|
|
21249
|
-
case
|
|
21250
|
-
case
|
|
21251
|
-
case
|
|
21268
|
+
case 342: return "type";
|
|
21269
|
+
case 340: return "returns";
|
|
21270
|
+
case 341: return "this";
|
|
21271
|
+
case 338: return "enum";
|
|
21272
|
+
case 329: return "author";
|
|
21273
|
+
case 331: return "class";
|
|
21274
|
+
case 332: return "public";
|
|
21275
|
+
case 333: return "private";
|
|
21276
|
+
case 334: return "protected";
|
|
21277
|
+
case 335: return "readonly";
|
|
21278
|
+
case 336: return "override";
|
|
21279
|
+
case 343: return "template";
|
|
21280
|
+
case 344: return "typedef";
|
|
21281
|
+
case 339: return "param";
|
|
21282
|
+
case 346: return "prop";
|
|
21283
|
+
case 337: return "callback";
|
|
21284
|
+
case 327: return "augments";
|
|
21285
|
+
case 328: return "implements";
|
|
21252
21286
|
default:
|
|
21253
21287
|
return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
|
|
21254
21288
|
}
|
|
@@ -21378,7 +21412,7 @@ var ts;
|
|
|
21378
21412
|
return 536887296;
|
|
21379
21413
|
case 210:
|
|
21380
21414
|
case 228:
|
|
21381
|
-
case
|
|
21415
|
+
case 349:
|
|
21382
21416
|
case 211:
|
|
21383
21417
|
case 106:
|
|
21384
21418
|
return 536870912;
|
|
@@ -21674,7 +21708,7 @@ var ts;
|
|
|
21674
21708
|
var _a;
|
|
21675
21709
|
if (!node.emitNode) {
|
|
21676
21710
|
if (ts.isParseTreeNode(node)) {
|
|
21677
|
-
if (node.kind ===
|
|
21711
|
+
if (node.kind === 304) {
|
|
21678
21712
|
return node.emitNode = { annotatedNodes: [node] };
|
|
21679
21713
|
}
|
|
21680
21714
|
var sourceFile = (_a = ts.getSourceFileOfNode(ts.getParseTreeNode(ts.getSourceFileOfNode(node)))) !== null && _a !== void 0 ? _a : ts.Debug.fail("Could not determine parsed source file.");
|
|
@@ -22740,11 +22774,11 @@ var ts;
|
|
|
22740
22774
|
}
|
|
22741
22775
|
ts.isSyntheticExpression = isSyntheticExpression;
|
|
22742
22776
|
function isPartiallyEmittedExpression(node) {
|
|
22743
|
-
return node.kind ===
|
|
22777
|
+
return node.kind === 349;
|
|
22744
22778
|
}
|
|
22745
22779
|
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
|
|
22746
22780
|
function isCommaListExpression(node) {
|
|
22747
|
-
return node.kind ===
|
|
22781
|
+
return node.kind === 350;
|
|
22748
22782
|
}
|
|
22749
22783
|
ts.isCommaListExpression = isCommaListExpression;
|
|
22750
22784
|
function isTemplateSpan(node) {
|
|
@@ -22932,19 +22966,19 @@ var ts;
|
|
|
22932
22966
|
}
|
|
22933
22967
|
ts.isMissingDeclaration = isMissingDeclaration;
|
|
22934
22968
|
function isNotEmittedStatement(node) {
|
|
22935
|
-
return node.kind ===
|
|
22969
|
+
return node.kind === 348;
|
|
22936
22970
|
}
|
|
22937
22971
|
ts.isNotEmittedStatement = isNotEmittedStatement;
|
|
22938
22972
|
function isSyntheticReference(node) {
|
|
22939
|
-
return node.kind ===
|
|
22973
|
+
return node.kind === 353;
|
|
22940
22974
|
}
|
|
22941
22975
|
ts.isSyntheticReference = isSyntheticReference;
|
|
22942
22976
|
function isMergeDeclarationMarker(node) {
|
|
22943
|
-
return node.kind ===
|
|
22977
|
+
return node.kind === 351;
|
|
22944
22978
|
}
|
|
22945
22979
|
ts.isMergeDeclarationMarker = isMergeDeclarationMarker;
|
|
22946
22980
|
function isEndOfDeclarationMarker(node) {
|
|
22947
|
-
return node.kind ===
|
|
22981
|
+
return node.kind === 352;
|
|
22948
22982
|
}
|
|
22949
22983
|
ts.isEndOfDeclarationMarker = isEndOfDeclarationMarker;
|
|
22950
22984
|
function isExternalModuleReference(node) {
|
|
@@ -23012,191 +23046,191 @@ var ts;
|
|
|
23012
23046
|
}
|
|
23013
23047
|
ts.isCatchClause = isCatchClause;
|
|
23014
23048
|
function isPropertyAssignment(node) {
|
|
23015
|
-
return node.kind ===
|
|
23049
|
+
return node.kind === 295;
|
|
23016
23050
|
}
|
|
23017
23051
|
ts.isPropertyAssignment = isPropertyAssignment;
|
|
23018
23052
|
function isShorthandPropertyAssignment(node) {
|
|
23019
|
-
return node.kind ===
|
|
23053
|
+
return node.kind === 296;
|
|
23020
23054
|
}
|
|
23021
23055
|
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
|
|
23022
23056
|
function isSpreadAssignment(node) {
|
|
23023
|
-
return node.kind ===
|
|
23057
|
+
return node.kind === 297;
|
|
23024
23058
|
}
|
|
23025
23059
|
ts.isSpreadAssignment = isSpreadAssignment;
|
|
23026
23060
|
function isEnumMember(node) {
|
|
23027
|
-
return node.kind ===
|
|
23061
|
+
return node.kind === 298;
|
|
23028
23062
|
}
|
|
23029
23063
|
ts.isEnumMember = isEnumMember;
|
|
23030
23064
|
function isUnparsedPrepend(node) {
|
|
23031
|
-
return node.kind ===
|
|
23065
|
+
return node.kind === 300;
|
|
23032
23066
|
}
|
|
23033
23067
|
ts.isUnparsedPrepend = isUnparsedPrepend;
|
|
23034
23068
|
function isSourceFile(node) {
|
|
23035
|
-
return node.kind ===
|
|
23069
|
+
return node.kind === 304;
|
|
23036
23070
|
}
|
|
23037
23071
|
ts.isSourceFile = isSourceFile;
|
|
23038
23072
|
function isBundle(node) {
|
|
23039
|
-
return node.kind ===
|
|
23073
|
+
return node.kind === 305;
|
|
23040
23074
|
}
|
|
23041
23075
|
ts.isBundle = isBundle;
|
|
23042
23076
|
function isUnparsedSource(node) {
|
|
23043
|
-
return node.kind ===
|
|
23077
|
+
return node.kind === 306;
|
|
23044
23078
|
}
|
|
23045
23079
|
ts.isUnparsedSource = isUnparsedSource;
|
|
23046
23080
|
function isJSDocTypeExpression(node) {
|
|
23047
|
-
return node.kind ===
|
|
23081
|
+
return node.kind === 308;
|
|
23048
23082
|
}
|
|
23049
23083
|
ts.isJSDocTypeExpression = isJSDocTypeExpression;
|
|
23050
23084
|
function isJSDocNameReference(node) {
|
|
23051
|
-
return node.kind ===
|
|
23085
|
+
return node.kind === 309;
|
|
23052
23086
|
}
|
|
23053
23087
|
ts.isJSDocNameReference = isJSDocNameReference;
|
|
23054
23088
|
function isJSDocMemberName(node) {
|
|
23055
|
-
return node.kind ===
|
|
23089
|
+
return node.kind === 310;
|
|
23056
23090
|
}
|
|
23057
23091
|
ts.isJSDocMemberName = isJSDocMemberName;
|
|
23058
23092
|
function isJSDocLink(node) {
|
|
23059
|
-
return node.kind ===
|
|
23093
|
+
return node.kind === 323;
|
|
23060
23094
|
}
|
|
23061
23095
|
ts.isJSDocLink = isJSDocLink;
|
|
23062
23096
|
function isJSDocLinkCode(node) {
|
|
23063
|
-
return node.kind ===
|
|
23097
|
+
return node.kind === 324;
|
|
23064
23098
|
}
|
|
23065
23099
|
ts.isJSDocLinkCode = isJSDocLinkCode;
|
|
23066
23100
|
function isJSDocLinkPlain(node) {
|
|
23067
|
-
return node.kind ===
|
|
23101
|
+
return node.kind === 325;
|
|
23068
23102
|
}
|
|
23069
23103
|
ts.isJSDocLinkPlain = isJSDocLinkPlain;
|
|
23070
23104
|
function isJSDocAllType(node) {
|
|
23071
|
-
return node.kind ===
|
|
23105
|
+
return node.kind === 311;
|
|
23072
23106
|
}
|
|
23073
23107
|
ts.isJSDocAllType = isJSDocAllType;
|
|
23074
23108
|
function isJSDocUnknownType(node) {
|
|
23075
|
-
return node.kind ===
|
|
23109
|
+
return node.kind === 312;
|
|
23076
23110
|
}
|
|
23077
23111
|
ts.isJSDocUnknownType = isJSDocUnknownType;
|
|
23078
23112
|
function isJSDocNullableType(node) {
|
|
23079
|
-
return node.kind ===
|
|
23113
|
+
return node.kind === 313;
|
|
23080
23114
|
}
|
|
23081
23115
|
ts.isJSDocNullableType = isJSDocNullableType;
|
|
23082
23116
|
function isJSDocNonNullableType(node) {
|
|
23083
|
-
return node.kind ===
|
|
23117
|
+
return node.kind === 314;
|
|
23084
23118
|
}
|
|
23085
23119
|
ts.isJSDocNonNullableType = isJSDocNonNullableType;
|
|
23086
23120
|
function isJSDocOptionalType(node) {
|
|
23087
|
-
return node.kind ===
|
|
23121
|
+
return node.kind === 315;
|
|
23088
23122
|
}
|
|
23089
23123
|
ts.isJSDocOptionalType = isJSDocOptionalType;
|
|
23090
23124
|
function isJSDocFunctionType(node) {
|
|
23091
|
-
return node.kind ===
|
|
23125
|
+
return node.kind === 316;
|
|
23092
23126
|
}
|
|
23093
23127
|
ts.isJSDocFunctionType = isJSDocFunctionType;
|
|
23094
23128
|
function isJSDocVariadicType(node) {
|
|
23095
|
-
return node.kind ===
|
|
23129
|
+
return node.kind === 317;
|
|
23096
23130
|
}
|
|
23097
23131
|
ts.isJSDocVariadicType = isJSDocVariadicType;
|
|
23098
23132
|
function isJSDocNamepathType(node) {
|
|
23099
|
-
return node.kind ===
|
|
23133
|
+
return node.kind === 318;
|
|
23100
23134
|
}
|
|
23101
23135
|
ts.isJSDocNamepathType = isJSDocNamepathType;
|
|
23102
23136
|
function isJSDoc(node) {
|
|
23103
|
-
return node.kind ===
|
|
23137
|
+
return node.kind === 319;
|
|
23104
23138
|
}
|
|
23105
23139
|
ts.isJSDoc = isJSDoc;
|
|
23106
23140
|
function isJSDocTypeLiteral(node) {
|
|
23107
|
-
return node.kind ===
|
|
23141
|
+
return node.kind === 321;
|
|
23108
23142
|
}
|
|
23109
23143
|
ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
|
|
23110
23144
|
function isJSDocSignature(node) {
|
|
23111
|
-
return node.kind ===
|
|
23145
|
+
return node.kind === 322;
|
|
23112
23146
|
}
|
|
23113
23147
|
ts.isJSDocSignature = isJSDocSignature;
|
|
23114
23148
|
function isJSDocAugmentsTag(node) {
|
|
23115
|
-
return node.kind ===
|
|
23149
|
+
return node.kind === 327;
|
|
23116
23150
|
}
|
|
23117
23151
|
ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
|
|
23118
23152
|
function isJSDocAuthorTag(node) {
|
|
23119
|
-
return node.kind ===
|
|
23153
|
+
return node.kind === 329;
|
|
23120
23154
|
}
|
|
23121
23155
|
ts.isJSDocAuthorTag = isJSDocAuthorTag;
|
|
23122
23156
|
function isJSDocClassTag(node) {
|
|
23123
|
-
return node.kind ===
|
|
23157
|
+
return node.kind === 331;
|
|
23124
23158
|
}
|
|
23125
23159
|
ts.isJSDocClassTag = isJSDocClassTag;
|
|
23126
23160
|
function isJSDocCallbackTag(node) {
|
|
23127
|
-
return node.kind ===
|
|
23161
|
+
return node.kind === 337;
|
|
23128
23162
|
}
|
|
23129
23163
|
ts.isJSDocCallbackTag = isJSDocCallbackTag;
|
|
23130
23164
|
function isJSDocPublicTag(node) {
|
|
23131
|
-
return node.kind ===
|
|
23165
|
+
return node.kind === 332;
|
|
23132
23166
|
}
|
|
23133
23167
|
ts.isJSDocPublicTag = isJSDocPublicTag;
|
|
23134
23168
|
function isJSDocPrivateTag(node) {
|
|
23135
|
-
return node.kind ===
|
|
23169
|
+
return node.kind === 333;
|
|
23136
23170
|
}
|
|
23137
23171
|
ts.isJSDocPrivateTag = isJSDocPrivateTag;
|
|
23138
23172
|
function isJSDocProtectedTag(node) {
|
|
23139
|
-
return node.kind ===
|
|
23173
|
+
return node.kind === 334;
|
|
23140
23174
|
}
|
|
23141
23175
|
ts.isJSDocProtectedTag = isJSDocProtectedTag;
|
|
23142
23176
|
function isJSDocReadonlyTag(node) {
|
|
23143
|
-
return node.kind ===
|
|
23177
|
+
return node.kind === 335;
|
|
23144
23178
|
}
|
|
23145
23179
|
ts.isJSDocReadonlyTag = isJSDocReadonlyTag;
|
|
23146
23180
|
function isJSDocOverrideTag(node) {
|
|
23147
|
-
return node.kind ===
|
|
23181
|
+
return node.kind === 336;
|
|
23148
23182
|
}
|
|
23149
23183
|
ts.isJSDocOverrideTag = isJSDocOverrideTag;
|
|
23150
23184
|
function isJSDocDeprecatedTag(node) {
|
|
23151
|
-
return node.kind ===
|
|
23185
|
+
return node.kind === 330;
|
|
23152
23186
|
}
|
|
23153
23187
|
ts.isJSDocDeprecatedTag = isJSDocDeprecatedTag;
|
|
23154
23188
|
function isJSDocSeeTag(node) {
|
|
23155
|
-
return node.kind ===
|
|
23189
|
+
return node.kind === 345;
|
|
23156
23190
|
}
|
|
23157
23191
|
ts.isJSDocSeeTag = isJSDocSeeTag;
|
|
23158
23192
|
function isJSDocEnumTag(node) {
|
|
23159
|
-
return node.kind ===
|
|
23193
|
+
return node.kind === 338;
|
|
23160
23194
|
}
|
|
23161
23195
|
ts.isJSDocEnumTag = isJSDocEnumTag;
|
|
23162
23196
|
function isJSDocParameterTag(node) {
|
|
23163
|
-
return node.kind ===
|
|
23197
|
+
return node.kind === 339;
|
|
23164
23198
|
}
|
|
23165
23199
|
ts.isJSDocParameterTag = isJSDocParameterTag;
|
|
23166
23200
|
function isJSDocReturnTag(node) {
|
|
23167
|
-
return node.kind ===
|
|
23201
|
+
return node.kind === 340;
|
|
23168
23202
|
}
|
|
23169
23203
|
ts.isJSDocReturnTag = isJSDocReturnTag;
|
|
23170
23204
|
function isJSDocThisTag(node) {
|
|
23171
|
-
return node.kind ===
|
|
23205
|
+
return node.kind === 341;
|
|
23172
23206
|
}
|
|
23173
23207
|
ts.isJSDocThisTag = isJSDocThisTag;
|
|
23174
23208
|
function isJSDocTypeTag(node) {
|
|
23175
|
-
return node.kind ===
|
|
23209
|
+
return node.kind === 342;
|
|
23176
23210
|
}
|
|
23177
23211
|
ts.isJSDocTypeTag = isJSDocTypeTag;
|
|
23178
23212
|
function isJSDocTemplateTag(node) {
|
|
23179
|
-
return node.kind ===
|
|
23213
|
+
return node.kind === 343;
|
|
23180
23214
|
}
|
|
23181
23215
|
ts.isJSDocTemplateTag = isJSDocTemplateTag;
|
|
23182
23216
|
function isJSDocTypedefTag(node) {
|
|
23183
|
-
return node.kind ===
|
|
23217
|
+
return node.kind === 344;
|
|
23184
23218
|
}
|
|
23185
23219
|
ts.isJSDocTypedefTag = isJSDocTypedefTag;
|
|
23186
23220
|
function isJSDocUnknownTag(node) {
|
|
23187
|
-
return node.kind ===
|
|
23221
|
+
return node.kind === 326;
|
|
23188
23222
|
}
|
|
23189
23223
|
ts.isJSDocUnknownTag = isJSDocUnknownTag;
|
|
23190
23224
|
function isJSDocPropertyTag(node) {
|
|
23191
|
-
return node.kind ===
|
|
23225
|
+
return node.kind === 346;
|
|
23192
23226
|
}
|
|
23193
23227
|
ts.isJSDocPropertyTag = isJSDocPropertyTag;
|
|
23194
23228
|
function isJSDocImplementsTag(node) {
|
|
23195
|
-
return node.kind ===
|
|
23229
|
+
return node.kind === 328;
|
|
23196
23230
|
}
|
|
23197
23231
|
ts.isJSDocImplementsTag = isJSDocImplementsTag;
|
|
23198
23232
|
function isSyntaxList(n) {
|
|
23199
|
-
return n.kind ===
|
|
23233
|
+
return n.kind === 347;
|
|
23200
23234
|
}
|
|
23201
23235
|
ts.isSyntaxList = isSyntaxList;
|
|
23202
23236
|
})(ts || (ts = {}));
|
|
@@ -23360,9 +23394,9 @@ var ts;
|
|
|
23360
23394
|
case 171:
|
|
23361
23395
|
case 172:
|
|
23362
23396
|
return createExpressionForAccessorDeclaration(factory, node.properties, property, receiver, !!node.multiLine);
|
|
23363
|
-
case 294:
|
|
23364
|
-
return createExpressionForPropertyAssignment(factory, property, receiver);
|
|
23365
23397
|
case 295:
|
|
23398
|
+
return createExpressionForPropertyAssignment(factory, property, receiver);
|
|
23399
|
+
case 296:
|
|
23366
23400
|
return createExpressionForShorthandPropertyAssignment(factory, property, receiver);
|
|
23367
23401
|
case 168:
|
|
23368
23402
|
return createExpressionForMethodDeclaration(factory, property, receiver);
|
|
@@ -23431,7 +23465,7 @@ var ts;
|
|
|
23431
23465
|
ts.startsWithUseStrict = startsWithUseStrict;
|
|
23432
23466
|
function isCommaSequence(node) {
|
|
23433
23467
|
return node.kind === 220 && node.operatorToken.kind === 27 ||
|
|
23434
|
-
node.kind ===
|
|
23468
|
+
node.kind === 350;
|
|
23435
23469
|
}
|
|
23436
23470
|
ts.isCommaSequence = isCommaSequence;
|
|
23437
23471
|
function isJSDocTypeAssertion(node) {
|
|
@@ -23459,7 +23493,7 @@ var ts;
|
|
|
23459
23493
|
return (kinds & 2) !== 0;
|
|
23460
23494
|
case 229:
|
|
23461
23495
|
return (kinds & 4) !== 0;
|
|
23462
|
-
case
|
|
23496
|
+
case 349:
|
|
23463
23497
|
return (kinds & 8) !== 0;
|
|
23464
23498
|
}
|
|
23465
23499
|
return false;
|
|
@@ -23637,11 +23671,11 @@ var ts;
|
|
|
23637
23671
|
}
|
|
23638
23672
|
if (ts.isObjectLiteralElementLike(bindingElement)) {
|
|
23639
23673
|
switch (bindingElement.kind) {
|
|
23640
|
-
case 294:
|
|
23641
|
-
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
|
|
23642
23674
|
case 295:
|
|
23643
|
-
return bindingElement.
|
|
23675
|
+
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
|
|
23644
23676
|
case 296:
|
|
23677
|
+
return bindingElement.name;
|
|
23678
|
+
case 297:
|
|
23645
23679
|
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
|
|
23646
23680
|
}
|
|
23647
23681
|
return undefined;
|
|
@@ -23661,7 +23695,7 @@ var ts;
|
|
|
23661
23695
|
case 202:
|
|
23662
23696
|
return bindingElement.dotDotDotToken;
|
|
23663
23697
|
case 224:
|
|
23664
|
-
case
|
|
23698
|
+
case 297:
|
|
23665
23699
|
return bindingElement;
|
|
23666
23700
|
}
|
|
23667
23701
|
return undefined;
|
|
@@ -23686,7 +23720,7 @@ var ts;
|
|
|
23686
23720
|
: propertyName;
|
|
23687
23721
|
}
|
|
23688
23722
|
break;
|
|
23689
|
-
case
|
|
23723
|
+
case 295:
|
|
23690
23724
|
if (bindingElement.name) {
|
|
23691
23725
|
var propertyName = bindingElement.name;
|
|
23692
23726
|
if (ts.isPrivateIdentifier(propertyName)) {
|
|
@@ -23697,7 +23731,7 @@ var ts;
|
|
|
23697
23731
|
: propertyName;
|
|
23698
23732
|
}
|
|
23699
23733
|
break;
|
|
23700
|
-
case
|
|
23734
|
+
case 297:
|
|
23701
23735
|
if (bindingElement.name && ts.isPrivateIdentifier(bindingElement.name)) {
|
|
23702
23736
|
return ts.Debug.failBadSyntaxKind(bindingElement.name);
|
|
23703
23737
|
}
|
|
@@ -24045,7 +24079,7 @@ var ts;
|
|
|
24045
24079
|
visitNode(cbNode, node.constraint) ||
|
|
24046
24080
|
visitNode(cbNode, node.default) ||
|
|
24047
24081
|
visitNode(cbNode, node.expression);
|
|
24048
|
-
case
|
|
24082
|
+
case 296:
|
|
24049
24083
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24050
24084
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24051
24085
|
visitNode(cbNode, node.name) ||
|
|
@@ -24053,7 +24087,7 @@ var ts;
|
|
|
24053
24087
|
visitNode(cbNode, node.exclamationToken) ||
|
|
24054
24088
|
visitNode(cbNode, node.equalsToken) ||
|
|
24055
24089
|
visitNode(cbNode, node.objectAssignmentInitializer);
|
|
24056
|
-
case
|
|
24090
|
+
case 297:
|
|
24057
24091
|
return visitNode(cbNode, node.expression);
|
|
24058
24092
|
case 163:
|
|
24059
24093
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
@@ -24078,7 +24112,7 @@ var ts;
|
|
|
24078
24112
|
visitNode(cbNode, node.questionToken) ||
|
|
24079
24113
|
visitNode(cbNode, node.type) ||
|
|
24080
24114
|
visitNode(cbNode, node.initializer);
|
|
24081
|
-
case
|
|
24115
|
+
case 295:
|
|
24082
24116
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24083
24117
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24084
24118
|
visitNode(cbNode, node.name) ||
|
|
@@ -24159,8 +24193,11 @@ var ts;
|
|
|
24159
24193
|
return visitNode(cbNode, node.typeParameter);
|
|
24160
24194
|
case 199:
|
|
24161
24195
|
return visitNode(cbNode, node.argument) ||
|
|
24196
|
+
visitNode(cbNode, node.assertions) ||
|
|
24162
24197
|
visitNode(cbNode, node.qualifier) ||
|
|
24163
24198
|
visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
24199
|
+
case 294:
|
|
24200
|
+
return visitNode(cbNode, node.assertClause);
|
|
24164
24201
|
case 190:
|
|
24165
24202
|
case 192:
|
|
24166
24203
|
return visitNode(cbNode, node.type);
|
|
@@ -24249,7 +24286,7 @@ var ts;
|
|
|
24249
24286
|
case 234:
|
|
24250
24287
|
case 261:
|
|
24251
24288
|
return visitNodes(cbNode, cbNodes, node.statements);
|
|
24252
|
-
case
|
|
24289
|
+
case 304:
|
|
24253
24290
|
return visitNodes(cbNode, cbNodes, node.statements) ||
|
|
24254
24291
|
visitNode(cbNode, node.endOfFileToken);
|
|
24255
24292
|
case 236:
|
|
@@ -24342,7 +24379,7 @@ var ts;
|
|
|
24342
24379
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24343
24380
|
visitNode(cbNode, node.name) ||
|
|
24344
24381
|
visitNodes(cbNode, cbNodes, node.members);
|
|
24345
|
-
case
|
|
24382
|
+
case 298:
|
|
24346
24383
|
return visitNode(cbNode, node.name) ||
|
|
24347
24384
|
visitNode(cbNode, node.initializer);
|
|
24348
24385
|
case 260:
|
|
@@ -24411,7 +24448,7 @@ var ts;
|
|
|
24411
24448
|
return visitNode(cbNode, node.expression);
|
|
24412
24449
|
case 275:
|
|
24413
24450
|
return visitNodes(cbNode, cbNodes, node.decorators);
|
|
24414
|
-
case
|
|
24451
|
+
case 350:
|
|
24415
24452
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
24416
24453
|
case 277:
|
|
24417
24454
|
return visitNode(cbNode, node.openingElement) ||
|
|
@@ -24440,29 +24477,29 @@ var ts;
|
|
|
24440
24477
|
return visitNode(cbNode, node.tagName);
|
|
24441
24478
|
case 184:
|
|
24442
24479
|
case 185:
|
|
24443
|
-
case
|
|
24444
|
-
case 313:
|
|
24445
|
-
case 312:
|
|
24480
|
+
case 308:
|
|
24446
24481
|
case 314:
|
|
24447
|
-
case
|
|
24448
|
-
return visitNode(cbNode, node.type);
|
|
24482
|
+
case 313:
|
|
24449
24483
|
case 315:
|
|
24484
|
+
case 317:
|
|
24485
|
+
return visitNode(cbNode, node.type);
|
|
24486
|
+
case 316:
|
|
24450
24487
|
return visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24451
24488
|
visitNode(cbNode, node.type);
|
|
24452
|
-
case
|
|
24489
|
+
case 319:
|
|
24453
24490
|
return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
24454
24491
|
|| visitNodes(cbNode, cbNodes, node.tags);
|
|
24455
|
-
case
|
|
24492
|
+
case 345:
|
|
24456
24493
|
return visitNode(cbNode, node.tagName) ||
|
|
24457
24494
|
visitNode(cbNode, node.name) ||
|
|
24458
24495
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24459
|
-
case 308:
|
|
24460
|
-
return visitNode(cbNode, node.name);
|
|
24461
24496
|
case 309:
|
|
24497
|
+
return visitNode(cbNode, node.name);
|
|
24498
|
+
case 310:
|
|
24462
24499
|
return visitNode(cbNode, node.left) ||
|
|
24463
24500
|
visitNode(cbNode, node.right);
|
|
24464
|
-
case
|
|
24465
|
-
case
|
|
24501
|
+
case 339:
|
|
24502
|
+
case 346:
|
|
24466
24503
|
return visitNode(cbNode, node.tagName) ||
|
|
24467
24504
|
(node.isNameFirst
|
|
24468
24505
|
? visitNode(cbNode, node.name) ||
|
|
@@ -24471,64 +24508,64 @@ var ts;
|
|
|
24471
24508
|
: visitNode(cbNode, node.typeExpression) ||
|
|
24472
24509
|
visitNode(cbNode, node.name) ||
|
|
24473
24510
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
|
|
24474
|
-
case
|
|
24511
|
+
case 329:
|
|
24475
24512
|
return visitNode(cbNode, node.tagName) ||
|
|
24476
24513
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24477
|
-
case
|
|
24514
|
+
case 328:
|
|
24478
24515
|
return visitNode(cbNode, node.tagName) ||
|
|
24479
24516
|
visitNode(cbNode, node.class) ||
|
|
24480
24517
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24481
|
-
case
|
|
24518
|
+
case 327:
|
|
24482
24519
|
return visitNode(cbNode, node.tagName) ||
|
|
24483
24520
|
visitNode(cbNode, node.class) ||
|
|
24484
24521
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24485
|
-
case
|
|
24522
|
+
case 343:
|
|
24486
24523
|
return visitNode(cbNode, node.tagName) ||
|
|
24487
24524
|
visitNode(cbNode, node.constraint) ||
|
|
24488
24525
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24489
24526
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24490
|
-
case
|
|
24527
|
+
case 344:
|
|
24491
24528
|
return visitNode(cbNode, node.tagName) ||
|
|
24492
24529
|
(node.typeExpression &&
|
|
24493
|
-
node.typeExpression.kind ===
|
|
24530
|
+
node.typeExpression.kind === 308
|
|
24494
24531
|
? visitNode(cbNode, node.typeExpression) ||
|
|
24495
24532
|
visitNode(cbNode, node.fullName) ||
|
|
24496
24533
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
24497
24534
|
: visitNode(cbNode, node.fullName) ||
|
|
24498
24535
|
visitNode(cbNode, node.typeExpression) ||
|
|
24499
24536
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
|
|
24500
|
-
case
|
|
24537
|
+
case 337:
|
|
24501
24538
|
return visitNode(cbNode, node.tagName) ||
|
|
24502
24539
|
visitNode(cbNode, node.fullName) ||
|
|
24503
24540
|
visitNode(cbNode, node.typeExpression) ||
|
|
24504
24541
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24505
|
-
case 339:
|
|
24506
|
-
case 341:
|
|
24507
24542
|
case 340:
|
|
24508
|
-
case
|
|
24543
|
+
case 342:
|
|
24544
|
+
case 341:
|
|
24545
|
+
case 338:
|
|
24509
24546
|
return visitNode(cbNode, node.tagName) ||
|
|
24510
24547
|
visitNode(cbNode, node.typeExpression) ||
|
|
24511
24548
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24512
|
-
case
|
|
24549
|
+
case 322:
|
|
24513
24550
|
return ts.forEach(node.typeParameters, cbNode) ||
|
|
24514
24551
|
ts.forEach(node.parameters, cbNode) ||
|
|
24515
24552
|
visitNode(cbNode, node.type);
|
|
24516
|
-
case 322:
|
|
24517
24553
|
case 323:
|
|
24518
24554
|
case 324:
|
|
24555
|
+
case 325:
|
|
24519
24556
|
return visitNode(cbNode, node.name);
|
|
24520
|
-
case
|
|
24557
|
+
case 321:
|
|
24521
24558
|
return ts.forEach(node.jsDocPropertyTags, cbNode);
|
|
24522
|
-
case
|
|
24523
|
-
case 330:
|
|
24559
|
+
case 326:
|
|
24524
24560
|
case 331:
|
|
24525
24561
|
case 332:
|
|
24526
24562
|
case 333:
|
|
24527
24563
|
case 334:
|
|
24528
|
-
case
|
|
24564
|
+
case 335:
|
|
24565
|
+
case 330:
|
|
24529
24566
|
return visitNode(cbNode, node.tagName)
|
|
24530
24567
|
|| (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24531
|
-
case
|
|
24568
|
+
case 349:
|
|
24532
24569
|
return visitNode(cbNode, node.expression);
|
|
24533
24570
|
}
|
|
24534
24571
|
}
|
|
@@ -25861,7 +25898,7 @@ var ts;
|
|
|
25861
25898
|
return false;
|
|
25862
25899
|
}
|
|
25863
25900
|
function isReusableEnumMember(node) {
|
|
25864
|
-
return node.kind ===
|
|
25901
|
+
return node.kind === 298;
|
|
25865
25902
|
}
|
|
25866
25903
|
function isReusableTypeMember(node) {
|
|
25867
25904
|
if (node) {
|
|
@@ -26224,6 +26261,9 @@ var ts;
|
|
|
26224
26261
|
return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
|
|
26225
26262
|
}
|
|
26226
26263
|
function parseTypeParameter() {
|
|
26264
|
+
return parseTypeParameterWorker(true);
|
|
26265
|
+
}
|
|
26266
|
+
function parseTypeParameterWorker(canHaveDefault) {
|
|
26227
26267
|
var pos = getNodePos();
|
|
26228
26268
|
var name = parseIdentifier();
|
|
26229
26269
|
var constraint;
|
|
@@ -26236,7 +26276,7 @@ var ts;
|
|
|
26236
26276
|
expression = parseUnaryExpressionOrHigher();
|
|
26237
26277
|
}
|
|
26238
26278
|
}
|
|
26239
|
-
var defaultType = parseOptional(63) ? parseType() : undefined;
|
|
26279
|
+
var defaultType = canHaveDefault && parseOptional(63) ? parseType() : undefined;
|
|
26240
26280
|
var node = factory.createTypeParameterDeclaration(name, constraint, defaultType);
|
|
26241
26281
|
node.expression = expression;
|
|
26242
26282
|
return finishNode(node, pos);
|
|
@@ -26619,6 +26659,22 @@ var ts;
|
|
|
26619
26659
|
nextToken();
|
|
26620
26660
|
return token() === 100;
|
|
26621
26661
|
}
|
|
26662
|
+
function parseImportTypeAssertions() {
|
|
26663
|
+
var pos = getNodePos();
|
|
26664
|
+
var openBracePosition = scanner.getTokenPos();
|
|
26665
|
+
parseExpected(18);
|
|
26666
|
+
var multiLine = scanner.hasPrecedingLineBreak();
|
|
26667
|
+
parseExpected(129);
|
|
26668
|
+
parseExpected(58);
|
|
26669
|
+
var clause = parseAssertClause(true);
|
|
26670
|
+
if (!parseExpected(19)) {
|
|
26671
|
+
var lastError = ts.lastOrUndefined(parseDiagnostics);
|
|
26672
|
+
if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
|
|
26673
|
+
ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
|
|
26674
|
+
}
|
|
26675
|
+
}
|
|
26676
|
+
return finishNode(factory.createImportTypeAssertionContainer(clause, multiLine), pos);
|
|
26677
|
+
}
|
|
26622
26678
|
function parseImportType() {
|
|
26623
26679
|
sourceFlags |= 1048576;
|
|
26624
26680
|
var pos = getNodePos();
|
|
@@ -26626,10 +26682,14 @@ var ts;
|
|
|
26626
26682
|
parseExpected(100);
|
|
26627
26683
|
parseExpected(20);
|
|
26628
26684
|
var type = parseType();
|
|
26685
|
+
var assertions;
|
|
26686
|
+
if (parseOptional(27)) {
|
|
26687
|
+
assertions = parseImportTypeAssertions();
|
|
26688
|
+
}
|
|
26629
26689
|
parseExpected(21);
|
|
26630
26690
|
var qualifier = parseOptional(24) ? parseEntityNameOfTypeReference() : undefined;
|
|
26631
26691
|
var typeArguments = parseTypeArgumentsOfTypeReference();
|
|
26632
|
-
return finishNode(factory.createImportTypeNode(type, qualifier, typeArguments, isTypeOf), pos);
|
|
26692
|
+
return finishNode(factory.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos);
|
|
26633
26693
|
}
|
|
26634
26694
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
26635
26695
|
nextToken();
|
|
@@ -26791,14 +26851,10 @@ var ts;
|
|
|
26791
26851
|
parseExpected(operator);
|
|
26792
26852
|
return finishNode(factory.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos);
|
|
26793
26853
|
}
|
|
26794
|
-
function parseTypeParameterOfInferType() {
|
|
26795
|
-
var pos = getNodePos();
|
|
26796
|
-
return finishNode(factory.createTypeParameterDeclaration(parseIdentifier(), undefined, undefined), pos);
|
|
26797
|
-
}
|
|
26798
26854
|
function parseInferType() {
|
|
26799
26855
|
var pos = getNodePos();
|
|
26800
26856
|
parseExpected(137);
|
|
26801
|
-
return finishNode(factory.createInferTypeNode(
|
|
26857
|
+
return finishNode(factory.createInferTypeNode(parseTypeParameterWorker(false)), pos);
|
|
26802
26858
|
}
|
|
26803
26859
|
function parseTypeOperatorOrHigher() {
|
|
26804
26860
|
var operator = token();
|
|
@@ -29212,9 +29268,11 @@ var ts;
|
|
|
29212
29268
|
var value = parseAssignmentExpressionOrHigher(false);
|
|
29213
29269
|
return finishNode(factory.createAssertEntry(name, value), pos);
|
|
29214
29270
|
}
|
|
29215
|
-
function parseAssertClause() {
|
|
29271
|
+
function parseAssertClause(skipAssertKeyword) {
|
|
29216
29272
|
var pos = getNodePos();
|
|
29217
|
-
|
|
29273
|
+
if (!skipAssertKeyword) {
|
|
29274
|
+
parseExpected(129);
|
|
29275
|
+
}
|
|
29218
29276
|
var openBracePosition = scanner.getTokenPos();
|
|
29219
29277
|
if (parseExpected(18)) {
|
|
29220
29278
|
var multiLine = scanner.hasPrecedingLineBreak();
|
|
@@ -29974,7 +30032,7 @@ var ts;
|
|
|
29974
30032
|
var child = void 0;
|
|
29975
30033
|
var children = void 0;
|
|
29976
30034
|
while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) {
|
|
29977
|
-
if (child.kind ===
|
|
30035
|
+
if (child.kind === 339 || child.kind === 346) {
|
|
29978
30036
|
children = ts.append(children, child);
|
|
29979
30037
|
}
|
|
29980
30038
|
}
|
|
@@ -30097,7 +30155,7 @@ var ts;
|
|
|
30097
30155
|
var hasChildren = false;
|
|
30098
30156
|
while (child = tryParse(function () { return parseChildPropertyTag(indent); })) {
|
|
30099
30157
|
hasChildren = true;
|
|
30100
|
-
if (child.kind ===
|
|
30158
|
+
if (child.kind === 342) {
|
|
30101
30159
|
if (childTypeTag) {
|
|
30102
30160
|
parseErrorAtCurrentToken(ts.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
|
30103
30161
|
var lastError = ts.lastOrUndefined(parseDiagnostics);
|
|
@@ -30165,7 +30223,7 @@ var ts;
|
|
|
30165
30223
|
var returnTag = tryParse(function () {
|
|
30166
30224
|
if (parseOptionalJsdoc(59)) {
|
|
30167
30225
|
var tag = parseTag(indent);
|
|
30168
|
-
if (tag && tag.kind ===
|
|
30226
|
+
if (tag && tag.kind === 340) {
|
|
30169
30227
|
return tag;
|
|
30170
30228
|
}
|
|
30171
30229
|
}
|
|
@@ -30199,7 +30257,7 @@ var ts;
|
|
|
30199
30257
|
case 59:
|
|
30200
30258
|
if (canParseTag) {
|
|
30201
30259
|
var child = tryParseChildTag(target, indent);
|
|
30202
|
-
if (child && (child.kind ===
|
|
30260
|
+
if (child && (child.kind === 339 || child.kind === 346) &&
|
|
30203
30261
|
target !== 4 &&
|
|
30204
30262
|
name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
|
|
30205
30263
|
return false;
|
|
@@ -32628,7 +32686,7 @@ var ts;
|
|
|
32628
32686
|
function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) {
|
|
32629
32687
|
var result = returnValue ? {} : undefined;
|
|
32630
32688
|
var _loop_4 = function (element) {
|
|
32631
|
-
if (element.kind !==
|
|
32689
|
+
if (element.kind !== 295) {
|
|
32632
32690
|
errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element, ts.Diagnostics.Property_assignment_expected));
|
|
32633
32691
|
return "continue";
|
|
32634
32692
|
}
|
|
@@ -33959,6 +34017,7 @@ var ts;
|
|
|
33959
34017
|
return ts.comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0;
|
|
33960
34018
|
}
|
|
33961
34019
|
function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache, resolutionMode) {
|
|
34020
|
+
ts.Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");
|
|
33962
34021
|
var traceEnabled = isTraceEnabled(options, host);
|
|
33963
34022
|
if (redirectedReference) {
|
|
33964
34023
|
options = redirectedReference.commandLine.options;
|
|
@@ -35787,7 +35846,7 @@ var ts;
|
|
|
35787
35846
|
return "__constructor";
|
|
35788
35847
|
case 178:
|
|
35789
35848
|
case 173:
|
|
35790
|
-
case
|
|
35849
|
+
case 322:
|
|
35791
35850
|
return "__call";
|
|
35792
35851
|
case 179:
|
|
35793
35852
|
case 174:
|
|
@@ -35796,7 +35855,7 @@ var ts;
|
|
|
35796
35855
|
return "__index";
|
|
35797
35856
|
case 271:
|
|
35798
35857
|
return "__export";
|
|
35799
|
-
case
|
|
35858
|
+
case 304:
|
|
35800
35859
|
return "export=";
|
|
35801
35860
|
case 220:
|
|
35802
35861
|
if (ts.getAssignmentDeclarationKind(node) === 2) {
|
|
@@ -35804,10 +35863,10 @@ var ts;
|
|
|
35804
35863
|
}
|
|
35805
35864
|
ts.Debug.fail("Unknown binary declaration kind");
|
|
35806
35865
|
break;
|
|
35807
|
-
case
|
|
35866
|
+
case 316:
|
|
35808
35867
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
35809
35868
|
case 163:
|
|
35810
|
-
ts.Debug.assert(node.parent.kind ===
|
|
35869
|
+
ts.Debug.assert(node.parent.kind === 316, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
|
|
35811
35870
|
var functionType = node.parent;
|
|
35812
35871
|
var index = functionType.parameters.indexOf(node);
|
|
35813
35872
|
return "arg" + index;
|
|
@@ -35992,7 +36051,7 @@ var ts;
|
|
|
35992
36051
|
node.flags |= 512;
|
|
35993
36052
|
node.endFlowNode = currentFlow;
|
|
35994
36053
|
}
|
|
35995
|
-
if (node.kind ===
|
|
36054
|
+
if (node.kind === 304) {
|
|
35996
36055
|
node.flags |= emitFlags;
|
|
35997
36056
|
node.endFlowNode = currentFlow;
|
|
35998
36057
|
}
|
|
@@ -36127,12 +36186,12 @@ var ts;
|
|
|
36127
36186
|
case 229:
|
|
36128
36187
|
bindNonNullExpressionFlow(node);
|
|
36129
36188
|
break;
|
|
36130
|
-
case
|
|
36131
|
-
case 336:
|
|
36189
|
+
case 344:
|
|
36132
36190
|
case 337:
|
|
36191
|
+
case 338:
|
|
36133
36192
|
bindJSDocTypeAlias(node);
|
|
36134
36193
|
break;
|
|
36135
|
-
case
|
|
36194
|
+
case 304: {
|
|
36136
36195
|
bindEachFunctionsFirst(node.statements);
|
|
36137
36196
|
bind(node.endOfFileToken);
|
|
36138
36197
|
break;
|
|
@@ -36146,7 +36205,7 @@ var ts;
|
|
|
36146
36205
|
break;
|
|
36147
36206
|
case 204:
|
|
36148
36207
|
case 203:
|
|
36149
|
-
case
|
|
36208
|
+
case 295:
|
|
36150
36209
|
case 224:
|
|
36151
36210
|
inAssignmentPattern = saveInAssignmentPattern;
|
|
36152
36211
|
default:
|
|
@@ -36635,13 +36694,13 @@ var ts;
|
|
|
36635
36694
|
else if (node.kind === 204) {
|
|
36636
36695
|
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
|
|
36637
36696
|
var p = _c[_b];
|
|
36638
|
-
if (p.kind ===
|
|
36697
|
+
if (p.kind === 295) {
|
|
36639
36698
|
bindDestructuringTargetFlow(p.initializer);
|
|
36640
36699
|
}
|
|
36641
|
-
else if (p.kind ===
|
|
36700
|
+
else if (p.kind === 296) {
|
|
36642
36701
|
bindAssignmentTargetFlow(p.name);
|
|
36643
36702
|
}
|
|
36644
|
-
else if (p.kind ===
|
|
36703
|
+
else if (p.kind === 297) {
|
|
36645
36704
|
bindAssignmentTargetFlow(p.expression);
|
|
36646
36705
|
}
|
|
36647
36706
|
}
|
|
@@ -36853,7 +36912,7 @@ var ts;
|
|
|
36853
36912
|
}
|
|
36854
36913
|
function bindJSDocTypeAlias(node) {
|
|
36855
36914
|
bind(node.tagName);
|
|
36856
|
-
if (node.kind !==
|
|
36915
|
+
if (node.kind !== 338 && node.fullName) {
|
|
36857
36916
|
ts.setParent(node.fullName, node);
|
|
36858
36917
|
ts.setParentRecursive(node.fullName, false);
|
|
36859
36918
|
}
|
|
@@ -36962,7 +37021,7 @@ var ts;
|
|
|
36962
37021
|
case 259:
|
|
36963
37022
|
case 204:
|
|
36964
37023
|
case 181:
|
|
36965
|
-
case
|
|
37024
|
+
case 321:
|
|
36966
37025
|
case 285:
|
|
36967
37026
|
return 1;
|
|
36968
37027
|
case 257:
|
|
@@ -36971,7 +37030,7 @@ var ts;
|
|
|
36971
37030
|
case 258:
|
|
36972
37031
|
case 194:
|
|
36973
37032
|
return 1 | 32;
|
|
36974
|
-
case
|
|
37033
|
+
case 304:
|
|
36975
37034
|
return 1 | 4 | 32;
|
|
36976
37035
|
case 171:
|
|
36977
37036
|
case 172:
|
|
@@ -36983,8 +37042,8 @@ var ts;
|
|
|
36983
37042
|
case 255:
|
|
36984
37043
|
case 167:
|
|
36985
37044
|
case 173:
|
|
36986
|
-
case
|
|
36987
|
-
case
|
|
37045
|
+
case 322:
|
|
37046
|
+
case 316:
|
|
36988
37047
|
case 178:
|
|
36989
37048
|
case 174:
|
|
36990
37049
|
case 175:
|
|
@@ -37019,7 +37078,7 @@ var ts;
|
|
|
37019
37078
|
switch (container.kind) {
|
|
37020
37079
|
case 260:
|
|
37021
37080
|
return declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37022
|
-
case
|
|
37081
|
+
case 304:
|
|
37023
37082
|
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
|
|
37024
37083
|
case 225:
|
|
37025
37084
|
case 256:
|
|
@@ -37027,7 +37086,7 @@ var ts;
|
|
|
37027
37086
|
case 259:
|
|
37028
37087
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
37029
37088
|
case 181:
|
|
37030
|
-
case
|
|
37089
|
+
case 321:
|
|
37031
37090
|
case 204:
|
|
37032
37091
|
case 257:
|
|
37033
37092
|
case 285:
|
|
@@ -37036,7 +37095,7 @@ var ts;
|
|
|
37036
37095
|
case 179:
|
|
37037
37096
|
case 173:
|
|
37038
37097
|
case 174:
|
|
37039
|
-
case
|
|
37098
|
+
case 322:
|
|
37040
37099
|
case 175:
|
|
37041
37100
|
case 168:
|
|
37042
37101
|
case 167:
|
|
@@ -37046,9 +37105,9 @@ var ts;
|
|
|
37046
37105
|
case 255:
|
|
37047
37106
|
case 212:
|
|
37048
37107
|
case 213:
|
|
37049
|
-
case
|
|
37050
|
-
case
|
|
37051
|
-
case
|
|
37108
|
+
case 316:
|
|
37109
|
+
case 344:
|
|
37110
|
+
case 337:
|
|
37052
37111
|
case 169:
|
|
37053
37112
|
case 258:
|
|
37054
37113
|
case 194:
|
|
@@ -37128,11 +37187,11 @@ var ts;
|
|
|
37128
37187
|
var seen = new ts.Map();
|
|
37129
37188
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
37130
37189
|
var prop = _a[_i];
|
|
37131
|
-
if (prop.kind ===
|
|
37190
|
+
if (prop.kind === 297 || prop.name.kind !== 79) {
|
|
37132
37191
|
continue;
|
|
37133
37192
|
}
|
|
37134
37193
|
var identifier = prop.name;
|
|
37135
|
-
var currentKind = prop.kind ===
|
|
37194
|
+
var currentKind = prop.kind === 295 || prop.kind === 296 || prop.kind === 168
|
|
37136
37195
|
? 1
|
|
37137
37196
|
: 2;
|
|
37138
37197
|
var existingKind = seen.get(identifier.escapedText);
|
|
@@ -37163,7 +37222,7 @@ var ts;
|
|
|
37163
37222
|
case 260:
|
|
37164
37223
|
declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37165
37224
|
break;
|
|
37166
|
-
case
|
|
37225
|
+
case 304:
|
|
37167
37226
|
if (ts.isExternalOrCommonJsModule(container)) {
|
|
37168
37227
|
declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37169
37228
|
break;
|
|
@@ -37335,7 +37394,7 @@ var ts;
|
|
|
37335
37394
|
}
|
|
37336
37395
|
function checkStrictModeFunctionDeclaration(node) {
|
|
37337
37396
|
if (languageVersion < 2) {
|
|
37338
|
-
if (blockScopeContainer.kind !==
|
|
37397
|
+
if (blockScopeContainer.kind !== 304 &&
|
|
37339
37398
|
blockScopeContainer.kind !== 260 &&
|
|
37340
37399
|
!ts.isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) {
|
|
37341
37400
|
var errorSpan = ts.getErrorSpanForNode(file, node);
|
|
@@ -37468,7 +37527,7 @@ var ts;
|
|
|
37468
37527
|
break;
|
|
37469
37528
|
}
|
|
37470
37529
|
case 108:
|
|
37471
|
-
if (currentFlow && (ts.isExpression(node) || parent.kind ===
|
|
37530
|
+
if (currentFlow && (ts.isExpression(node) || parent.kind === 296)) {
|
|
37472
37531
|
node.flowNode = currentFlow;
|
|
37473
37532
|
}
|
|
37474
37533
|
return checkContextualIdentifier(node);
|
|
@@ -37565,10 +37624,10 @@ var ts;
|
|
|
37565
37624
|
case 166:
|
|
37566
37625
|
case 165:
|
|
37567
37626
|
return bindPropertyWorker(node);
|
|
37568
|
-
case 294:
|
|
37569
37627
|
case 295:
|
|
37628
|
+
case 296:
|
|
37570
37629
|
return bindPropertyOrMethodOrAccessor(node, 4, 0);
|
|
37571
|
-
case
|
|
37630
|
+
case 298:
|
|
37572
37631
|
return bindPropertyOrMethodOrAccessor(node, 8, 900095);
|
|
37573
37632
|
case 173:
|
|
37574
37633
|
case 174:
|
|
@@ -37586,15 +37645,15 @@ var ts;
|
|
|
37586
37645
|
case 172:
|
|
37587
37646
|
return bindPropertyOrMethodOrAccessor(node, 65536, 78783);
|
|
37588
37647
|
case 178:
|
|
37589
|
-
case
|
|
37590
|
-
case
|
|
37648
|
+
case 316:
|
|
37649
|
+
case 322:
|
|
37591
37650
|
case 179:
|
|
37592
37651
|
return bindFunctionOrConstructorType(node);
|
|
37593
37652
|
case 181:
|
|
37594
|
-
case
|
|
37653
|
+
case 321:
|
|
37595
37654
|
case 194:
|
|
37596
37655
|
return bindAnonymousTypeWorker(node);
|
|
37597
|
-
case
|
|
37656
|
+
case 331:
|
|
37598
37657
|
return bindJSDocClassTag(node);
|
|
37599
37658
|
case 204:
|
|
37600
37659
|
return bindObjectLiteralExpression(node);
|
|
@@ -37648,7 +37707,7 @@ var ts;
|
|
|
37648
37707
|
return bindExportDeclaration(node);
|
|
37649
37708
|
case 270:
|
|
37650
37709
|
return bindExportAssignment(node);
|
|
37651
|
-
case
|
|
37710
|
+
case 304:
|
|
37652
37711
|
updateStrictModeStatementList(node.statements);
|
|
37653
37712
|
return bindSourceFileIfExternalModule();
|
|
37654
37713
|
case 234:
|
|
@@ -37657,22 +37716,22 @@ var ts;
|
|
|
37657
37716
|
}
|
|
37658
37717
|
case 261:
|
|
37659
37718
|
return updateStrictModeStatementList(node.statements);
|
|
37660
|
-
case
|
|
37661
|
-
if (node.parent.kind ===
|
|
37719
|
+
case 339:
|
|
37720
|
+
if (node.parent.kind === 322) {
|
|
37662
37721
|
return bindParameter(node);
|
|
37663
37722
|
}
|
|
37664
|
-
if (node.parent.kind !==
|
|
37723
|
+
if (node.parent.kind !== 321) {
|
|
37665
37724
|
break;
|
|
37666
37725
|
}
|
|
37667
|
-
case
|
|
37726
|
+
case 346:
|
|
37668
37727
|
var propTag = node;
|
|
37669
|
-
var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind ===
|
|
37728
|
+
var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 315 ?
|
|
37670
37729
|
4 | 16777216 :
|
|
37671
37730
|
4;
|
|
37672
37731
|
return declareSymbolAndAddToSymbolTable(propTag, flags, 0);
|
|
37673
|
-
case
|
|
37674
|
-
case 336:
|
|
37732
|
+
case 344:
|
|
37675
37733
|
case 337:
|
|
37734
|
+
case 338:
|
|
37676
37735
|
return (delayedTypeAliases || (delayedTypeAliases = [])).push(node);
|
|
37677
37736
|
}
|
|
37678
37737
|
}
|
|
@@ -37851,7 +37910,7 @@ var ts;
|
|
|
37851
37910
|
declareSymbol(symbolTable, containingClass.symbol, node, 4 | 67108864, 0, true);
|
|
37852
37911
|
}
|
|
37853
37912
|
break;
|
|
37854
|
-
case
|
|
37913
|
+
case 304:
|
|
37855
37914
|
if (ts.hasDynamicName(node)) {
|
|
37856
37915
|
break;
|
|
37857
37916
|
}
|
|
@@ -37879,7 +37938,7 @@ var ts;
|
|
|
37879
37938
|
if (node.expression.kind === 108) {
|
|
37880
37939
|
bindThisPropertyAssignment(node);
|
|
37881
37940
|
}
|
|
37882
|
-
else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind ===
|
|
37941
|
+
else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 304) {
|
|
37883
37942
|
if (ts.isPrototypeAccess(node.expression)) {
|
|
37884
37943
|
bindPrototypePropertyAssignment(node, node.parent);
|
|
37885
37944
|
}
|
|
@@ -37910,7 +37969,7 @@ var ts;
|
|
|
37910
37969
|
}
|
|
37911
37970
|
function bindObjectDefinePropertyAssignment(node) {
|
|
37912
37971
|
var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]);
|
|
37913
|
-
var isToplevel = node.parent.parent.kind ===
|
|
37972
|
+
var isToplevel = node.parent.parent.kind === 304;
|
|
37914
37973
|
namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false);
|
|
37915
37974
|
bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false);
|
|
37916
37975
|
}
|
|
@@ -38004,8 +38063,8 @@ var ts;
|
|
|
38004
38063
|
}
|
|
38005
38064
|
function isTopLevelNamespaceAssignment(propertyAccess) {
|
|
38006
38065
|
return ts.isBinaryExpression(propertyAccess.parent)
|
|
38007
|
-
? getParentOfBinaryExpression(propertyAccess.parent).parent.kind ===
|
|
38008
|
-
: propertyAccess.parent.parent.kind ===
|
|
38066
|
+
? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 304
|
|
38067
|
+
: propertyAccess.parent.parent.kind === 304;
|
|
38009
38068
|
}
|
|
38010
38069
|
function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
|
|
38011
38070
|
var namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
|
|
@@ -38118,7 +38177,7 @@ var ts;
|
|
|
38118
38177
|
}
|
|
38119
38178
|
}
|
|
38120
38179
|
function bindParameter(node) {
|
|
38121
|
-
if (node.kind ===
|
|
38180
|
+
if (node.kind === 339 && container.kind !== 322) {
|
|
38122
38181
|
return;
|
|
38123
38182
|
}
|
|
38124
38183
|
if (inStrictMode && !(node.flags & 8388608)) {
|
|
@@ -38547,8 +38606,6 @@ var ts;
|
|
|
38547
38606
|
var instantiationCount = 0;
|
|
38548
38607
|
var instantiationDepth = 0;
|
|
38549
38608
|
var inlineLevel = 0;
|
|
38550
|
-
var varianceLevel = 0;
|
|
38551
|
-
var nestedVarianceSymbols;
|
|
38552
38609
|
var currentNode;
|
|
38553
38610
|
var emptySymbols = ts.createSymbolTable();
|
|
38554
38611
|
var arrayVariances = [1];
|
|
@@ -39555,7 +39612,7 @@ var ts;
|
|
|
39555
39612
|
return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
|
|
39556
39613
|
}
|
|
39557
39614
|
function isGlobalSourceFile(node) {
|
|
39558
|
-
return node.kind ===
|
|
39615
|
+
return node.kind === 304 && !ts.isExternalOrCommonJsModule(node);
|
|
39559
39616
|
}
|
|
39560
39617
|
function getSymbol(symbols, name, meaning) {
|
|
39561
39618
|
if (meaning) {
|
|
@@ -39766,7 +39823,7 @@ var ts;
|
|
|
39766
39823
|
case 168:
|
|
39767
39824
|
case 171:
|
|
39768
39825
|
case 172:
|
|
39769
|
-
case
|
|
39826
|
+
case 295:
|
|
39770
39827
|
return requiresScopeChangeWorker(node.name);
|
|
39771
39828
|
case 166:
|
|
39772
39829
|
if (ts.hasStaticModifier(node)) {
|
|
@@ -39808,12 +39865,12 @@ var ts;
|
|
|
39808
39865
|
if (result = lookup(location.locals, name, meaning)) {
|
|
39809
39866
|
var useResult = true;
|
|
39810
39867
|
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
|
|
39811
|
-
if (meaning & result.flags & 788968 && lastLocation.kind !==
|
|
39868
|
+
if (meaning & result.flags & 788968 && lastLocation.kind !== 319) {
|
|
39812
39869
|
useResult = result.flags & 262144
|
|
39813
39870
|
? lastLocation === location.type ||
|
|
39814
39871
|
lastLocation.kind === 163 ||
|
|
39815
|
-
lastLocation.kind === 338 ||
|
|
39816
39872
|
lastLocation.kind === 339 ||
|
|
39873
|
+
lastLocation.kind === 340 ||
|
|
39817
39874
|
lastLocation.kind === 162
|
|
39818
39875
|
: false;
|
|
39819
39876
|
}
|
|
@@ -39842,13 +39899,13 @@ var ts;
|
|
|
39842
39899
|
}
|
|
39843
39900
|
withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation);
|
|
39844
39901
|
switch (location.kind) {
|
|
39845
|
-
case
|
|
39902
|
+
case 304:
|
|
39846
39903
|
if (!ts.isExternalOrCommonJsModule(location))
|
|
39847
39904
|
break;
|
|
39848
39905
|
isInExternalModule = true;
|
|
39849
39906
|
case 260:
|
|
39850
39907
|
var moduleExports = ((_a = getSymbolOfNode(location)) === null || _a === void 0 ? void 0 : _a.exports) || emptySymbols;
|
|
39851
|
-
if (location.kind ===
|
|
39908
|
+
if (location.kind === 304 || (ts.isModuleDeclaration(location) && location.flags & 8388608 && !ts.isGlobalScopeAugmentation(location))) {
|
|
39852
39909
|
if (result = moduleExports.get("default")) {
|
|
39853
39910
|
var localSymbol = ts.getLocalSymbolForExportDefault(result);
|
|
39854
39911
|
if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) {
|
|
@@ -39964,9 +40021,9 @@ var ts;
|
|
|
39964
40021
|
location = location.parent;
|
|
39965
40022
|
}
|
|
39966
40023
|
break;
|
|
39967
|
-
case
|
|
39968
|
-
case 336:
|
|
40024
|
+
case 344:
|
|
39969
40025
|
case 337:
|
|
40026
|
+
case 338:
|
|
39970
40027
|
var root = ts.getJSDocRoot(location);
|
|
39971
40028
|
if (root) {
|
|
39972
40029
|
location = root.parent;
|
|
@@ -40011,7 +40068,7 @@ var ts;
|
|
|
40011
40068
|
}
|
|
40012
40069
|
if (!result) {
|
|
40013
40070
|
if (lastLocation) {
|
|
40014
|
-
ts.Debug.assert(lastLocation.kind ===
|
|
40071
|
+
ts.Debug.assert(lastLocation.kind === 304);
|
|
40015
40072
|
if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) {
|
|
40016
40073
|
return lastLocation.symbol;
|
|
40017
40074
|
}
|
|
@@ -40385,8 +40442,8 @@ var ts;
|
|
|
40385
40442
|
&& node.parent.left === node
|
|
40386
40443
|
&& node.parent.operatorToken.kind === 63
|
|
40387
40444
|
&& isAliasableOrJsExpression(node.parent.right)
|
|
40388
|
-
|| node.kind ===
|
|
40389
|
-
|| node.kind ===
|
|
40445
|
+
|| node.kind === 296
|
|
40446
|
+
|| node.kind === 295 && isAliasableOrJsExpression(node.initializer)
|
|
40390
40447
|
|| ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
|
|
40391
40448
|
}
|
|
40392
40449
|
function isAliasableOrJsExpression(e) {
|
|
@@ -40757,9 +40814,9 @@ var ts;
|
|
|
40757
40814
|
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
|
|
40758
40815
|
case 263:
|
|
40759
40816
|
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
|
|
40760
|
-
case
|
|
40817
|
+
case 296:
|
|
40761
40818
|
return resolveEntityName(node.name, 111551 | 788968 | 1920, true, dontRecursivelyResolve);
|
|
40762
|
-
case
|
|
40819
|
+
case 295:
|
|
40763
40820
|
return getTargetOfPropertyAssignment(node, dontRecursivelyResolve);
|
|
40764
40821
|
case 206:
|
|
40765
40822
|
case 205:
|
|
@@ -41059,7 +41116,7 @@ var ts;
|
|
|
41059
41116
|
: undefined;
|
|
41060
41117
|
}
|
|
41061
41118
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation) {
|
|
41062
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
41119
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41063
41120
|
if (isForAugmentation === void 0) { isForAugmentation = false; }
|
|
41064
41121
|
if (ts.startsWith(moduleReference, "@types/")) {
|
|
41065
41122
|
var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
@@ -41095,7 +41152,9 @@ var ts;
|
|
|
41095
41152
|
}
|
|
41096
41153
|
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
41097
41154
|
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
41098
|
-
|
|
41155
|
+
var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
|
|
41156
|
+
var overrideClause = overrideClauseHost && ts.isImportTypeNode(overrideClauseHost) ? (_g = overrideClauseHost.assertions) === null || _g === void 0 ? void 0 : _g.assertClause : overrideClauseHost === null || overrideClauseHost === void 0 ? void 0 : overrideClauseHost.assertClause;
|
|
41157
|
+
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
|
|
41099
41158
|
error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
|
|
41100
41159
|
}
|
|
41101
41160
|
if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
|
|
@@ -41163,10 +41222,10 @@ var ts;
|
|
|
41163
41222
|
}
|
|
41164
41223
|
else if (mode === ts.ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) {
|
|
41165
41224
|
var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
|
|
41166
|
-
var suggestedExt = (
|
|
41225
|
+
var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
|
|
41167
41226
|
var actualExt = _a[0], _importExt = _a[1];
|
|
41168
41227
|
return host.fileExists(absoluteRef_1 + actualExt);
|
|
41169
|
-
})) === null ||
|
|
41228
|
+
})) === null || _h === void 0 ? void 0 : _h[1];
|
|
41170
41229
|
if (suggestedExt) {
|
|
41171
41230
|
error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
|
|
41172
41231
|
}
|
|
@@ -41228,9 +41287,10 @@ var ts;
|
|
|
41228
41287
|
return links.cjsExportMerged = merged;
|
|
41229
41288
|
}
|
|
41230
41289
|
function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {
|
|
41290
|
+
var _a;
|
|
41231
41291
|
var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
|
|
41232
41292
|
if (!dontResolveAlias && symbol) {
|
|
41233
|
-
if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol,
|
|
41293
|
+
if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol, 304)) {
|
|
41234
41294
|
var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015
|
|
41235
41295
|
? "allowSyntheticDefaultImports"
|
|
41236
41296
|
: "esModuleInterop";
|
|
@@ -41246,12 +41306,16 @@ var ts;
|
|
|
41246
41306
|
if (defaultOnlyType) {
|
|
41247
41307
|
return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);
|
|
41248
41308
|
}
|
|
41249
|
-
|
|
41309
|
+
var targetFile = (_a = moduleSymbol === null || moduleSymbol === void 0 ? void 0 : moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
|
|
41310
|
+
var isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat);
|
|
41311
|
+
if (ts.getESModuleInterop(compilerOptions) || isEsmCjsRef) {
|
|
41250
41312
|
var sigs = getSignaturesOfStructuredType(type, 0);
|
|
41251
41313
|
if (!sigs || !sigs.length) {
|
|
41252
41314
|
sigs = getSignaturesOfStructuredType(type, 1);
|
|
41253
41315
|
}
|
|
41254
|
-
if ((sigs && sigs.length) ||
|
|
41316
|
+
if ((sigs && sigs.length) ||
|
|
41317
|
+
getPropertyOfType(type, "default", true) ||
|
|
41318
|
+
isEsmCjsRef) {
|
|
41255
41319
|
var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
41256
41320
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
41257
41321
|
}
|
|
@@ -41662,7 +41726,7 @@ var ts;
|
|
|
41662
41726
|
}
|
|
41663
41727
|
}
|
|
41664
41728
|
switch (location.kind) {
|
|
41665
|
-
case
|
|
41729
|
+
case 304:
|
|
41666
41730
|
if (!ts.isExternalOrCommonJsModule(location)) {
|
|
41667
41731
|
break;
|
|
41668
41732
|
}
|
|
@@ -41898,10 +41962,10 @@ var ts;
|
|
|
41898
41962
|
return node && getSymbolOfNode(node);
|
|
41899
41963
|
}
|
|
41900
41964
|
function hasExternalModuleSymbol(declaration) {
|
|
41901
|
-
return ts.isAmbientModule(declaration) || (declaration.kind ===
|
|
41965
|
+
return ts.isAmbientModule(declaration) || (declaration.kind === 304 && ts.isExternalOrCommonJsModule(declaration));
|
|
41902
41966
|
}
|
|
41903
41967
|
function hasNonGlobalAugmentationExternalModuleSymbol(declaration) {
|
|
41904
|
-
return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind ===
|
|
41968
|
+
return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 304 && ts.isExternalOrCommonJsModule(declaration));
|
|
41905
41969
|
}
|
|
41906
41970
|
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
|
|
41907
41971
|
var aliasesToMakeVisible;
|
|
@@ -41992,7 +42056,7 @@ var ts;
|
|
|
41992
42056
|
return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
|
|
41993
42057
|
function symbolToStringWorker(writer) {
|
|
41994
42058
|
var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
41995
|
-
var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) ===
|
|
42059
|
+
var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 304 ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
|
|
41996
42060
|
var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
|
|
41997
42061
|
printer.writeNode(4, entity, sourceFile, writer);
|
|
41998
42062
|
return writer;
|
|
@@ -42450,7 +42514,7 @@ var ts;
|
|
|
42450
42514
|
var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
|
|
42451
42515
|
(symbol.parent ||
|
|
42452
42516
|
ts.forEach(symbol.declarations, function (declaration) {
|
|
42453
|
-
return declaration.parent.kind ===
|
|
42517
|
+
return declaration.parent.kind === 304 || declaration.parent.kind === 261;
|
|
42454
42518
|
}));
|
|
42455
42519
|
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
|
|
42456
42520
|
return (!!(context.flags & 4096) || ((_a = context.visitedTypes) === null || _a === void 0 ? void 0 : _a.has(typeId))) &&
|
|
@@ -42814,8 +42878,8 @@ var ts;
|
|
|
42814
42878
|
}
|
|
42815
42879
|
function preserveCommentsOn(node) {
|
|
42816
42880
|
var _a;
|
|
42817
|
-
if (ts.some(propertySymbol.declarations, function (d) { return d.kind ===
|
|
42818
|
-
var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind ===
|
|
42881
|
+
if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 346; })) {
|
|
42882
|
+
var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 346; });
|
|
42819
42883
|
var commentText = ts.getTextOfJSDocComment(d.comment);
|
|
42820
42884
|
if (commentText) {
|
|
42821
42885
|
ts.setSyntheticLeadingComments(node, [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
@@ -42957,7 +43021,7 @@ var ts;
|
|
|
42957
43021
|
kind === 171 ? ts.factory.createGetAccessorDeclaration(undefined, modifiers, (_c = options === null || options === void 0 ? void 0 : options.name) !== null && _c !== void 0 ? _c : ts.factory.createIdentifier(""), parameters, returnTypeNode, undefined) :
|
|
42958
43022
|
kind === 172 ? ts.factory.createSetAccessorDeclaration(undefined, modifiers, (_d = options === null || options === void 0 ? void 0 : options.name) !== null && _d !== void 0 ? _d : ts.factory.createIdentifier(""), parameters, undefined) :
|
|
42959
43023
|
kind === 175 ? ts.factory.createIndexSignature(undefined, modifiers, parameters, returnTypeNode) :
|
|
42960
|
-
kind ===
|
|
43024
|
+
kind === 316 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
|
|
42961
43025
|
kind === 178 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
42962
43026
|
kind === 179 ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
42963
43027
|
kind === 255 ? ts.factory.createFunctionDeclaration(undefined, modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, undefined) :
|
|
@@ -42997,7 +43061,7 @@ var ts;
|
|
|
42997
43061
|
function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
|
|
42998
43062
|
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 163);
|
|
42999
43063
|
if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) {
|
|
43000
|
-
parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol,
|
|
43064
|
+
parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 339);
|
|
43001
43065
|
}
|
|
43002
43066
|
var parameterType = getTypeOfSymbol(parameterSymbol);
|
|
43003
43067
|
if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
|
|
@@ -43156,13 +43220,13 @@ var ts;
|
|
|
43156
43220
|
}
|
|
43157
43221
|
return top;
|
|
43158
43222
|
}
|
|
43159
|
-
function getSpecifierForModuleSymbol(symbol, context) {
|
|
43223
|
+
function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) {
|
|
43160
43224
|
var _a;
|
|
43161
|
-
var file = ts.getDeclarationOfKind(symbol,
|
|
43225
|
+
var file = ts.getDeclarationOfKind(symbol, 304);
|
|
43162
43226
|
if (!file) {
|
|
43163
43227
|
var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); });
|
|
43164
43228
|
if (equivalentFileSymbol) {
|
|
43165
|
-
file = ts.getDeclarationOfKind(equivalentFileSymbol,
|
|
43229
|
+
file = ts.getDeclarationOfKind(equivalentFileSymbol, 304);
|
|
43166
43230
|
}
|
|
43167
43231
|
}
|
|
43168
43232
|
if (file && file.moduleName !== undefined) {
|
|
@@ -43189,17 +43253,27 @@ var ts;
|
|
|
43189
43253
|
return ts.getSourceFileOfNode(ts.getNonAugmentationDeclaration(symbol)).fileName;
|
|
43190
43254
|
}
|
|
43191
43255
|
var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
|
|
43256
|
+
var resolutionMode = overrideImportMode || (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat);
|
|
43257
|
+
var cacheKey = getSpecifierCacheKey(contextFile.path, resolutionMode);
|
|
43192
43258
|
var links = getSymbolLinks(symbol);
|
|
43193
|
-
var specifier = links.specifierCache && links.specifierCache.get(
|
|
43259
|
+
var specifier = links.specifierCache && links.specifierCache.get(cacheKey);
|
|
43194
43260
|
if (!specifier) {
|
|
43195
43261
|
var isBundle_1 = !!ts.outFile(compilerOptions);
|
|
43196
43262
|
var moduleResolverHost = context.tracker.moduleResolverHost;
|
|
43197
43263
|
var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions;
|
|
43198
|
-
specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
43264
|
+
specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
43265
|
+
importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "project-relative",
|
|
43266
|
+
importModuleSpecifierEnding: isBundle_1 ? "minimal"
|
|
43267
|
+
: resolutionMode === ts.ModuleKind.ESNext ? "js"
|
|
43268
|
+
: undefined,
|
|
43269
|
+
}, { overrideImportMode: overrideImportMode }));
|
|
43199
43270
|
(_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map());
|
|
43200
|
-
links.specifierCache.set(
|
|
43271
|
+
links.specifierCache.set(cacheKey, specifier);
|
|
43201
43272
|
}
|
|
43202
43273
|
return specifier;
|
|
43274
|
+
function getSpecifierCacheKey(path, mode) {
|
|
43275
|
+
return mode === undefined ? path : mode + "|" + path;
|
|
43276
|
+
}
|
|
43203
43277
|
}
|
|
43204
43278
|
function symbolToEntityNameNode(symbol) {
|
|
43205
43279
|
var identifier = ts.factory.createIdentifier(ts.unescapeLeadingUnderscores(symbol.escapedName));
|
|
@@ -43211,11 +43285,40 @@ var ts;
|
|
|
43211
43285
|
if (ts.some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
43212
43286
|
var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined;
|
|
43213
43287
|
var typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);
|
|
43214
|
-
var
|
|
43288
|
+
var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
|
|
43289
|
+
var targetFile = ts.getSourceFileOfModule(chain[0]);
|
|
43290
|
+
var specifier = void 0;
|
|
43291
|
+
var assertion = void 0;
|
|
43292
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43293
|
+
if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
|
|
43294
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
|
|
43295
|
+
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
43296
|
+
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral("import"))
|
|
43297
|
+
])));
|
|
43298
|
+
}
|
|
43299
|
+
}
|
|
43300
|
+
if (!specifier) {
|
|
43301
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context);
|
|
43302
|
+
}
|
|
43215
43303
|
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
|
|
43216
|
-
|
|
43217
|
-
if (
|
|
43218
|
-
|
|
43304
|
+
var oldSpecifier = specifier;
|
|
43305
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43306
|
+
var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
43307
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
43308
|
+
if (specifier.indexOf("/node_modules/") >= 0) {
|
|
43309
|
+
specifier = oldSpecifier;
|
|
43310
|
+
}
|
|
43311
|
+
else {
|
|
43312
|
+
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
43313
|
+
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral(swappedMode === ts.ModuleKind.ESNext ? "import" : "require"))
|
|
43314
|
+
])));
|
|
43315
|
+
}
|
|
43316
|
+
}
|
|
43317
|
+
if (!assertion) {
|
|
43318
|
+
context.encounteredError = true;
|
|
43319
|
+
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
43320
|
+
context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
|
|
43321
|
+
}
|
|
43219
43322
|
}
|
|
43220
43323
|
}
|
|
43221
43324
|
var lit = ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(specifier));
|
|
@@ -43227,12 +43330,12 @@ var ts;
|
|
|
43227
43330
|
var lastId = ts.isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
43228
43331
|
lastId.typeArguments = undefined;
|
|
43229
43332
|
}
|
|
43230
|
-
return ts.factory.createImportTypeNode(lit, nonRootParts, typeParameterNodes, isTypeOf);
|
|
43333
|
+
return ts.factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
43231
43334
|
}
|
|
43232
43335
|
else {
|
|
43233
43336
|
var splitNode = getTopmostIndexedAccessType(nonRootParts);
|
|
43234
43337
|
var qualifier = splitNode.objectType.typeName;
|
|
43235
|
-
return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
43338
|
+
return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
43236
43339
|
}
|
|
43237
43340
|
}
|
|
43238
43341
|
var entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
|
|
@@ -43536,7 +43639,7 @@ var ts;
|
|
|
43536
43639
|
}
|
|
43537
43640
|
return transformed === existing ? ts.setTextRange(ts.factory.cloneNode(existing), existing) : transformed;
|
|
43538
43641
|
function visitExistingNodeTreeSymbols(node) {
|
|
43539
|
-
if (ts.isJSDocAllType(node) || node.kind ===
|
|
43642
|
+
if (ts.isJSDocAllType(node) || node.kind === 318) {
|
|
43540
43643
|
return ts.factory.createKeywordTypeNode(130);
|
|
43541
43644
|
}
|
|
43542
43645
|
if (ts.isJSDocUnknownType(node)) {
|
|
@@ -44224,7 +44327,7 @@ var ts;
|
|
|
44224
44327
|
}
|
|
44225
44328
|
ts.Debug.failBadSyntaxKind(((_c = node.parent) === null || _c === void 0 ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization");
|
|
44226
44329
|
break;
|
|
44227
|
-
case
|
|
44330
|
+
case 296:
|
|
44228
44331
|
if (((_e = (_d = node.parent) === null || _d === void 0 ? void 0 : _d.parent) === null || _e === void 0 ? void 0 : _e.kind) === 220) {
|
|
44229
44332
|
serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), targetName);
|
|
44230
44333
|
}
|
|
@@ -44629,7 +44732,7 @@ var ts;
|
|
|
44629
44732
|
ts.isExternalModuleAugmentation(node.parent.parent);
|
|
44630
44733
|
}
|
|
44631
44734
|
function isDefaultBindingContext(location) {
|
|
44632
|
-
return location.kind ===
|
|
44735
|
+
return location.kind === 304 || ts.isAmbientModule(location);
|
|
44633
44736
|
}
|
|
44634
44737
|
function getNameOfSymbolFromNameType(symbol, context) {
|
|
44635
44738
|
var nameType = getSymbolLinks(symbol).nameType;
|
|
@@ -44704,9 +44807,9 @@ var ts;
|
|
|
44704
44807
|
return false;
|
|
44705
44808
|
function determineIfDeclarationIsVisible() {
|
|
44706
44809
|
switch (node.kind) {
|
|
44707
|
-
case 336:
|
|
44708
|
-
case 343:
|
|
44709
44810
|
case 337:
|
|
44811
|
+
case 344:
|
|
44812
|
+
case 338:
|
|
44710
44813
|
return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent));
|
|
44711
44814
|
case 202:
|
|
44712
44815
|
return isDeclarationVisible(node.parent.parent);
|
|
@@ -44727,7 +44830,7 @@ var ts;
|
|
|
44727
44830
|
}
|
|
44728
44831
|
var parent = getDeclarationContainer(node);
|
|
44729
44832
|
if (!(ts.getCombinedModifierFlags(node) & 1) &&
|
|
44730
|
-
!(node.kind !== 264 && parent.kind !==
|
|
44833
|
+
!(node.kind !== 264 && parent.kind !== 304 && parent.flags & 8388608)) {
|
|
44731
44834
|
return isGlobalSourceFile(parent);
|
|
44732
44835
|
}
|
|
44733
44836
|
return isDeclarationVisible(parent);
|
|
@@ -44762,7 +44865,7 @@ var ts;
|
|
|
44762
44865
|
case 269:
|
|
44763
44866
|
return false;
|
|
44764
44867
|
case 162:
|
|
44765
|
-
case
|
|
44868
|
+
case 304:
|
|
44766
44869
|
case 263:
|
|
44767
44870
|
return true;
|
|
44768
44871
|
case 270:
|
|
@@ -44980,7 +45083,7 @@ var ts;
|
|
|
44980
45083
|
var ancestor = node.parent.parent;
|
|
44981
45084
|
switch (ancestor.kind) {
|
|
44982
45085
|
case 202:
|
|
44983
|
-
case
|
|
45086
|
+
case 295:
|
|
44984
45087
|
return getSyntheticElementAccess(ancestor);
|
|
44985
45088
|
case 203:
|
|
44986
45089
|
return getSyntheticElementAccess(node.parent);
|
|
@@ -44995,7 +45098,7 @@ var ts;
|
|
|
44995
45098
|
if (node.kind === 202 && parent.kind === 200) {
|
|
44996
45099
|
return getLiteralPropertyNameText(node.propertyName || node.name);
|
|
44997
45100
|
}
|
|
44998
|
-
if (node.kind ===
|
|
45101
|
+
if (node.kind === 295 || node.kind === 296) {
|
|
44999
45102
|
return getLiteralPropertyNameText(node.name);
|
|
45000
45103
|
}
|
|
45001
45104
|
return "" + parent.elements.indexOf(node);
|
|
@@ -46034,16 +46137,16 @@ var ts;
|
|
|
46034
46137
|
case 167:
|
|
46035
46138
|
case 178:
|
|
46036
46139
|
case 179:
|
|
46037
|
-
case
|
|
46140
|
+
case 316:
|
|
46038
46141
|
case 255:
|
|
46039
46142
|
case 168:
|
|
46040
46143
|
case 212:
|
|
46041
46144
|
case 213:
|
|
46042
46145
|
case 258:
|
|
46043
|
-
case 342:
|
|
46044
46146
|
case 343:
|
|
46147
|
+
case 344:
|
|
46148
|
+
case 338:
|
|
46045
46149
|
case 337:
|
|
46046
|
-
case 336:
|
|
46047
46150
|
case 194:
|
|
46048
46151
|
case 188: {
|
|
46049
46152
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
@@ -46059,13 +46162,13 @@ var ts;
|
|
|
46059
46162
|
getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
|
|
46060
46163
|
return thisType ? ts.append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters;
|
|
46061
46164
|
}
|
|
46062
|
-
case
|
|
46165
|
+
case 339:
|
|
46063
46166
|
var paramSymbol = ts.getParameterSymbolFromJSDoc(node);
|
|
46064
46167
|
if (paramSymbol) {
|
|
46065
46168
|
node = paramSymbol.valueDeclaration;
|
|
46066
46169
|
}
|
|
46067
46170
|
break;
|
|
46068
|
-
case
|
|
46171
|
+
case 319: {
|
|
46069
46172
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
46070
46173
|
return node.tags
|
|
46071
46174
|
? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
|
|
@@ -46408,7 +46511,7 @@ var ts;
|
|
|
46408
46511
|
}
|
|
46409
46512
|
else {
|
|
46410
46513
|
type = errorType;
|
|
46411
|
-
if (declaration.kind ===
|
|
46514
|
+
if (declaration.kind === 338) {
|
|
46412
46515
|
error(declaration.typeExpression.type, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
|
|
46413
46516
|
}
|
|
46414
46517
|
else {
|
|
@@ -48225,10 +48328,10 @@ var ts;
|
|
|
48225
48328
|
return result;
|
|
48226
48329
|
}
|
|
48227
48330
|
function isJSDocOptionalParameter(node) {
|
|
48228
|
-
return ts.isInJSFile(node) && (node.type && node.type.kind ===
|
|
48331
|
+
return ts.isInJSFile(node) && (node.type && node.type.kind === 315
|
|
48229
48332
|
|| ts.getJSDocParameterTags(node).some(function (_a) {
|
|
48230
48333
|
var isBracketed = _a.isBracketed, typeExpression = _a.typeExpression;
|
|
48231
|
-
return isBracketed || !!typeExpression && typeExpression.type.kind ===
|
|
48334
|
+
return isBracketed || !!typeExpression && typeExpression.type.kind === 315;
|
|
48232
48335
|
}));
|
|
48233
48336
|
}
|
|
48234
48337
|
function tryFindAmbientModule(moduleName, withAugmentations) {
|
|
@@ -48264,7 +48367,7 @@ var ts;
|
|
|
48264
48367
|
return false;
|
|
48265
48368
|
}
|
|
48266
48369
|
var isBracketed = node.isBracketed, typeExpression = node.typeExpression;
|
|
48267
|
-
return isBracketed || !!typeExpression && typeExpression.type.kind ===
|
|
48370
|
+
return isBracketed || !!typeExpression && typeExpression.type.kind === 315;
|
|
48268
48371
|
}
|
|
48269
48372
|
function createTypePredicate(kind, parameterName, parameterIndex, type) {
|
|
48270
48373
|
return { kind: kind, parameterName: parameterName, parameterIndex: parameterIndex, type: type };
|
|
@@ -48432,7 +48535,7 @@ var ts;
|
|
|
48432
48535
|
case 205:
|
|
48433
48536
|
case 206:
|
|
48434
48537
|
return traverse(node.expression);
|
|
48435
|
-
case
|
|
48538
|
+
case 295:
|
|
48436
48539
|
return traverse(node.initializer);
|
|
48437
48540
|
default:
|
|
48438
48541
|
return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && !!ts.forEachChild(node, traverse);
|
|
@@ -49066,7 +49169,7 @@ var ts;
|
|
|
49066
49169
|
function getConditionalFlowTypeOfType(type, node) {
|
|
49067
49170
|
var constraints;
|
|
49068
49171
|
var covariant = true;
|
|
49069
|
-
while (node && !ts.isStatement(node) && node.kind !==
|
|
49172
|
+
while (node && !ts.isStatement(node) && node.kind !== 319) {
|
|
49070
49173
|
var parent = node.parent;
|
|
49071
49174
|
if (parent.kind === 163) {
|
|
49072
49175
|
covariant = !covariant;
|
|
@@ -49407,10 +49510,10 @@ var ts;
|
|
|
49407
49510
|
case 190:
|
|
49408
49511
|
case 184:
|
|
49409
49512
|
case 196:
|
|
49410
|
-
case
|
|
49411
|
-
case 312:
|
|
49513
|
+
case 315:
|
|
49412
49514
|
case 313:
|
|
49413
|
-
case
|
|
49515
|
+
case 314:
|
|
49516
|
+
case 308:
|
|
49414
49517
|
return mayResolveTypeAlias(node.type);
|
|
49415
49518
|
case 185:
|
|
49416
49519
|
return node.type.kind !== 182 || mayResolveTypeAlias(node.type.elementType);
|
|
@@ -51380,8 +51483,8 @@ var ts;
|
|
|
51380
51483
|
function getTypeFromTypeNodeWorker(node) {
|
|
51381
51484
|
switch (node.kind) {
|
|
51382
51485
|
case 130:
|
|
51383
|
-
case 310:
|
|
51384
51486
|
case 311:
|
|
51487
|
+
case 312:
|
|
51385
51488
|
return anyType;
|
|
51386
51489
|
case 154:
|
|
51387
51490
|
return unknownType;
|
|
@@ -51429,26 +51532,26 @@ var ts;
|
|
|
51429
51532
|
return getTypeFromUnionTypeNode(node);
|
|
51430
51533
|
case 187:
|
|
51431
51534
|
return getTypeFromIntersectionTypeNode(node);
|
|
51432
|
-
case
|
|
51535
|
+
case 313:
|
|
51433
51536
|
return getTypeFromJSDocNullableTypeNode(node);
|
|
51434
|
-
case
|
|
51537
|
+
case 315:
|
|
51435
51538
|
return addOptionality(getTypeFromTypeNode(node.type));
|
|
51436
51539
|
case 196:
|
|
51437
51540
|
return getTypeFromNamedTupleTypeNode(node);
|
|
51438
51541
|
case 190:
|
|
51439
|
-
case
|
|
51440
|
-
case
|
|
51542
|
+
case 314:
|
|
51543
|
+
case 308:
|
|
51441
51544
|
return getTypeFromTypeNode(node.type);
|
|
51442
51545
|
case 185:
|
|
51443
51546
|
return getTypeFromRestTypeNode(node);
|
|
51444
|
-
case
|
|
51547
|
+
case 317:
|
|
51445
51548
|
return getTypeFromJSDocVariadicType(node);
|
|
51446
51549
|
case 178:
|
|
51447
51550
|
case 179:
|
|
51448
51551
|
case 181:
|
|
51449
|
-
case 320:
|
|
51450
|
-
case 315:
|
|
51451
51552
|
case 321:
|
|
51553
|
+
case 316:
|
|
51554
|
+
case 322:
|
|
51452
51555
|
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
|
|
51453
51556
|
case 192:
|
|
51454
51557
|
return getTypeFromTypeOperatorNode(node);
|
|
@@ -51931,7 +52034,7 @@ var ts;
|
|
|
51931
52034
|
case 220:
|
|
51932
52035
|
return (node.operatorToken.kind === 56 || node.operatorToken.kind === 60) &&
|
|
51933
52036
|
(isContextSensitive(node.left) || isContextSensitive(node.right));
|
|
51934
|
-
case
|
|
52037
|
+
case 295:
|
|
51935
52038
|
return isContextSensitive(node.initializer);
|
|
51936
52039
|
case 211:
|
|
51937
52040
|
return isContextSensitive(node.expression);
|
|
@@ -52400,8 +52503,8 @@ var ts;
|
|
|
52400
52503
|
case 172: return [3, 2];
|
|
52401
52504
|
case 171: return [3, 2];
|
|
52402
52505
|
case 168: return [3, 2];
|
|
52403
|
-
case
|
|
52404
|
-
case
|
|
52506
|
+
case 296: return [3, 2];
|
|
52507
|
+
case 295: return [3, 4];
|
|
52405
52508
|
}
|
|
52406
52509
|
return [3, 6];
|
|
52407
52510
|
case 2: return [4, { errorNode: prop.name, innerExpression: undefined, nameType: type }];
|
|
@@ -52703,7 +52806,7 @@ var ts;
|
|
|
52703
52806
|
}
|
|
52704
52807
|
if (source.flags & 524288 && target.flags & 524288) {
|
|
52705
52808
|
var related = relation.get(getRelationKey(source, target, 0, relation, false));
|
|
52706
|
-
if (related !== undefined
|
|
52809
|
+
if (related !== undefined) {
|
|
52707
52810
|
return !!(related & 1);
|
|
52708
52811
|
}
|
|
52709
52812
|
}
|
|
@@ -54670,47 +54773,37 @@ var ts;
|
|
|
54670
54773
|
}
|
|
54671
54774
|
return false;
|
|
54672
54775
|
}
|
|
54673
|
-
function
|
|
54674
|
-
if (type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8) {
|
|
54675
|
-
return arrayVariances;
|
|
54676
|
-
}
|
|
54677
|
-
return getVariancesWorker(type.symbol, type.typeParameters, getMarkerTypeReference);
|
|
54678
|
-
}
|
|
54679
|
-
function getMarkerTypeReference(symbol, source, target) {
|
|
54680
|
-
var type = getDeclaredTypeOfSymbol(symbol);
|
|
54776
|
+
function getMarkerTypeReference(type, source, target) {
|
|
54681
54777
|
var result = createTypeReference(type, ts.map(type.typeParameters, function (t) { return t === source ? target : t; }));
|
|
54682
54778
|
result.objectFlags |= 4096;
|
|
54683
54779
|
return result;
|
|
54684
54780
|
}
|
|
54685
54781
|
function getAliasVariances(symbol) {
|
|
54686
|
-
|
|
54687
|
-
|
|
54688
|
-
|
|
54689
|
-
|
|
54690
|
-
|
|
54691
|
-
|
|
54782
|
+
var links = getSymbolLinks(symbol);
|
|
54783
|
+
return getVariancesWorker(links.typeParameters, links, function (_links, param, marker) {
|
|
54784
|
+
var type = getTypeAliasInstantiation(symbol, instantiateTypes(links.typeParameters, makeUnaryTypeMapper(param, marker)));
|
|
54785
|
+
type.aliasTypeArgumentsContainsMarker = true;
|
|
54786
|
+
return type;
|
|
54787
|
+
});
|
|
54692
54788
|
}
|
|
54693
|
-
function getVariancesWorker(
|
|
54789
|
+
function getVariancesWorker(typeParameters, cache, createMarkerType) {
|
|
54790
|
+
var _a, _b, _c;
|
|
54694
54791
|
if (typeParameters === void 0) { typeParameters = ts.emptyArray; }
|
|
54695
|
-
var
|
|
54696
|
-
if (!
|
|
54697
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes", "getVariancesWorker", { arity: typeParameters.length, id:
|
|
54698
|
-
|
|
54699
|
-
|
|
54700
|
-
}
|
|
54701
|
-
varianceLevel++;
|
|
54702
|
-
links.variances = ts.emptyArray;
|
|
54703
|
-
var variances = [];
|
|
54792
|
+
var variances = cache.variances;
|
|
54793
|
+
if (!variances) {
|
|
54794
|
+
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes", "getVariancesWorker", { arity: typeParameters.length, id: (_c = (_a = cache.id) !== null && _a !== void 0 ? _a : (_b = cache.declaredType) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : -1 });
|
|
54795
|
+
cache.variances = ts.emptyArray;
|
|
54796
|
+
variances = [];
|
|
54704
54797
|
var _loop_21 = function (tp) {
|
|
54705
54798
|
var unmeasurable = false;
|
|
54706
54799
|
var unreliable = false;
|
|
54707
54800
|
var oldHandler = outofbandVarianceMarkerHandler;
|
|
54708
54801
|
outofbandVarianceMarkerHandler = function (onlyUnreliable) { return onlyUnreliable ? unreliable = true : unmeasurable = true; };
|
|
54709
|
-
var typeWithSuper = createMarkerType(
|
|
54710
|
-
var typeWithSub = createMarkerType(
|
|
54802
|
+
var typeWithSuper = createMarkerType(cache, tp, markerSuperType);
|
|
54803
|
+
var typeWithSub = createMarkerType(cache, tp, markerSubType);
|
|
54711
54804
|
var variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? 1 : 0) |
|
|
54712
54805
|
(isTypeAssignableTo(typeWithSuper, typeWithSub) ? 2 : 0);
|
|
54713
|
-
if (variance === 3 && isTypeAssignableTo(createMarkerType(
|
|
54806
|
+
if (variance === 3 && isTypeAssignableTo(createMarkerType(cache, tp, markerOtherType), typeWithSuper)) {
|
|
54714
54807
|
variance = 4;
|
|
54715
54808
|
}
|
|
54716
54809
|
outofbandVarianceMarkerHandler = oldHandler;
|
|
@@ -54728,18 +54821,16 @@ var ts;
|
|
|
54728
54821
|
var tp = typeParameters_1[_i];
|
|
54729
54822
|
_loop_21(tp);
|
|
54730
54823
|
}
|
|
54731
|
-
|
|
54732
|
-
varianceLevel--;
|
|
54733
|
-
if (varianceLevel === 0 && nestedVarianceSymbols) {
|
|
54734
|
-
for (var _a = 0, nestedVarianceSymbols_1 = nestedVarianceSymbols; _a < nestedVarianceSymbols_1.length; _a++) {
|
|
54735
|
-
var sym = nestedVarianceSymbols_1[_a];
|
|
54736
|
-
getSymbolLinks(sym).variances = undefined;
|
|
54737
|
-
}
|
|
54738
|
-
nestedVarianceSymbols = undefined;
|
|
54739
|
-
}
|
|
54824
|
+
cache.variances = variances;
|
|
54740
54825
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
54741
54826
|
}
|
|
54742
|
-
return
|
|
54827
|
+
return variances;
|
|
54828
|
+
}
|
|
54829
|
+
function getVariances(type) {
|
|
54830
|
+
if (type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8) {
|
|
54831
|
+
return arrayVariances;
|
|
54832
|
+
}
|
|
54833
|
+
return getVariancesWorker(type.typeParameters, type, getMarkerTypeReference);
|
|
54743
54834
|
}
|
|
54744
54835
|
function hasCovariantVoidArgument(typeArguments, variances) {
|
|
54745
54836
|
for (var i = 0; i < variances.length; i++) {
|
|
@@ -55509,7 +55600,7 @@ var ts;
|
|
|
55509
55600
|
return;
|
|
55510
55601
|
}
|
|
55511
55602
|
break;
|
|
55512
|
-
case
|
|
55603
|
+
case 316:
|
|
55513
55604
|
error(declaration, ts.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
|
|
55514
55605
|
return;
|
|
55515
55606
|
case 255:
|
|
@@ -55671,7 +55762,7 @@ var ts;
|
|
|
55671
55762
|
function isNonGenericTopLevelType(type) {
|
|
55672
55763
|
if (type.aliasSymbol && !type.aliasTypeArguments) {
|
|
55673
55764
|
var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 258);
|
|
55674
|
-
return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind ===
|
|
55765
|
+
return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 304 ? true : n.kind === 260 ? false : "quit"; }));
|
|
55675
55766
|
}
|
|
55676
55767
|
return false;
|
|
55677
55768
|
}
|
|
@@ -56598,7 +56689,7 @@ var ts;
|
|
|
56598
56689
|
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
56599
56690
|
}
|
|
56600
56691
|
default:
|
|
56601
|
-
if (node.parent.kind ===
|
|
56692
|
+
if (node.parent.kind === 296) {
|
|
56602
56693
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
56603
56694
|
}
|
|
56604
56695
|
else {
|
|
@@ -56803,7 +56894,7 @@ var ts;
|
|
|
56803
56894
|
}
|
|
56804
56895
|
function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
|
|
56805
56896
|
var keyPropertyName = getKeyPropertyName(unionType);
|
|
56806
|
-
var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind ===
|
|
56897
|
+
var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 295 &&
|
|
56807
56898
|
p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer); });
|
|
56808
56899
|
var propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
|
|
56809
56900
|
return propType && getConstituentTypeForKeyType(unionType, propType);
|
|
@@ -56985,7 +57076,7 @@ var ts;
|
|
|
56985
57076
|
}
|
|
56986
57077
|
function getAssignedTypeOfBinaryExpression(node) {
|
|
56987
57078
|
var isDestructuringDefaultAssignment = node.parent.kind === 203 && isDestructuringAssignmentTarget(node.parent) ||
|
|
56988
|
-
node.parent.kind ===
|
|
57079
|
+
node.parent.kind === 295 && isDestructuringAssignmentTarget(node.parent.parent);
|
|
56989
57080
|
return isDestructuringDefaultAssignment ?
|
|
56990
57081
|
getTypeWithDefault(getAssignedType(node), node.right) :
|
|
56991
57082
|
getTypeOfExpression(node.right);
|
|
@@ -57021,9 +57112,9 @@ var ts;
|
|
|
57021
57112
|
return getAssignedTypeOfArrayLiteralElement(parent, node);
|
|
57022
57113
|
case 224:
|
|
57023
57114
|
return getAssignedTypeOfSpreadExpression(parent);
|
|
57024
|
-
case 294:
|
|
57025
|
-
return getAssignedTypeOfPropertyAssignment(parent);
|
|
57026
57115
|
case 295:
|
|
57116
|
+
return getAssignedTypeOfPropertyAssignment(parent);
|
|
57117
|
+
case 296:
|
|
57027
57118
|
return getAssignedTypeOfShorthandPropertyAssignment(parent);
|
|
57028
57119
|
}
|
|
57029
57120
|
return errorType;
|
|
@@ -58480,7 +58571,7 @@ var ts;
|
|
|
58480
58571
|
return ts.findAncestor(node.parent, function (node) {
|
|
58481
58572
|
return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
|
|
58482
58573
|
node.kind === 261 ||
|
|
58483
|
-
node.kind ===
|
|
58574
|
+
node.kind === 304 ||
|
|
58484
58575
|
node.kind === 166;
|
|
58485
58576
|
});
|
|
58486
58577
|
}
|
|
@@ -58679,7 +58770,7 @@ var ts;
|
|
|
58679
58770
|
}
|
|
58680
58771
|
else if (declaration.kind === 225) {
|
|
58681
58772
|
var container = ts.getThisContainer(node, false);
|
|
58682
|
-
while (container.kind !==
|
|
58773
|
+
while (container.kind !== 304) {
|
|
58683
58774
|
if (container.parent === declaration) {
|
|
58684
58775
|
if (ts.isPropertyDeclaration(container) && ts.isStatic(container) || ts.isClassStaticBlockDeclaration(container)) {
|
|
58685
58776
|
getNodeLinks(declaration).flags |= 16777216;
|
|
@@ -59000,7 +59091,7 @@ var ts;
|
|
|
59000
59091
|
return container.parent.parent.left.expression;
|
|
59001
59092
|
}
|
|
59002
59093
|
else if (container.kind === 212 &&
|
|
59003
|
-
container.parent.kind ===
|
|
59094
|
+
container.parent.kind === 295 &&
|
|
59004
59095
|
container.parent.parent.kind === 204 &&
|
|
59005
59096
|
ts.isBinaryExpression(container.parent.parent.parent) &&
|
|
59006
59097
|
ts.getAssignmentDeclarationKind(container.parent.parent.parent) === 6) {
|
|
@@ -59028,7 +59119,7 @@ var ts;
|
|
|
59028
59119
|
}
|
|
59029
59120
|
function getTypeForThisExpressionFromJSDoc(node) {
|
|
59030
59121
|
var jsdocType = ts.getJSDocType(node);
|
|
59031
|
-
if (jsdocType && jsdocType.kind ===
|
|
59122
|
+
if (jsdocType && jsdocType.kind === 316) {
|
|
59032
59123
|
var jsDocFunctionType = jsdocType;
|
|
59033
59124
|
if (jsDocFunctionType.parameters.length > 0 &&
|
|
59034
59125
|
jsDocFunctionType.parameters[0].name &&
|
|
@@ -59164,7 +59255,7 @@ var ts;
|
|
|
59164
59255
|
return (func.kind === 168 ||
|
|
59165
59256
|
func.kind === 171 ||
|
|
59166
59257
|
func.kind === 172) && func.parent.kind === 204 ? func.parent :
|
|
59167
|
-
func.kind === 212 && func.parent.kind ===
|
|
59258
|
+
func.kind === 212 && func.parent.kind === 295 ? func.parent.parent :
|
|
59168
59259
|
undefined;
|
|
59169
59260
|
}
|
|
59170
59261
|
function getThisTypeArgument(type) {
|
|
@@ -59200,7 +59291,7 @@ var ts;
|
|
|
59200
59291
|
if (thisType) {
|
|
59201
59292
|
return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral)));
|
|
59202
59293
|
}
|
|
59203
|
-
if (literal.parent.kind !==
|
|
59294
|
+
if (literal.parent.kind !== 295) {
|
|
59204
59295
|
break;
|
|
59205
59296
|
}
|
|
59206
59297
|
literal = literal.parent.parent;
|
|
@@ -59674,7 +59765,7 @@ var ts;
|
|
|
59674
59765
|
return false;
|
|
59675
59766
|
}
|
|
59676
59767
|
function discriminateContextualTypeByObjectMembers(node, contextualType) {
|
|
59677
|
-
return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind ===
|
|
59768
|
+
return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 295 && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
|
|
59678
59769
|
}
|
|
59679
59770
|
function discriminateContextualTypeByJSXAttributes(node, contextualType) {
|
|
59680
59771
|
return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return getContextFreeTypeOfExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
|
|
@@ -59747,10 +59838,10 @@ var ts;
|
|
|
59747
59838
|
return ts.isConstTypeReference(parent.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(parent.type);
|
|
59748
59839
|
case 220:
|
|
59749
59840
|
return getContextualTypeForBinaryOperand(node, contextFlags);
|
|
59750
|
-
case 294:
|
|
59751
59841
|
case 295:
|
|
59752
|
-
return getContextualTypeForObjectLiteralElement(parent, contextFlags);
|
|
59753
59842
|
case 296:
|
|
59843
|
+
return getContextualTypeForObjectLiteralElement(parent, contextFlags);
|
|
59844
|
+
case 297:
|
|
59754
59845
|
return getContextualType(parent.parent, contextFlags);
|
|
59755
59846
|
case 203: {
|
|
59756
59847
|
var arrayLiteral = parent;
|
|
@@ -60221,11 +60312,11 @@ var ts;
|
|
|
60221
60312
|
var member = getSymbolOfNode(memberDecl);
|
|
60222
60313
|
var computedNameType = memberDecl.name && memberDecl.name.kind === 161 ?
|
|
60223
60314
|
checkComputedPropertyName(memberDecl.name) : undefined;
|
|
60224
|
-
if (memberDecl.kind ===
|
|
60225
|
-
memberDecl.kind ===
|
|
60315
|
+
if (memberDecl.kind === 295 ||
|
|
60316
|
+
memberDecl.kind === 296 ||
|
|
60226
60317
|
ts.isObjectLiteralMethod(memberDecl)) {
|
|
60227
|
-
var type = memberDecl.kind ===
|
|
60228
|
-
memberDecl.kind ===
|
|
60318
|
+
var type = memberDecl.kind === 295 ? checkPropertyAssignment(memberDecl, checkMode) :
|
|
60319
|
+
memberDecl.kind === 296 ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
|
|
60229
60320
|
checkObjectLiteralMethod(memberDecl, checkMode);
|
|
60230
60321
|
if (isInJavascript) {
|
|
60231
60322
|
var jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl);
|
|
@@ -60246,8 +60337,8 @@ var ts;
|
|
|
60246
60337
|
prop.nameType = nameType;
|
|
60247
60338
|
}
|
|
60248
60339
|
if (inDestructuringPattern) {
|
|
60249
|
-
var isOptional = (memberDecl.kind ===
|
|
60250
|
-
(memberDecl.kind ===
|
|
60340
|
+
var isOptional = (memberDecl.kind === 295 && hasDefaultValue(memberDecl.initializer)) ||
|
|
60341
|
+
(memberDecl.kind === 296 && memberDecl.objectAssignmentInitializer);
|
|
60251
60342
|
if (isOptional) {
|
|
60252
60343
|
prop.flags |= 16777216;
|
|
60253
60344
|
}
|
|
@@ -60271,7 +60362,7 @@ var ts;
|
|
|
60271
60362
|
member = prop;
|
|
60272
60363
|
allPropertiesTable === null || allPropertiesTable === void 0 ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
|
|
60273
60364
|
}
|
|
60274
|
-
else if (memberDecl.kind ===
|
|
60365
|
+
else if (memberDecl.kind === 297) {
|
|
60275
60366
|
if (languageVersion < 2) {
|
|
60276
60367
|
checkExternalEmitHelpers(memberDecl, 2);
|
|
60277
60368
|
}
|
|
@@ -60326,7 +60417,7 @@ var ts;
|
|
|
60326
60417
|
}
|
|
60327
60418
|
propertiesArray.push(member);
|
|
60328
60419
|
}
|
|
60329
|
-
if (contextualTypeHasPattern && node.parent.kind !==
|
|
60420
|
+
if (contextualTypeHasPattern && node.parent.kind !== 297) {
|
|
60330
60421
|
for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
|
|
60331
60422
|
var prop = _e[_d];
|
|
60332
60423
|
if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
|
|
@@ -61279,11 +61370,11 @@ var ts;
|
|
|
61279
61370
|
switch (node.kind) {
|
|
61280
61371
|
case 166:
|
|
61281
61372
|
return true;
|
|
61282
|
-
case
|
|
61373
|
+
case 295:
|
|
61283
61374
|
case 168:
|
|
61284
61375
|
case 171:
|
|
61285
61376
|
case 172:
|
|
61286
|
-
case
|
|
61377
|
+
case 297:
|
|
61287
61378
|
case 161:
|
|
61288
61379
|
case 232:
|
|
61289
61380
|
case 287:
|
|
@@ -63560,7 +63651,7 @@ var ts;
|
|
|
63560
63651
|
}
|
|
63561
63652
|
function getParameterIdentifierNameAtPosition(signature, pos) {
|
|
63562
63653
|
var _a;
|
|
63563
|
-
if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) ===
|
|
63654
|
+
if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 316) {
|
|
63564
63655
|
return undefined;
|
|
63565
63656
|
}
|
|
63566
63657
|
var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
|
|
@@ -64559,7 +64650,7 @@ var ts;
|
|
|
64559
64650
|
if (rightIsThis === void 0) { rightIsThis = false; }
|
|
64560
64651
|
var properties = node.properties;
|
|
64561
64652
|
var property = properties[propertyIndex];
|
|
64562
|
-
if (property.kind ===
|
|
64653
|
+
if (property.kind === 295 || property.kind === 296) {
|
|
64563
64654
|
var name = property.name;
|
|
64564
64655
|
var exprType = getLiteralTypeFromPropertyName(name);
|
|
64565
64656
|
if (isTypeUsableAsPropertyName(exprType)) {
|
|
@@ -64572,9 +64663,9 @@ var ts;
|
|
|
64572
64663
|
}
|
|
64573
64664
|
var elementType = getIndexedAccessType(objectLiteralType, exprType, 32, name);
|
|
64574
64665
|
var type = getFlowTypeOfDestructuring(property, elementType);
|
|
64575
|
-
return checkDestructuringAssignment(property.kind ===
|
|
64666
|
+
return checkDestructuringAssignment(property.kind === 296 ? property : property.initializer, type);
|
|
64576
64667
|
}
|
|
64577
|
-
else if (property.kind ===
|
|
64668
|
+
else if (property.kind === 297) {
|
|
64578
64669
|
if (propertyIndex < properties.length - 1) {
|
|
64579
64670
|
error(property, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
|
|
64580
64671
|
}
|
|
@@ -64652,7 +64743,7 @@ var ts;
|
|
|
64652
64743
|
}
|
|
64653
64744
|
function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) {
|
|
64654
64745
|
var target;
|
|
64655
|
-
if (exprOrAssignment.kind ===
|
|
64746
|
+
if (exprOrAssignment.kind === 296) {
|
|
64656
64747
|
var prop = exprOrAssignment;
|
|
64657
64748
|
if (prop.objectAssignmentInitializer) {
|
|
64658
64749
|
if (strictNullChecks &&
|
|
@@ -64680,10 +64771,10 @@ var ts;
|
|
|
64680
64771
|
}
|
|
64681
64772
|
function checkReferenceAssignment(target, sourceType, checkMode) {
|
|
64682
64773
|
var targetType = checkExpression(target, checkMode);
|
|
64683
|
-
var error = target.parent.kind ===
|
|
64774
|
+
var error = target.parent.kind === 297 ?
|
|
64684
64775
|
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
|
|
64685
64776
|
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
|
|
64686
|
-
var optionalError = target.parent.kind ===
|
|
64777
|
+
var optionalError = target.parent.kind === 297 ?
|
|
64687
64778
|
ts.Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access :
|
|
64688
64779
|
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;
|
|
64689
64780
|
if (checkReferenceExpression(target, error, optionalError)) {
|
|
@@ -65948,7 +66039,7 @@ var ts;
|
|
|
65948
66039
|
checkAsyncFunctionReturnType(node, returnTypeNode);
|
|
65949
66040
|
}
|
|
65950
66041
|
}
|
|
65951
|
-
if (node.kind !== 175 && node.kind !==
|
|
66042
|
+
if (node.kind !== 175 && node.kind !== 316) {
|
|
65952
66043
|
registerForUnusedIdentifiersCheck(node);
|
|
65953
66044
|
}
|
|
65954
66045
|
}
|
|
@@ -66484,6 +66575,22 @@ var ts;
|
|
|
66484
66575
|
grammarErrorOnNode(node, ts.Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type);
|
|
66485
66576
|
}
|
|
66486
66577
|
checkSourceElement(node.typeParameter);
|
|
66578
|
+
var symbol = getSymbolOfNode(node.typeParameter);
|
|
66579
|
+
if (symbol.declarations && symbol.declarations.length > 1) {
|
|
66580
|
+
var links = getSymbolLinks(symbol);
|
|
66581
|
+
if (!links.typeParametersChecked) {
|
|
66582
|
+
links.typeParametersChecked = true;
|
|
66583
|
+
var typeParameter = getDeclaredTypeOfTypeParameter(symbol);
|
|
66584
|
+
var declarations = ts.getDeclarationsOfKind(symbol, 162);
|
|
66585
|
+
if (!areTypeParametersIdentical(declarations, [typeParameter], function (decl) { return [decl]; })) {
|
|
66586
|
+
var name = symbolToString(symbol);
|
|
66587
|
+
for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
|
|
66588
|
+
var declaration = declarations_4[_i];
|
|
66589
|
+
error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_constraints, name);
|
|
66590
|
+
}
|
|
66591
|
+
}
|
|
66592
|
+
}
|
|
66593
|
+
}
|
|
66487
66594
|
registerForUnusedIdentifiersCheck(node);
|
|
66488
66595
|
}
|
|
66489
66596
|
function checkTemplateLiteralType(node) {
|
|
@@ -66497,6 +66604,14 @@ var ts;
|
|
|
66497
66604
|
}
|
|
66498
66605
|
function checkImportType(node) {
|
|
66499
66606
|
checkSourceElement(node.argument);
|
|
66607
|
+
if (node.assertions) {
|
|
66608
|
+
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
66609
|
+
if (override) {
|
|
66610
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
66611
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
|
|
66612
|
+
}
|
|
66613
|
+
}
|
|
66614
|
+
}
|
|
66500
66615
|
getTypeFromTypeNode(node);
|
|
66501
66616
|
}
|
|
66502
66617
|
function checkNamedTupleMember(node) {
|
|
@@ -66632,8 +66747,8 @@ var ts;
|
|
|
66632
66747
|
var hasNonAmbientClass = false;
|
|
66633
66748
|
var functionDeclarations = [];
|
|
66634
66749
|
if (declarations) {
|
|
66635
|
-
for (var _i = 0,
|
|
66636
|
-
var current =
|
|
66750
|
+
for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
|
|
66751
|
+
var current = declarations_5[_i];
|
|
66637
66752
|
var node = current;
|
|
66638
66753
|
var inAmbientContext = node.flags & 8388608;
|
|
66639
66754
|
var inAmbientContextOrInterface = node.parent && (node.parent.kind === 257 || node.parent.kind === 181) || inAmbientContext;
|
|
@@ -66777,9 +66892,9 @@ var ts;
|
|
|
66777
66892
|
switch (d.kind) {
|
|
66778
66893
|
case 257:
|
|
66779
66894
|
case 258:
|
|
66780
|
-
case
|
|
66781
|
-
case 336:
|
|
66895
|
+
case 344:
|
|
66782
66896
|
case 337:
|
|
66897
|
+
case 338:
|
|
66783
66898
|
return 2;
|
|
66784
66899
|
case 260:
|
|
66785
66900
|
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
|
|
@@ -66787,9 +66902,9 @@ var ts;
|
|
|
66787
66902
|
: 4;
|
|
66788
66903
|
case 256:
|
|
66789
66904
|
case 259:
|
|
66790
|
-
case
|
|
66905
|
+
case 298:
|
|
66791
66906
|
return 2 | 1;
|
|
66792
|
-
case
|
|
66907
|
+
case 304:
|
|
66793
66908
|
return 2 | 1 | 4;
|
|
66794
66909
|
case 270:
|
|
66795
66910
|
case 220:
|
|
@@ -67300,7 +67415,7 @@ var ts;
|
|
|
67300
67415
|
checkUnusedClassMembers(node, addDiagnostic);
|
|
67301
67416
|
checkUnusedTypeParameters(node, addDiagnostic);
|
|
67302
67417
|
break;
|
|
67303
|
-
case
|
|
67418
|
+
case 304:
|
|
67304
67419
|
case 260:
|
|
67305
67420
|
case 234:
|
|
67306
67421
|
case 262:
|
|
@@ -67535,8 +67650,8 @@ var ts;
|
|
|
67535
67650
|
: ts.createDiagnosticForNode(declarationList.parent.kind === 236 ? declarationList.parent : declarationList, ts.Diagnostics.All_variables_are_unused));
|
|
67536
67651
|
}
|
|
67537
67652
|
else {
|
|
67538
|
-
for (var _i = 0,
|
|
67539
|
-
var decl =
|
|
67653
|
+
for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
|
|
67654
|
+
var decl = declarations_6[_i];
|
|
67540
67655
|
addDiagnostic(decl, 0, ts.createDiagnosticForNode(decl, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name)));
|
|
67541
67656
|
}
|
|
67542
67657
|
}
|
|
@@ -67595,7 +67710,7 @@ var ts;
|
|
|
67595
67710
|
node.kind === 167 ||
|
|
67596
67711
|
node.kind === 171 ||
|
|
67597
67712
|
node.kind === 172 ||
|
|
67598
|
-
node.kind ===
|
|
67713
|
+
node.kind === 295) {
|
|
67599
67714
|
return false;
|
|
67600
67715
|
}
|
|
67601
67716
|
if (node.flags & 8388608) {
|
|
@@ -67653,7 +67768,7 @@ var ts;
|
|
|
67653
67768
|
return;
|
|
67654
67769
|
}
|
|
67655
67770
|
var parent = getDeclarationContainer(node);
|
|
67656
|
-
if (parent.kind ===
|
|
67771
|
+
if (parent.kind === 304 && ts.isExternalOrCommonJsModule(parent)) {
|
|
67657
67772
|
errorSkippedOn("noEmit", name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
|
|
67658
67773
|
}
|
|
67659
67774
|
}
|
|
@@ -67665,7 +67780,7 @@ var ts;
|
|
|
67665
67780
|
return;
|
|
67666
67781
|
}
|
|
67667
67782
|
var parent = getDeclarationContainer(node);
|
|
67668
|
-
if (parent.kind ===
|
|
67783
|
+
if (parent.kind === 304 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048) {
|
|
67669
67784
|
errorSkippedOn("noEmit", name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
|
|
67670
67785
|
}
|
|
67671
67786
|
}
|
|
@@ -67756,7 +67871,7 @@ var ts;
|
|
|
67756
67871
|
(container.kind === 234 && ts.isFunctionLike(container.parent) ||
|
|
67757
67872
|
container.kind === 261 ||
|
|
67758
67873
|
container.kind === 260 ||
|
|
67759
|
-
container.kind ===
|
|
67874
|
+
container.kind === 304);
|
|
67760
67875
|
if (!namesShareScope) {
|
|
67761
67876
|
var name = symbolToString(localDeclarationSymbol);
|
|
67762
67877
|
error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
|
|
@@ -68975,21 +69090,21 @@ var ts;
|
|
|
68975
69090
|
return;
|
|
68976
69091
|
}
|
|
68977
69092
|
var type = getDeclaredTypeOfSymbol(symbol);
|
|
68978
|
-
if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
|
|
69093
|
+
if (!areTypeParametersIdentical(declarations, type.localTypeParameters, ts.getEffectiveTypeParameterDeclarations)) {
|
|
68979
69094
|
var name = symbolToString(symbol);
|
|
68980
|
-
for (var _i = 0,
|
|
68981
|
-
var declaration =
|
|
69095
|
+
for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
|
|
69096
|
+
var declaration = declarations_7[_i];
|
|
68982
69097
|
error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
|
|
68983
69098
|
}
|
|
68984
69099
|
}
|
|
68985
69100
|
}
|
|
68986
69101
|
}
|
|
68987
|
-
function areTypeParametersIdentical(declarations, targetParameters) {
|
|
69102
|
+
function areTypeParametersIdentical(declarations, targetParameters, getTypeParameterDeclarations) {
|
|
68988
69103
|
var maxTypeArgumentCount = ts.length(targetParameters);
|
|
68989
69104
|
var minTypeArgumentCount = getMinTypeArgumentCount(targetParameters);
|
|
68990
|
-
for (var _i = 0,
|
|
68991
|
-
var declaration =
|
|
68992
|
-
var sourceParameters =
|
|
69105
|
+
for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
|
|
69106
|
+
var declaration = declarations_8[_i];
|
|
69107
|
+
var sourceParameters = getTypeParameterDeclarations(declaration);
|
|
68993
69108
|
var numTypeParameters = sourceParameters.length;
|
|
68994
69109
|
if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
|
|
68995
69110
|
return false;
|
|
@@ -69766,8 +69881,8 @@ var ts;
|
|
|
69766
69881
|
function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
|
|
69767
69882
|
var declarations = symbol.declarations;
|
|
69768
69883
|
if (declarations) {
|
|
69769
|
-
for (var _i = 0,
|
|
69770
|
-
var declaration =
|
|
69884
|
+
for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
|
|
69885
|
+
var declaration = declarations_9[_i];
|
|
69771
69886
|
if ((declaration.kind === 256 ||
|
|
69772
69887
|
(declaration.kind === 255 && ts.nodeIsPresent(declaration.body))) &&
|
|
69773
69888
|
!(declaration.flags & 8388608)) {
|
|
@@ -69944,7 +70059,7 @@ var ts;
|
|
|
69944
70059
|
return false;
|
|
69945
70060
|
}
|
|
69946
70061
|
var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
|
|
69947
|
-
if (node.parent.kind !==
|
|
70062
|
+
if (node.parent.kind !== 304 && !inAmbientExternalModule) {
|
|
69948
70063
|
error(moduleName, node.kind === 271 ?
|
|
69949
70064
|
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
|
|
69950
70065
|
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
|
|
@@ -70072,6 +70187,14 @@ var ts;
|
|
|
70072
70187
|
function checkAssertClause(declaration) {
|
|
70073
70188
|
var _a;
|
|
70074
70189
|
if (declaration.assertClause) {
|
|
70190
|
+
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
70191
|
+
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
70192
|
+
if (validForTypeAssertions && override) {
|
|
70193
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
70194
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
|
|
70195
|
+
}
|
|
70196
|
+
return;
|
|
70197
|
+
}
|
|
70075
70198
|
var mode = (moduleKind === ts.ModuleKind.NodeNext) && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
70076
70199
|
if (mode !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.ESNext) {
|
|
70077
70200
|
return grammarErrorOnNode(declaration.assertClause, moduleKind === ts.ModuleKind.NodeNext
|
|
@@ -70081,6 +70204,9 @@ var ts;
|
|
|
70081
70204
|
if (ts.isImportDeclaration(declaration) ? (_a = declaration.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
70082
70205
|
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
|
|
70083
70206
|
}
|
|
70207
|
+
if (override) {
|
|
70208
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
|
|
70209
|
+
}
|
|
70084
70210
|
}
|
|
70085
70211
|
}
|
|
70086
70212
|
function checkImportDeclaration(node) {
|
|
@@ -70165,7 +70291,7 @@ var ts;
|
|
|
70165
70291
|
var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
|
|
70166
70292
|
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 261 &&
|
|
70167
70293
|
!node.moduleSpecifier && node.flags & 8388608;
|
|
70168
|
-
if (node.parent.kind !==
|
|
70294
|
+
if (node.parent.kind !== 304 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
|
70169
70295
|
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
|
70170
70296
|
}
|
|
70171
70297
|
}
|
|
@@ -70204,7 +70330,7 @@ var ts;
|
|
|
70204
70330
|
return false;
|
|
70205
70331
|
}
|
|
70206
70332
|
function checkGrammarModuleElementContext(node, errorMessage) {
|
|
70207
|
-
var isInAppropriateContext = node.parent.kind ===
|
|
70333
|
+
var isInAppropriateContext = node.parent.kind === 304 || node.parent.kind === 261 || node.parent.kind === 260;
|
|
70208
70334
|
if (!isInAppropriateContext) {
|
|
70209
70335
|
grammarErrorOnFirstToken(node, errorMessage);
|
|
70210
70336
|
}
|
|
@@ -70279,7 +70405,7 @@ var ts;
|
|
|
70279
70405
|
if (checkGrammarModuleElementContext(node, illegalContextMessage)) {
|
|
70280
70406
|
return;
|
|
70281
70407
|
}
|
|
70282
|
-
var container = node.parent.kind ===
|
|
70408
|
+
var container = node.parent.kind === 304 ? node.parent : node.parent.parent;
|
|
70283
70409
|
if (container.kind === 260 && !ts.isAmbientModule(container)) {
|
|
70284
70410
|
if (node.isExportEquals) {
|
|
70285
70411
|
error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
|
|
@@ -70464,40 +70590,40 @@ var ts;
|
|
|
70464
70590
|
return checkImportType(node);
|
|
70465
70591
|
case 196:
|
|
70466
70592
|
return checkNamedTupleMember(node);
|
|
70467
|
-
case 326:
|
|
70468
|
-
return checkJSDocAugmentsTag(node);
|
|
70469
70593
|
case 327:
|
|
70594
|
+
return checkJSDocAugmentsTag(node);
|
|
70595
|
+
case 328:
|
|
70470
70596
|
return checkJSDocImplementsTag(node);
|
|
70471
|
-
case
|
|
70472
|
-
case 336:
|
|
70597
|
+
case 344:
|
|
70473
70598
|
case 337:
|
|
70599
|
+
case 338:
|
|
70474
70600
|
return checkJSDocTypeAliasTag(node);
|
|
70475
|
-
case
|
|
70601
|
+
case 343:
|
|
70476
70602
|
return checkJSDocTemplateTag(node);
|
|
70477
|
-
case
|
|
70603
|
+
case 342:
|
|
70478
70604
|
return checkJSDocTypeTag(node);
|
|
70479
|
-
case
|
|
70605
|
+
case 339:
|
|
70480
70606
|
return checkJSDocParameterTag(node);
|
|
70481
|
-
case
|
|
70607
|
+
case 346:
|
|
70482
70608
|
return checkJSDocPropertyTag(node);
|
|
70483
|
-
case
|
|
70609
|
+
case 316:
|
|
70484
70610
|
checkJSDocFunctionType(node);
|
|
70611
|
+
case 314:
|
|
70485
70612
|
case 313:
|
|
70486
|
-
case 312:
|
|
70487
|
-
case 310:
|
|
70488
70613
|
case 311:
|
|
70489
|
-
case
|
|
70614
|
+
case 312:
|
|
70615
|
+
case 321:
|
|
70490
70616
|
checkJSDocTypeIsInJsFile(node);
|
|
70491
70617
|
ts.forEachChild(node, checkSourceElement);
|
|
70492
70618
|
return;
|
|
70493
|
-
case
|
|
70619
|
+
case 317:
|
|
70494
70620
|
checkJSDocVariadicType(node);
|
|
70495
70621
|
return;
|
|
70496
|
-
case
|
|
70622
|
+
case 308:
|
|
70497
70623
|
return checkSourceElement(node.type);
|
|
70498
|
-
case 331:
|
|
70499
|
-
case 333:
|
|
70500
70624
|
case 332:
|
|
70625
|
+
case 334:
|
|
70626
|
+
case 333:
|
|
70501
70627
|
return checkJSDocAccessibilityModifiers(node);
|
|
70502
70628
|
case 193:
|
|
70503
70629
|
return checkIndexedAccessType(node);
|
|
@@ -70802,7 +70928,7 @@ var ts;
|
|
|
70802
70928
|
copySymbols(location.locals, meaning);
|
|
70803
70929
|
}
|
|
70804
70930
|
switch (location.kind) {
|
|
70805
|
-
case
|
|
70931
|
+
case 304:
|
|
70806
70932
|
if (!ts.isExternalModule(location))
|
|
70807
70933
|
break;
|
|
70808
70934
|
case 260:
|
|
@@ -70874,9 +71000,9 @@ var ts;
|
|
|
70874
71000
|
case 257:
|
|
70875
71001
|
case 258:
|
|
70876
71002
|
case 259:
|
|
70877
|
-
case
|
|
70878
|
-
case 336:
|
|
71003
|
+
case 344:
|
|
70879
71004
|
case 337:
|
|
71005
|
+
case 338:
|
|
70880
71006
|
return true;
|
|
70881
71007
|
case 266:
|
|
70882
71008
|
return node.isTypeOnly;
|
|
@@ -71015,10 +71141,10 @@ var ts;
|
|
|
71015
71141
|
return entityNameSymbol;
|
|
71016
71142
|
}
|
|
71017
71143
|
}
|
|
71018
|
-
if (name.parent.kind ===
|
|
71144
|
+
if (name.parent.kind === 339) {
|
|
71019
71145
|
return ts.getParameterSymbolFromJSDoc(name.parent);
|
|
71020
71146
|
}
|
|
71021
|
-
if (name.parent.kind === 162 && name.parent.parent.kind ===
|
|
71147
|
+
if (name.parent.kind === 162 && name.parent.parent.kind === 343) {
|
|
71022
71148
|
ts.Debug.assert(!ts.isInJSFile(name));
|
|
71023
71149
|
var typeParameter = ts.getTypeParameterFromJsDoc(name.parent);
|
|
71024
71150
|
return typeParameter && typeParameter.symbol;
|
|
@@ -71096,7 +71222,7 @@ var ts;
|
|
|
71096
71222
|
}
|
|
71097
71223
|
}
|
|
71098
71224
|
function getSymbolAtLocation(node, ignoreErrors) {
|
|
71099
|
-
if (node.kind ===
|
|
71225
|
+
if (node.kind === 304) {
|
|
71100
71226
|
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
|
|
71101
71227
|
}
|
|
71102
71228
|
var parent = node.parent;
|
|
@@ -71212,7 +71338,7 @@ var ts;
|
|
|
71212
71338
|
return undefined;
|
|
71213
71339
|
}
|
|
71214
71340
|
function getShorthandAssignmentValueSymbol(location) {
|
|
71215
|
-
if (location && location.kind ===
|
|
71341
|
+
if (location && location.kind === 296) {
|
|
71216
71342
|
return resolveEntityName(location.name, 111551 | 2097152);
|
|
71217
71343
|
}
|
|
71218
71344
|
return undefined;
|
|
@@ -71291,7 +71417,7 @@ var ts;
|
|
|
71291
71417
|
var iteratedType = getTypeOfExpression(expr.parent.right);
|
|
71292
71418
|
return checkDestructuringAssignment(expr, iteratedType || errorType);
|
|
71293
71419
|
}
|
|
71294
|
-
if (expr.parent.kind ===
|
|
71420
|
+
if (expr.parent.kind === 295) {
|
|
71295
71421
|
var node_3 = ts.cast(expr.parent.parent, ts.isObjectLiteralExpression);
|
|
71296
71422
|
var typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node_3) || errorType;
|
|
71297
71423
|
var propertyIndex = ts.indexOfNode(node_3.properties, expr.parent);
|
|
@@ -71426,7 +71552,7 @@ var ts;
|
|
|
71426
71552
|
}
|
|
71427
71553
|
var parentSymbol_1 = getParentOfSymbol(symbol);
|
|
71428
71554
|
if (parentSymbol_1) {
|
|
71429
|
-
if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) ===
|
|
71555
|
+
if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) === 304) {
|
|
71430
71556
|
var symbolFile = parentSymbol_1.valueDeclaration;
|
|
71431
71557
|
var referenceFile = ts.getSourceFileOfNode(node);
|
|
71432
71558
|
var symbolIsUmdExport = symbolFile !== referenceFile;
|
|
@@ -71525,7 +71651,7 @@ var ts;
|
|
|
71525
71651
|
}
|
|
71526
71652
|
function isTopLevelValueImportEqualsWithEntityName(nodeIn) {
|
|
71527
71653
|
var node = ts.getParseTreeNode(nodeIn, ts.isImportEqualsDeclaration);
|
|
71528
|
-
if (node === undefined || node.parent.kind !==
|
|
71654
|
+
if (node === undefined || node.parent.kind !== 304 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
|
|
71529
71655
|
return false;
|
|
71530
71656
|
}
|
|
71531
71657
|
var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
|
|
@@ -71625,7 +71751,7 @@ var ts;
|
|
|
71625
71751
|
}
|
|
71626
71752
|
function canHaveConstantValue(node) {
|
|
71627
71753
|
switch (node.kind) {
|
|
71628
|
-
case
|
|
71754
|
+
case 298:
|
|
71629
71755
|
case 205:
|
|
71630
71756
|
case 206:
|
|
71631
71757
|
return true;
|
|
@@ -71633,7 +71759,7 @@ var ts;
|
|
|
71633
71759
|
return false;
|
|
71634
71760
|
}
|
|
71635
71761
|
function getConstantValue(node) {
|
|
71636
|
-
if (node.kind ===
|
|
71762
|
+
if (node.kind === 298) {
|
|
71637
71763
|
return getEnumMemberValue(node);
|
|
71638
71764
|
}
|
|
71639
71765
|
var symbol = getNodeLinks(node).resolvedSymbol;
|
|
@@ -71916,7 +72042,7 @@ var ts;
|
|
|
71916
72042
|
},
|
|
71917
72043
|
getDeclarationStatementsForSourceFile: function (node, flags, tracker, bundled) {
|
|
71918
72044
|
var n = ts.getParseTreeNode(node);
|
|
71919
|
-
ts.Debug.assert(n && n.kind ===
|
|
72045
|
+
ts.Debug.assert(n && n.kind === 304, "Non-sourcefile node passed into getDeclarationsForSourceFile");
|
|
71920
72046
|
var sym = getSymbolOfNode(node);
|
|
71921
72047
|
if (!sym) {
|
|
71922
72048
|
return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled);
|
|
@@ -72000,7 +72126,7 @@ var ts;
|
|
|
72000
72126
|
break;
|
|
72001
72127
|
}
|
|
72002
72128
|
}
|
|
72003
|
-
if (current.valueDeclaration && current.valueDeclaration.kind ===
|
|
72129
|
+
if (current.valueDeclaration && current.valueDeclaration.kind === 304 && current.flags & 512) {
|
|
72004
72130
|
return false;
|
|
72005
72131
|
}
|
|
72006
72132
|
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
|
|
@@ -72032,7 +72158,7 @@ var ts;
|
|
|
72032
72158
|
if (!moduleSymbol) {
|
|
72033
72159
|
return undefined;
|
|
72034
72160
|
}
|
|
72035
|
-
return ts.getDeclarationOfKind(moduleSymbol,
|
|
72161
|
+
return ts.getDeclarationOfKind(moduleSymbol, 304);
|
|
72036
72162
|
}
|
|
72037
72163
|
function initializeTypeChecker() {
|
|
72038
72164
|
for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
|
|
@@ -72293,7 +72419,7 @@ var ts;
|
|
|
72293
72419
|
else if (flags & 256) {
|
|
72294
72420
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
|
|
72295
72421
|
}
|
|
72296
|
-
else if (node.parent.kind === 261 || node.parent.kind ===
|
|
72422
|
+
else if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72297
72423
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
|
|
72298
72424
|
}
|
|
72299
72425
|
else if (flags & 128) {
|
|
@@ -72319,7 +72445,7 @@ var ts;
|
|
|
72319
72445
|
else if (flags & 256) {
|
|
72320
72446
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
|
|
72321
72447
|
}
|
|
72322
|
-
else if (node.parent.kind === 261 || node.parent.kind ===
|
|
72448
|
+
else if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72323
72449
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
|
|
72324
72450
|
}
|
|
72325
72451
|
else if (node.kind === 163) {
|
|
@@ -72365,7 +72491,7 @@ var ts;
|
|
|
72365
72491
|
flags |= 1;
|
|
72366
72492
|
break;
|
|
72367
72493
|
case 88:
|
|
72368
|
-
var container = node.parent.kind ===
|
|
72494
|
+
var container = node.parent.kind === 304 ? node.parent : node.parent.parent;
|
|
72369
72495
|
if (container.kind === 260 && !ts.isAmbientModule(container)) {
|
|
72370
72496
|
return grammarErrorOnNode(modifier, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
|
|
72371
72497
|
}
|
|
@@ -72503,7 +72629,7 @@ var ts;
|
|
|
72503
72629
|
case 163:
|
|
72504
72630
|
return false;
|
|
72505
72631
|
default:
|
|
72506
|
-
if (node.parent.kind === 261 || node.parent.kind ===
|
|
72632
|
+
if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72507
72633
|
return false;
|
|
72508
72634
|
}
|
|
72509
72635
|
switch (node.kind) {
|
|
@@ -72785,7 +72911,7 @@ var ts;
|
|
|
72785
72911
|
var seen = new ts.Map();
|
|
72786
72912
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
72787
72913
|
var prop = _a[_i];
|
|
72788
|
-
if (prop.kind ===
|
|
72914
|
+
if (prop.kind === 297) {
|
|
72789
72915
|
if (inDestructuring) {
|
|
72790
72916
|
var expression = ts.skipParentheses(prop.expression);
|
|
72791
72917
|
if (ts.isArrayLiteralExpression(expression) || ts.isObjectLiteralExpression(expression)) {
|
|
@@ -72798,7 +72924,7 @@ var ts;
|
|
|
72798
72924
|
if (name.kind === 161) {
|
|
72799
72925
|
checkGrammarComputedPropertyName(name);
|
|
72800
72926
|
}
|
|
72801
|
-
if (prop.kind ===
|
|
72927
|
+
if (prop.kind === 296 && !inDestructuring && prop.objectAssignmentInitializer) {
|
|
72802
72928
|
grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern);
|
|
72803
72929
|
}
|
|
72804
72930
|
if (name.kind === 80) {
|
|
@@ -72814,9 +72940,9 @@ var ts;
|
|
|
72814
72940
|
}
|
|
72815
72941
|
var currentKind = void 0;
|
|
72816
72942
|
switch (prop.kind) {
|
|
72817
|
-
case
|
|
72943
|
+
case 296:
|
|
72818
72944
|
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
72819
|
-
case
|
|
72945
|
+
case 295:
|
|
72820
72946
|
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
|
|
72821
72947
|
if (name.kind === 8) {
|
|
72822
72948
|
checkGrammarNumericLiteral(name);
|
|
@@ -73461,7 +73587,7 @@ var ts;
|
|
|
73461
73587
|
if (!links.hasReportedStatementInAmbientContext && (ts.isFunctionLike(node.parent) || ts.isAccessor(node.parent))) {
|
|
73462
73588
|
return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
|
|
73463
73589
|
}
|
|
73464
|
-
if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind ===
|
|
73590
|
+
if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind === 304) {
|
|
73465
73591
|
var links_2 = getNodeLinks(node.parent);
|
|
73466
73592
|
if (!links_2.hasReportedStatementInAmbientContext) {
|
|
73467
73593
|
return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
|
|
@@ -73481,7 +73607,7 @@ var ts;
|
|
|
73481
73607
|
else if (ts.isChildOfNodeWithKind(node, 195)) {
|
|
73482
73608
|
diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
|
|
73483
73609
|
}
|
|
73484
|
-
else if (ts.isChildOfNodeWithKind(node,
|
|
73610
|
+
else if (ts.isChildOfNodeWithKind(node, 298)) {
|
|
73485
73611
|
diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
|
|
73486
73612
|
}
|
|
73487
73613
|
if (diagnosticMessage) {
|
|
@@ -73984,7 +74110,10 @@ var ts;
|
|
|
73984
74110
|
return factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
|
|
73985
74111
|
case 199:
|
|
73986
74112
|
ts.Debug.type(node);
|
|
73987
|
-
return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
|
|
74113
|
+
return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.assertions, visitor, ts.isNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
|
|
74114
|
+
case 294:
|
|
74115
|
+
ts.Debug.type(node);
|
|
74116
|
+
return factory.updateImportTypeAssertionContainer(node, nodeVisitor(node.assertClause, visitor, ts.isNode), node.multiLine);
|
|
73988
74117
|
case 196:
|
|
73989
74118
|
ts.Debug.type(node);
|
|
73990
74119
|
return factory.updateNamedTupleMember(node, visitNode(node.dotDotDotToken, visitor, ts.isDotDotDotToken), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.questionToken, visitor, ts.isQuestionToken), visitNode(node.type, visitor, ts.isTypeNode));
|
|
@@ -74283,25 +74412,25 @@ var ts;
|
|
|
74283
74412
|
case 291:
|
|
74284
74413
|
ts.Debug.type(node);
|
|
74285
74414
|
return factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
|
|
74286
|
-
case
|
|
74415
|
+
case 295:
|
|
74287
74416
|
ts.Debug.type(node);
|
|
74288
74417
|
return factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
74289
|
-
case
|
|
74418
|
+
case 296:
|
|
74290
74419
|
ts.Debug.type(node);
|
|
74291
74420
|
return factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
|
|
74292
|
-
case
|
|
74421
|
+
case 297:
|
|
74293
74422
|
ts.Debug.type(node);
|
|
74294
74423
|
return factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
74295
|
-
case
|
|
74424
|
+
case 298:
|
|
74296
74425
|
ts.Debug.type(node);
|
|
74297
74426
|
return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
74298
|
-
case
|
|
74427
|
+
case 304:
|
|
74299
74428
|
ts.Debug.type(node);
|
|
74300
74429
|
return factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context));
|
|
74301
|
-
case
|
|
74430
|
+
case 349:
|
|
74302
74431
|
ts.Debug.type(node);
|
|
74303
74432
|
return factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
74304
|
-
case
|
|
74433
|
+
case 350:
|
|
74305
74434
|
ts.Debug.type(node);
|
|
74306
74435
|
return factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
74307
74436
|
default:
|
|
@@ -74937,7 +75066,7 @@ var ts;
|
|
|
74937
75066
|
function chainBundle(context, transformSourceFile) {
|
|
74938
75067
|
return transformSourceFileOrBundle;
|
|
74939
75068
|
function transformSourceFileOrBundle(node) {
|
|
74940
|
-
return node.kind ===
|
|
75069
|
+
return node.kind === 304 ? transformSourceFile(node) : transformBundle(node);
|
|
74941
75070
|
}
|
|
74942
75071
|
function transformBundle(node) {
|
|
74943
75072
|
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
@@ -75652,14 +75781,14 @@ var ts;
|
|
|
75652
75781
|
var applicableSubstitutions;
|
|
75653
75782
|
return transformSourceFileOrBundle;
|
|
75654
75783
|
function transformSourceFileOrBundle(node) {
|
|
75655
|
-
if (node.kind ===
|
|
75784
|
+
if (node.kind === 305) {
|
|
75656
75785
|
return transformBundle(node);
|
|
75657
75786
|
}
|
|
75658
75787
|
return transformSourceFile(node);
|
|
75659
75788
|
}
|
|
75660
75789
|
function transformBundle(node) {
|
|
75661
75790
|
return factory.createBundle(node.sourceFiles.map(transformSourceFile), ts.mapDefined(node.prepends, function (prepend) {
|
|
75662
|
-
if (prepend.kind ===
|
|
75791
|
+
if (prepend.kind === 307) {
|
|
75663
75792
|
return ts.createUnparsedSourceFile(prepend, "js");
|
|
75664
75793
|
}
|
|
75665
75794
|
return prepend;
|
|
@@ -75692,7 +75821,7 @@ var ts;
|
|
|
75692
75821
|
}
|
|
75693
75822
|
function onBeforeVisitNode(node) {
|
|
75694
75823
|
switch (node.kind) {
|
|
75695
|
-
case
|
|
75824
|
+
case 304:
|
|
75696
75825
|
case 262:
|
|
75697
75826
|
case 261:
|
|
75698
75827
|
case 234:
|
|
@@ -76440,15 +76569,15 @@ var ts;
|
|
|
76440
76569
|
case 191:
|
|
76441
76570
|
case 199:
|
|
76442
76571
|
break;
|
|
76443
|
-
case 310:
|
|
76444
76572
|
case 311:
|
|
76445
|
-
case
|
|
76573
|
+
case 312:
|
|
76446
76574
|
case 316:
|
|
76447
76575
|
case 317:
|
|
76576
|
+
case 318:
|
|
76448
76577
|
break;
|
|
76449
|
-
case 312:
|
|
76450
76578
|
case 313:
|
|
76451
76579
|
case 314:
|
|
76580
|
+
case 315:
|
|
76452
76581
|
return serializeTypeNode(node.type);
|
|
76453
76582
|
default:
|
|
76454
76583
|
return ts.Debug.failBadSyntaxKind(node);
|
|
@@ -76900,7 +77029,7 @@ var ts;
|
|
|
76900
77029
|
function addVarForEnumOrModuleDeclaration(statements, node) {
|
|
76901
77030
|
var statement = factory.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.createVariableDeclarationList([
|
|
76902
77031
|
factory.createVariableDeclaration(factory.getLocalName(node, false, true))
|
|
76903
|
-
], currentLexicalScope.kind ===
|
|
77032
|
+
], currentLexicalScope.kind === 304 ? 0 : 1));
|
|
76904
77033
|
ts.setOriginalNode(statement, node);
|
|
76905
77034
|
recordEmittedDeclarationInScope(node);
|
|
76906
77035
|
if (isFirstEmittedDeclarationInScope(node)) {
|
|
@@ -77177,7 +77306,7 @@ var ts;
|
|
|
77177
77306
|
if ((enabledSubstitutions & 2) === 0) {
|
|
77178
77307
|
enabledSubstitutions |= 2;
|
|
77179
77308
|
context.enableSubstitution(79);
|
|
77180
|
-
context.enableSubstitution(
|
|
77309
|
+
context.enableSubstitution(296);
|
|
77181
77310
|
context.enableEmitNotification(260);
|
|
77182
77311
|
}
|
|
77183
77312
|
}
|
|
@@ -77263,7 +77392,7 @@ var ts;
|
|
|
77263
77392
|
function trySubstituteNamespaceExportedName(node) {
|
|
77264
77393
|
if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
|
|
77265
77394
|
var container = resolver.getReferencedExportContainer(node, false);
|
|
77266
|
-
if (container && container.kind !==
|
|
77395
|
+
if (container && container.kind !== 304) {
|
|
77267
77396
|
var substitute = (applicableSubstitutions & 2 && container.kind === 260) ||
|
|
77268
77397
|
(applicableSubstitutions & 8 && container.kind === 259);
|
|
77269
77398
|
if (substitute) {
|
|
@@ -77279,6 +77408,9 @@ var ts;
|
|
|
77279
77408
|
function substituteElementAccessExpression(node) {
|
|
77280
77409
|
return substituteConstantValue(node);
|
|
77281
77410
|
}
|
|
77411
|
+
function safeMultiLineComment(value) {
|
|
77412
|
+
return value.replace(/\*\//g, "*_/");
|
|
77413
|
+
}
|
|
77282
77414
|
function substituteConstantValue(node) {
|
|
77283
77415
|
var constantValue = tryGetConstEnumValue(node);
|
|
77284
77416
|
if (constantValue !== undefined) {
|
|
@@ -77288,7 +77420,7 @@ var ts;
|
|
|
77288
77420
|
var originalNode = ts.getOriginalNode(node, ts.isAccessExpression);
|
|
77289
77421
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
77290
77422
|
? ts.declarationNameToString(originalNode.name)
|
|
77291
|
-
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
77423
|
+
: safeMultiLineComment(ts.getTextOfNode(originalNode.argumentExpression));
|
|
77292
77424
|
ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
|
|
77293
77425
|
}
|
|
77294
77426
|
return substitute;
|
|
@@ -79239,7 +79371,7 @@ var ts;
|
|
|
79239
79371
|
return visitObjectLiteralExpression(node);
|
|
79240
79372
|
case 220:
|
|
79241
79373
|
return visitBinaryExpression(node, expressionResultIsUnused);
|
|
79242
|
-
case
|
|
79374
|
+
case 350:
|
|
79243
79375
|
return visitCommaListExpression(node, expressionResultIsUnused);
|
|
79244
79376
|
case 291:
|
|
79245
79377
|
return visitCatchClause(node);
|
|
@@ -79335,7 +79467,7 @@ var ts;
|
|
|
79335
79467
|
var objects = [];
|
|
79336
79468
|
for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
|
|
79337
79469
|
var e = elements_4[_i];
|
|
79338
|
-
if (e.kind ===
|
|
79470
|
+
if (e.kind === 297) {
|
|
79339
79471
|
if (chunkObject) {
|
|
79340
79472
|
objects.push(factory.createObjectLiteralExpression(chunkObject));
|
|
79341
79473
|
chunkObject = undefined;
|
|
@@ -79344,7 +79476,7 @@ var ts;
|
|
|
79344
79476
|
objects.push(ts.visitNode(target, visitor, ts.isExpression));
|
|
79345
79477
|
}
|
|
79346
79478
|
else {
|
|
79347
|
-
chunkObject = ts.append(chunkObject, e.kind ===
|
|
79479
|
+
chunkObject = ts.append(chunkObject, e.kind === 295
|
|
79348
79480
|
? factory.createPropertyAssignment(e.name, ts.visitNode(e.initializer, visitor, ts.isExpression))
|
|
79349
79481
|
: ts.visitNode(e, visitor, ts.isObjectLiteralElementLike));
|
|
79350
79482
|
}
|
|
@@ -80989,7 +81121,7 @@ var ts;
|
|
|
80989
81121
|
return visitObjectLiteralExpression(node);
|
|
80990
81122
|
case 291:
|
|
80991
81123
|
return visitCatchClause(node);
|
|
80992
|
-
case
|
|
81124
|
+
case 296:
|
|
80993
81125
|
return visitShorthandPropertyAssignment(node);
|
|
80994
81126
|
case 161:
|
|
80995
81127
|
return visitComputedPropertyName(node);
|
|
@@ -81003,7 +81135,7 @@ var ts;
|
|
|
81003
81135
|
return visitParenthesizedExpression(node, expressionResultIsUnused);
|
|
81004
81136
|
case 220:
|
|
81005
81137
|
return visitBinaryExpression(node, expressionResultIsUnused);
|
|
81006
|
-
case
|
|
81138
|
+
case 350:
|
|
81007
81139
|
return visitCommaListExpression(node, expressionResultIsUnused);
|
|
81008
81140
|
case 14:
|
|
81009
81141
|
case 15:
|
|
@@ -81842,8 +81974,8 @@ var ts;
|
|
|
81842
81974
|
}
|
|
81843
81975
|
function getRangeUnion(declarations) {
|
|
81844
81976
|
var pos = -1, end = -1;
|
|
81845
|
-
for (var _i = 0,
|
|
81846
|
-
var node =
|
|
81977
|
+
for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
|
|
81978
|
+
var node = declarations_10[_i];
|
|
81847
81979
|
pos = pos === -1 ? node.pos : node.pos === -1 ? pos : Math.min(pos, node.pos);
|
|
81848
81980
|
end = Math.max(end, node.end);
|
|
81849
81981
|
}
|
|
@@ -82456,10 +82588,10 @@ var ts;
|
|
|
82456
82588
|
case 168:
|
|
82457
82589
|
expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
|
|
82458
82590
|
break;
|
|
82459
|
-
case
|
|
82591
|
+
case 295:
|
|
82460
82592
|
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
|
|
82461
82593
|
break;
|
|
82462
|
-
case
|
|
82594
|
+
case 296:
|
|
82463
82595
|
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
|
|
82464
82596
|
break;
|
|
82465
82597
|
default:
|
|
@@ -82890,7 +83022,7 @@ var ts;
|
|
|
82890
83022
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
82891
83023
|
context.onSubstituteNode = onSubstituteNode;
|
|
82892
83024
|
context.enableSubstitution(205);
|
|
82893
|
-
context.enableSubstitution(
|
|
83025
|
+
context.enableSubstitution(295);
|
|
82894
83026
|
return ts.chainBundle(context, transformSourceFile);
|
|
82895
83027
|
function transformSourceFile(node) {
|
|
82896
83028
|
return node;
|
|
@@ -83068,7 +83200,7 @@ var ts;
|
|
|
83068
83200
|
switch (node.kind) {
|
|
83069
83201
|
case 220:
|
|
83070
83202
|
return visitBinaryExpression(node);
|
|
83071
|
-
case
|
|
83203
|
+
case 350:
|
|
83072
83204
|
return visitCommaListExpression(node);
|
|
83073
83205
|
case 221:
|
|
83074
83206
|
return visitConditionalExpression(node);
|
|
@@ -84585,8 +84717,8 @@ var ts;
|
|
|
84585
84717
|
context.enableSubstitution(209);
|
|
84586
84718
|
context.enableSubstitution(79);
|
|
84587
84719
|
context.enableSubstitution(220);
|
|
84588
|
-
context.enableSubstitution(
|
|
84589
|
-
context.enableEmitNotification(
|
|
84720
|
+
context.enableSubstitution(296);
|
|
84721
|
+
context.enableEmitNotification(304);
|
|
84590
84722
|
var moduleInfoMap = [];
|
|
84591
84723
|
var deferredExports = [];
|
|
84592
84724
|
var currentSourceFile;
|
|
@@ -84794,9 +84926,9 @@ var ts;
|
|
|
84794
84926
|
return visitFunctionDeclaration(node);
|
|
84795
84927
|
case 256:
|
|
84796
84928
|
return visitClassDeclaration(node);
|
|
84797
|
-
case 350:
|
|
84798
|
-
return visitMergeDeclarationMarker(node);
|
|
84799
84929
|
case 351:
|
|
84930
|
+
return visitMergeDeclarationMarker(node);
|
|
84931
|
+
case 352:
|
|
84800
84932
|
return visitEndOfDeclarationMarker(node);
|
|
84801
84933
|
default:
|
|
84802
84934
|
return visitor(node);
|
|
@@ -84813,7 +84945,7 @@ var ts;
|
|
|
84813
84945
|
return visitExpressionStatement(node);
|
|
84814
84946
|
case 211:
|
|
84815
84947
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
84816
|
-
case
|
|
84948
|
+
case 349:
|
|
84817
84949
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
84818
84950
|
case 207:
|
|
84819
84951
|
if (ts.isImportCall(node) && currentSourceFile.impliedNodeFormat === undefined) {
|
|
@@ -84842,17 +84974,17 @@ var ts;
|
|
|
84842
84974
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
84843
84975
|
var elem = _a[_i];
|
|
84844
84976
|
switch (elem.kind) {
|
|
84845
|
-
case
|
|
84977
|
+
case 295:
|
|
84846
84978
|
if (destructuringNeedsFlattening(elem.initializer)) {
|
|
84847
84979
|
return true;
|
|
84848
84980
|
}
|
|
84849
84981
|
break;
|
|
84850
|
-
case
|
|
84982
|
+
case 296:
|
|
84851
84983
|
if (destructuringNeedsFlattening(elem.name)) {
|
|
84852
84984
|
return true;
|
|
84853
84985
|
}
|
|
84854
84986
|
break;
|
|
84855
|
-
case
|
|
84987
|
+
case 297:
|
|
84856
84988
|
if (destructuringNeedsFlattening(elem.expression)) {
|
|
84857
84989
|
return true;
|
|
84858
84990
|
}
|
|
@@ -85412,7 +85544,7 @@ var ts;
|
|
|
85412
85544
|
return node;
|
|
85413
85545
|
}
|
|
85414
85546
|
function onEmitNode(hint, node, emitCallback) {
|
|
85415
|
-
if (node.kind ===
|
|
85547
|
+
if (node.kind === 304) {
|
|
85416
85548
|
currentSourceFile = node;
|
|
85417
85549
|
currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
|
|
85418
85550
|
previousOnEmitNode(hint, node, emitCallback);
|
|
@@ -85492,7 +85624,7 @@ var ts;
|
|
|
85492
85624
|
}
|
|
85493
85625
|
else if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64)) && !ts.isLocalName(node)) {
|
|
85494
85626
|
var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
|
|
85495
|
-
if (exportContainer && exportContainer.kind ===
|
|
85627
|
+
if (exportContainer && exportContainer.kind === 304) {
|
|
85496
85628
|
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)), node);
|
|
85497
85629
|
}
|
|
85498
85630
|
var importDeclaration = resolver.getReferencedImportDeclaration(node);
|
|
@@ -85557,10 +85689,10 @@ var ts;
|
|
|
85557
85689
|
context.onSubstituteNode = onSubstituteNode;
|
|
85558
85690
|
context.onEmitNode = onEmitNode;
|
|
85559
85691
|
context.enableSubstitution(79);
|
|
85560
|
-
context.enableSubstitution(
|
|
85692
|
+
context.enableSubstitution(296);
|
|
85561
85693
|
context.enableSubstitution(220);
|
|
85562
85694
|
context.enableSubstitution(230);
|
|
85563
|
-
context.enableEmitNotification(
|
|
85695
|
+
context.enableEmitNotification(304);
|
|
85564
85696
|
var moduleInfoMap = [];
|
|
85565
85697
|
var deferredExports = [];
|
|
85566
85698
|
var exportFunctionsMap = [];
|
|
@@ -85897,7 +86029,7 @@ var ts;
|
|
|
85897
86029
|
}
|
|
85898
86030
|
function shouldHoistVariableDeclarationList(node) {
|
|
85899
86031
|
return (ts.getEmitFlags(node) & 2097152) === 0
|
|
85900
|
-
&& (enclosingBlockScopedContainer.kind ===
|
|
86032
|
+
&& (enclosingBlockScopedContainer.kind === 304
|
|
85901
86033
|
|| (ts.getOriginalNode(node).flags & 3) === 0);
|
|
85902
86034
|
}
|
|
85903
86035
|
function transformInitializedVariable(node, isExportedDeclaration) {
|
|
@@ -86095,9 +86227,9 @@ var ts;
|
|
|
86095
86227
|
return visitCatchClause(node);
|
|
86096
86228
|
case 234:
|
|
86097
86229
|
return visitBlock(node);
|
|
86098
|
-
case 350:
|
|
86099
|
-
return visitMergeDeclarationMarker(node);
|
|
86100
86230
|
case 351:
|
|
86231
|
+
return visitMergeDeclarationMarker(node);
|
|
86232
|
+
case 352:
|
|
86101
86233
|
return visitEndOfDeclarationMarker(node);
|
|
86102
86234
|
default:
|
|
86103
86235
|
return visitor(node);
|
|
@@ -86200,7 +86332,7 @@ var ts;
|
|
|
86200
86332
|
return visitExpressionStatement(node);
|
|
86201
86333
|
case 211:
|
|
86202
86334
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
86203
|
-
case
|
|
86335
|
+
case 349:
|
|
86204
86336
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
86205
86337
|
case 220:
|
|
86206
86338
|
if (ts.isDestructuringAssignment(node)) {
|
|
@@ -86266,7 +86398,7 @@ var ts;
|
|
|
86266
86398
|
}
|
|
86267
86399
|
else if (ts.isIdentifier(node)) {
|
|
86268
86400
|
var container = resolver.getReferencedExportContainer(node);
|
|
86269
|
-
return container !== undefined && container.kind ===
|
|
86401
|
+
return container !== undefined && container.kind === 304;
|
|
86270
86402
|
}
|
|
86271
86403
|
else {
|
|
86272
86404
|
return false;
|
|
@@ -86317,7 +86449,7 @@ var ts;
|
|
|
86317
86449
|
return node;
|
|
86318
86450
|
}
|
|
86319
86451
|
function onEmitNode(hint, node, emitCallback) {
|
|
86320
|
-
if (node.kind ===
|
|
86452
|
+
if (node.kind === 304) {
|
|
86321
86453
|
var id = ts.getOriginalNodeId(node);
|
|
86322
86454
|
currentSourceFile = node;
|
|
86323
86455
|
moduleInfo = moduleInfoMap[id];
|
|
@@ -86353,7 +86485,7 @@ var ts;
|
|
|
86353
86485
|
}
|
|
86354
86486
|
function substituteUnspecified(node) {
|
|
86355
86487
|
switch (node.kind) {
|
|
86356
|
-
case
|
|
86488
|
+
case 296:
|
|
86357
86489
|
return substituteShorthandPropertyAssignment(node);
|
|
86358
86490
|
}
|
|
86359
86491
|
return node;
|
|
@@ -86438,7 +86570,7 @@ var ts;
|
|
|
86438
86570
|
|| resolver.getReferencedValueDeclaration(name);
|
|
86439
86571
|
if (valueDeclaration) {
|
|
86440
86572
|
var exportContainer = resolver.getReferencedExportContainer(name, false);
|
|
86441
|
-
if (exportContainer && exportContainer.kind ===
|
|
86573
|
+
if (exportContainer && exportContainer.kind === 304) {
|
|
86442
86574
|
exportedNames = ts.append(exportedNames, factory.getDeclarationName(valueDeclaration));
|
|
86443
86575
|
}
|
|
86444
86576
|
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
|
|
@@ -86470,7 +86602,7 @@ var ts;
|
|
|
86470
86602
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
86471
86603
|
context.onEmitNode = onEmitNode;
|
|
86472
86604
|
context.onSubstituteNode = onSubstituteNode;
|
|
86473
|
-
context.enableEmitNotification(
|
|
86605
|
+
context.enableEmitNotification(304);
|
|
86474
86606
|
context.enableSubstitution(79);
|
|
86475
86607
|
var helperNameSubstitutions;
|
|
86476
86608
|
var currentSourceFile;
|
|
@@ -86621,8 +86753,8 @@ var ts;
|
|
|
86621
86753
|
var cjsOnEmitNode = context.onEmitNode;
|
|
86622
86754
|
context.onSubstituteNode = onSubstituteNode;
|
|
86623
86755
|
context.onEmitNode = onEmitNode;
|
|
86624
|
-
context.enableSubstitution(
|
|
86625
|
-
context.enableEmitNotification(
|
|
86756
|
+
context.enableSubstitution(304);
|
|
86757
|
+
context.enableEmitNotification(304);
|
|
86626
86758
|
var currentSourceFile;
|
|
86627
86759
|
return transformSourceFileOrBundle;
|
|
86628
86760
|
function onSubstituteNode(hint, node) {
|
|
@@ -86666,7 +86798,7 @@ var ts;
|
|
|
86666
86798
|
return result;
|
|
86667
86799
|
}
|
|
86668
86800
|
function transformSourceFileOrBundle(node) {
|
|
86669
|
-
return node.kind ===
|
|
86801
|
+
return node.kind === 304 ? transformSourceFile(node) : transformBundle(node);
|
|
86670
86802
|
}
|
|
86671
86803
|
function transformBundle(node) {
|
|
86672
86804
|
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
@@ -87280,10 +87412,10 @@ var ts;
|
|
|
87280
87412
|
return result;
|
|
87281
87413
|
}
|
|
87282
87414
|
function transformRoot(node) {
|
|
87283
|
-
if (node.kind ===
|
|
87415
|
+
if (node.kind === 304 && node.isDeclarationFile) {
|
|
87284
87416
|
return node;
|
|
87285
87417
|
}
|
|
87286
|
-
if (node.kind ===
|
|
87418
|
+
if (node.kind === 305) {
|
|
87287
87419
|
isBundledEmit = true;
|
|
87288
87420
|
refs = new ts.Map();
|
|
87289
87421
|
libs = new ts.Map();
|
|
@@ -87313,7 +87445,7 @@ var ts;
|
|
|
87313
87445
|
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
87314
87446
|
return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), true, [], [], false, []);
|
|
87315
87447
|
}), ts.mapDefined(node.prepends, function (prepend) {
|
|
87316
|
-
if (prepend.kind ===
|
|
87448
|
+
if (prepend.kind === 307) {
|
|
87317
87449
|
var sourceFile = ts.createUnparsedSourceFile(prepend, "dts", stripInternal);
|
|
87318
87450
|
hasNoDefaultLib_1 = hasNoDefaultLib_1 || !!sourceFile.hasNoDefaultLib;
|
|
87319
87451
|
collectReferences(sourceFile, refs);
|
|
@@ -87661,22 +87793,22 @@ var ts;
|
|
|
87661
87793
|
}
|
|
87662
87794
|
function transformImportDeclaration(decl) {
|
|
87663
87795
|
if (!decl.importClause) {
|
|
87664
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87796
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87665
87797
|
}
|
|
87666
87798
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
87667
87799
|
if (!decl.importClause.namedBindings) {
|
|
87668
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87800
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87669
87801
|
}
|
|
87670
87802
|
if (decl.importClause.namedBindings.kind === 267) {
|
|
87671
87803
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
87672
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined) : undefined;
|
|
87804
|
+
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined) : undefined;
|
|
87673
87805
|
}
|
|
87674
87806
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
87675
87807
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
87676
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87808
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87677
87809
|
}
|
|
87678
87810
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
87679
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87811
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87680
87812
|
}
|
|
87681
87813
|
}
|
|
87682
87814
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
@@ -87846,7 +87978,7 @@ var ts;
|
|
|
87846
87978
|
case 199: {
|
|
87847
87979
|
if (!ts.isLiteralImportTypeNode(input))
|
|
87848
87980
|
return cleanup(input);
|
|
87849
|
-
return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
|
|
87981
|
+
return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.assertions, input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
|
|
87850
87982
|
}
|
|
87851
87983
|
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
|
|
87852
87984
|
}
|
|
@@ -87889,7 +88021,7 @@ var ts;
|
|
|
87889
88021
|
resultHasExternalModuleIndicator = true;
|
|
87890
88022
|
}
|
|
87891
88023
|
resultHasScopeMarker = true;
|
|
87892
|
-
return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), undefined);
|
|
88024
|
+
return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), ts.getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined);
|
|
87893
88025
|
}
|
|
87894
88026
|
case 270: {
|
|
87895
88027
|
if (ts.isSourceFile(input.parent)) {
|
|
@@ -88210,7 +88342,7 @@ var ts;
|
|
|
88210
88342
|
function ensureModifierFlags(node) {
|
|
88211
88343
|
var mask = 27647 ^ (4 | 256 | 16384);
|
|
88212
88344
|
var additions = (needsDeclare && !isAlwaysType(node)) ? 2 : 0;
|
|
88213
|
-
var parentIsFile = node.parent.kind ===
|
|
88345
|
+
var parentIsFile = node.parent.kind === 304;
|
|
88214
88346
|
if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
|
|
88215
88347
|
mask ^= 2;
|
|
88216
88348
|
additions = 0;
|
|
@@ -88421,7 +88553,7 @@ var ts;
|
|
|
88421
88553
|
}
|
|
88422
88554
|
ts.noEmitNotification = noEmitNotification;
|
|
88423
88555
|
function transformNodes(resolver, host, factory, options, nodes, transformers, allowDtsFiles) {
|
|
88424
|
-
var enabledSyntaxKindFeatures = new Array(
|
|
88556
|
+
var enabledSyntaxKindFeatures = new Array(354);
|
|
88425
88557
|
var lexicalEnvironmentVariableDeclarations;
|
|
88426
88558
|
var lexicalEnvironmentFunctionDeclarations;
|
|
88427
88559
|
var lexicalEnvironmentStatements;
|
|
@@ -88497,7 +88629,7 @@ var ts;
|
|
|
88497
88629
|
var transformed = [];
|
|
88498
88630
|
for (var _a = 0, nodes_3 = nodes; _a < nodes_3.length; _a++) {
|
|
88499
88631
|
var node = nodes_3[_a];
|
|
88500
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "transformNodes", node.kind ===
|
|
88632
|
+
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "transformNodes", node.kind === 304 ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end });
|
|
88501
88633
|
transformed.push((allowDtsFiles ? transformation : transformRoot)(node));
|
|
88502
88634
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
88503
88635
|
}
|
|
@@ -88825,7 +88957,7 @@ var ts;
|
|
|
88825
88957
|
ts.getOutputPathsForBundle = getOutputPathsForBundle;
|
|
88826
88958
|
function getOutputPathsFor(sourceFile, host, forceDtsPaths) {
|
|
88827
88959
|
var options = host.getCompilerOptions();
|
|
88828
|
-
if (sourceFile.kind ===
|
|
88960
|
+
if (sourceFile.kind === 305) {
|
|
88829
88961
|
return getOutputPathsForBundle(options, forceDtsPaths);
|
|
88830
88962
|
}
|
|
88831
88963
|
else {
|
|
@@ -89146,7 +89278,7 @@ var ts;
|
|
|
89146
89278
|
mapRoot: compilerOptions.mapRoot,
|
|
89147
89279
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
89148
89280
|
});
|
|
89149
|
-
if (forceDtsEmit && declarationTransform.transformed[0].kind ===
|
|
89281
|
+
if (forceDtsEmit && declarationTransform.transformed[0].kind === 304) {
|
|
89150
89282
|
var sourceFile = declarationTransform.transformed[0];
|
|
89151
89283
|
exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
|
|
89152
89284
|
}
|
|
@@ -89169,8 +89301,8 @@ var ts;
|
|
|
89169
89301
|
ts.forEachChild(node, collectLinkedAliases);
|
|
89170
89302
|
}
|
|
89171
89303
|
function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle, printer, mapOptions) {
|
|
89172
|
-
var bundle = sourceFileOrBundle.kind ===
|
|
89173
|
-
var sourceFile = sourceFileOrBundle.kind ===
|
|
89304
|
+
var bundle = sourceFileOrBundle.kind === 305 ? sourceFileOrBundle : undefined;
|
|
89305
|
+
var sourceFile = sourceFileOrBundle.kind === 304 ? sourceFileOrBundle : undefined;
|
|
89174
89306
|
var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
|
|
89175
89307
|
var sourceMapGenerator;
|
|
89176
89308
|
if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) {
|
|
@@ -89208,7 +89340,7 @@ var ts;
|
|
|
89208
89340
|
}
|
|
89209
89341
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
89210
89342
|
return (mapOptions.sourceMap || mapOptions.inlineSourceMap)
|
|
89211
|
-
&& (sourceFileOrBundle.kind !==
|
|
89343
|
+
&& (sourceFileOrBundle.kind !== 304 || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json"));
|
|
89212
89344
|
}
|
|
89213
89345
|
function getSourceRoot(mapOptions) {
|
|
89214
89346
|
var sourceRoot = ts.normalizeSlashes(mapOptions.sourceRoot || "");
|
|
@@ -89484,9 +89616,9 @@ var ts;
|
|
|
89484
89616
|
break;
|
|
89485
89617
|
}
|
|
89486
89618
|
switch (node.kind) {
|
|
89487
|
-
case
|
|
89488
|
-
case
|
|
89489
|
-
case
|
|
89619
|
+
case 304: return printFile(node);
|
|
89620
|
+
case 305: return printBundle(node);
|
|
89621
|
+
case 306: return printUnparsedSource(node);
|
|
89490
89622
|
}
|
|
89491
89623
|
writeNode(hint, node, sourceFile, beginPrint());
|
|
89492
89624
|
return endPrint();
|
|
@@ -90011,91 +90143,91 @@ var ts;
|
|
|
90011
90143
|
return emitHeritageClause(node);
|
|
90012
90144
|
case 291:
|
|
90013
90145
|
return emitCatchClause(node);
|
|
90014
|
-
case 294:
|
|
90015
|
-
return emitPropertyAssignment(node);
|
|
90016
90146
|
case 295:
|
|
90017
|
-
return
|
|
90147
|
+
return emitPropertyAssignment(node);
|
|
90018
90148
|
case 296:
|
|
90019
|
-
return
|
|
90149
|
+
return emitShorthandPropertyAssignment(node);
|
|
90020
90150
|
case 297:
|
|
90021
|
-
return
|
|
90151
|
+
return emitSpreadAssignment(node);
|
|
90022
90152
|
case 298:
|
|
90023
|
-
return
|
|
90024
|
-
case 305:
|
|
90153
|
+
return emitEnumMember(node);
|
|
90025
90154
|
case 299:
|
|
90026
|
-
return
|
|
90155
|
+
return writeUnparsedNode(node);
|
|
90156
|
+
case 306:
|
|
90027
90157
|
case 300:
|
|
90158
|
+
return emitUnparsedSourceOrPrepend(node);
|
|
90028
90159
|
case 301:
|
|
90029
|
-
return emitUnparsedTextLike(node);
|
|
90030
90160
|
case 302:
|
|
90031
|
-
return
|
|
90161
|
+
return emitUnparsedTextLike(node);
|
|
90032
90162
|
case 303:
|
|
90033
|
-
return
|
|
90163
|
+
return emitUnparsedSyntheticReference(node);
|
|
90034
90164
|
case 304:
|
|
90165
|
+
return emitSourceFile(node);
|
|
90166
|
+
case 305:
|
|
90035
90167
|
return ts.Debug.fail("Bundles should be printed using printBundle");
|
|
90036
|
-
case 306:
|
|
90037
|
-
return ts.Debug.fail("InputFiles should not be printed");
|
|
90038
90168
|
case 307:
|
|
90039
|
-
return
|
|
90169
|
+
return ts.Debug.fail("InputFiles should not be printed");
|
|
90040
90170
|
case 308:
|
|
90171
|
+
return emitJSDocTypeExpression(node);
|
|
90172
|
+
case 309:
|
|
90041
90173
|
return emitJSDocNameReference(node);
|
|
90042
|
-
case 310:
|
|
90043
|
-
return writePunctuation("*");
|
|
90044
90174
|
case 311:
|
|
90045
|
-
return writePunctuation("
|
|
90175
|
+
return writePunctuation("*");
|
|
90046
90176
|
case 312:
|
|
90047
|
-
return
|
|
90177
|
+
return writePunctuation("?");
|
|
90048
90178
|
case 313:
|
|
90049
|
-
return
|
|
90179
|
+
return emitJSDocNullableType(node);
|
|
90050
90180
|
case 314:
|
|
90051
|
-
return
|
|
90181
|
+
return emitJSDocNonNullableType(node);
|
|
90052
90182
|
case 315:
|
|
90183
|
+
return emitJSDocOptionalType(node);
|
|
90184
|
+
case 316:
|
|
90053
90185
|
return emitJSDocFunctionType(node);
|
|
90054
90186
|
case 185:
|
|
90055
|
-
case 316:
|
|
90056
|
-
return emitRestOrJSDocVariadicType(node);
|
|
90057
90187
|
case 317:
|
|
90058
|
-
return;
|
|
90188
|
+
return emitRestOrJSDocVariadicType(node);
|
|
90059
90189
|
case 318:
|
|
90190
|
+
return;
|
|
90191
|
+
case 319:
|
|
90060
90192
|
return emitJSDoc(node);
|
|
90061
|
-
case 320:
|
|
90062
|
-
return emitJSDocTypeLiteral(node);
|
|
90063
90193
|
case 321:
|
|
90194
|
+
return emitJSDocTypeLiteral(node);
|
|
90195
|
+
case 322:
|
|
90064
90196
|
return emitJSDocSignature(node);
|
|
90065
|
-
case 325:
|
|
90066
|
-
case 330:
|
|
90067
|
-
case 335:
|
|
90068
|
-
return emitJSDocSimpleTag(node);
|
|
90069
90197
|
case 326:
|
|
90198
|
+
case 331:
|
|
90199
|
+
case 336:
|
|
90200
|
+
return emitJSDocSimpleTag(node);
|
|
90070
90201
|
case 327:
|
|
90071
|
-
return emitJSDocHeritageTag(node);
|
|
90072
90202
|
case 328:
|
|
90203
|
+
return emitJSDocHeritageTag(node);
|
|
90073
90204
|
case 329:
|
|
90205
|
+
case 330:
|
|
90074
90206
|
return;
|
|
90075
|
-
case 331:
|
|
90076
90207
|
case 332:
|
|
90077
90208
|
case 333:
|
|
90078
90209
|
case 334:
|
|
90210
|
+
case 335:
|
|
90079
90211
|
return;
|
|
90080
|
-
case 336:
|
|
90081
|
-
return emitJSDocCallbackTag(node);
|
|
90082
|
-
case 338:
|
|
90083
|
-
case 345:
|
|
90084
|
-
return emitJSDocPropertyLikeTag(node);
|
|
90085
90212
|
case 337:
|
|
90213
|
+
return emitJSDocCallbackTag(node);
|
|
90086
90214
|
case 339:
|
|
90215
|
+
case 346:
|
|
90216
|
+
return emitJSDocPropertyLikeTag(node);
|
|
90217
|
+
case 338:
|
|
90087
90218
|
case 340:
|
|
90088
90219
|
case 341:
|
|
90089
|
-
return emitJSDocSimpleTypedTag(node);
|
|
90090
90220
|
case 342:
|
|
90091
|
-
return
|
|
90221
|
+
return emitJSDocSimpleTypedTag(node);
|
|
90092
90222
|
case 343:
|
|
90093
|
-
return
|
|
90223
|
+
return emitJSDocTemplateTag(node);
|
|
90094
90224
|
case 344:
|
|
90225
|
+
return emitJSDocTypedefTag(node);
|
|
90226
|
+
case 345:
|
|
90095
90227
|
return emitJSDocSeeTag(node);
|
|
90096
|
-
case
|
|
90228
|
+
case 348:
|
|
90229
|
+
case 352:
|
|
90097
90230
|
case 351:
|
|
90098
|
-
case 350:
|
|
90099
90231
|
return;
|
|
90100
90232
|
}
|
|
90101
90233
|
if (ts.isExpression(node)) {
|
|
@@ -90188,18 +90320,18 @@ var ts;
|
|
|
90188
90320
|
return emitJsxSelfClosingElement(node);
|
|
90189
90321
|
case 281:
|
|
90190
90322
|
return emitJsxFragment(node);
|
|
90191
|
-
case 346:
|
|
90192
|
-
return ts.Debug.fail("SyntaxList should not be printed");
|
|
90193
90323
|
case 347:
|
|
90194
|
-
return;
|
|
90324
|
+
return ts.Debug.fail("SyntaxList should not be printed");
|
|
90195
90325
|
case 348:
|
|
90196
|
-
return
|
|
90326
|
+
return;
|
|
90197
90327
|
case 349:
|
|
90198
|
-
return
|
|
90328
|
+
return emitPartiallyEmittedExpression(node);
|
|
90199
90329
|
case 350:
|
|
90330
|
+
return emitCommaList(node);
|
|
90200
90331
|
case 351:
|
|
90201
|
-
return;
|
|
90202
90332
|
case 352:
|
|
90333
|
+
return;
|
|
90334
|
+
case 353:
|
|
90203
90335
|
return ts.Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
90204
90336
|
}
|
|
90205
90337
|
}
|
|
@@ -90247,7 +90379,7 @@ var ts;
|
|
|
90247
90379
|
}
|
|
90248
90380
|
function emitHelpers(node) {
|
|
90249
90381
|
var helpersEmitted = false;
|
|
90250
|
-
var bundle = node.kind ===
|
|
90382
|
+
var bundle = node.kind === 305 ? node : undefined;
|
|
90251
90383
|
if (bundle && moduleKind === ts.ModuleKind.None) {
|
|
90252
90384
|
return;
|
|
90253
90385
|
}
|
|
@@ -90321,7 +90453,7 @@ var ts;
|
|
|
90321
90453
|
var pos = getTextPosWithWriteLine();
|
|
90322
90454
|
writeUnparsedNode(unparsed);
|
|
90323
90455
|
if (bundleFileInfo) {
|
|
90324
|
-
updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind ===
|
|
90456
|
+
updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 301 ?
|
|
90325
90457
|
"text" :
|
|
90326
90458
|
"internal");
|
|
90327
90459
|
}
|
|
@@ -90404,7 +90536,7 @@ var ts;
|
|
|
90404
90536
|
emit(node.dotDotDotToken);
|
|
90405
90537
|
emitNodeWithWriter(node.name, writeParameter);
|
|
90406
90538
|
emit(node.questionToken);
|
|
90407
|
-
if (node.parent && node.parent.kind ===
|
|
90539
|
+
if (node.parent && node.parent.kind === 316 && !node.name) {
|
|
90408
90540
|
emit(node.type);
|
|
90409
90541
|
}
|
|
90410
90542
|
else {
|
|
@@ -90711,6 +90843,19 @@ var ts;
|
|
|
90711
90843
|
writeKeyword("import");
|
|
90712
90844
|
writePunctuation("(");
|
|
90713
90845
|
emit(node.argument);
|
|
90846
|
+
if (node.assertions) {
|
|
90847
|
+
writePunctuation(",");
|
|
90848
|
+
writeSpace();
|
|
90849
|
+
writePunctuation("{");
|
|
90850
|
+
writeSpace();
|
|
90851
|
+
writeKeyword("assert");
|
|
90852
|
+
writePunctuation(":");
|
|
90853
|
+
writeSpace();
|
|
90854
|
+
var elements = node.assertions.assertClause.elements;
|
|
90855
|
+
emitList(node.assertions.assertClause, elements, 526226);
|
|
90856
|
+
writeSpace();
|
|
90857
|
+
writePunctuation("}");
|
|
90858
|
+
}
|
|
90714
90859
|
writePunctuation(")");
|
|
90715
90860
|
if (node.qualifier) {
|
|
90716
90861
|
writePunctuation(".");
|
|
@@ -91848,7 +91993,7 @@ var ts;
|
|
|
91848
91993
|
}
|
|
91849
91994
|
}
|
|
91850
91995
|
if (node.tags) {
|
|
91851
|
-
if (node.tags.length === 1 && node.tags[0].kind ===
|
|
91996
|
+
if (node.tags.length === 1 && node.tags[0].kind === 342 && !node.comment) {
|
|
91852
91997
|
writeSpace();
|
|
91853
91998
|
emit(node.tags[0]);
|
|
91854
91999
|
}
|
|
@@ -91893,7 +92038,7 @@ var ts;
|
|
|
91893
92038
|
function emitJSDocTypedefTag(tag) {
|
|
91894
92039
|
emitJSDocTagName(tag.tagName);
|
|
91895
92040
|
if (tag.typeExpression) {
|
|
91896
|
-
if (tag.typeExpression.kind ===
|
|
92041
|
+
if (tag.typeExpression.kind === 308) {
|
|
91897
92042
|
emitJSDocTypeExpression(tag.typeExpression);
|
|
91898
92043
|
}
|
|
91899
92044
|
else {
|
|
@@ -91912,7 +92057,7 @@ var ts;
|
|
|
91912
92057
|
emit(tag.fullName);
|
|
91913
92058
|
}
|
|
91914
92059
|
emitJSDocComment(tag.comment);
|
|
91915
|
-
if (tag.typeExpression && tag.typeExpression.kind ===
|
|
92060
|
+
if (tag.typeExpression && tag.typeExpression.kind === 321) {
|
|
91916
92061
|
emitJSDocTypeLiteral(tag.typeExpression);
|
|
91917
92062
|
}
|
|
91918
92063
|
}
|
|
@@ -92880,8 +93025,8 @@ var ts;
|
|
|
92880
93025
|
if (!node)
|
|
92881
93026
|
return;
|
|
92882
93027
|
switch (node.kind) {
|
|
92883
|
-
case 294:
|
|
92884
93028
|
case 295:
|
|
93029
|
+
case 296:
|
|
92885
93030
|
case 166:
|
|
92886
93031
|
case 168:
|
|
92887
93032
|
case 171:
|
|
@@ -93103,7 +93248,7 @@ var ts;
|
|
|
93103
93248
|
var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 11;
|
|
93104
93249
|
if ((pos > 0 || end > 0) && pos !== end) {
|
|
93105
93250
|
if (!skipLeadingComments) {
|
|
93106
|
-
emitLeadingComments(pos, node.kind !==
|
|
93251
|
+
emitLeadingComments(pos, node.kind !== 348);
|
|
93107
93252
|
}
|
|
93108
93253
|
if (!skipLeadingComments || (pos >= 0 && (emitFlags & 512) !== 0)) {
|
|
93109
93254
|
containerPos = pos;
|
|
@@ -93126,7 +93271,7 @@ var ts;
|
|
|
93126
93271
|
containerPos = savedContainerPos;
|
|
93127
93272
|
containerEnd = savedContainerEnd;
|
|
93128
93273
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
93129
|
-
if (!skipTrailingComments && node.kind !==
|
|
93274
|
+
if (!skipTrailingComments && node.kind !== 348) {
|
|
93130
93275
|
emitTrailingComments(end);
|
|
93131
93276
|
}
|
|
93132
93277
|
}
|
|
@@ -93377,7 +93522,7 @@ var ts;
|
|
|
93377
93522
|
}
|
|
93378
93523
|
else {
|
|
93379
93524
|
var source = sourceMapRange.source || sourceMapSource;
|
|
93380
|
-
if (node.kind !==
|
|
93525
|
+
if (node.kind !== 348
|
|
93381
93526
|
&& (emitFlags & 16) === 0
|
|
93382
93527
|
&& sourceMapRange.pos >= 0) {
|
|
93383
93528
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
@@ -93394,7 +93539,7 @@ var ts;
|
|
|
93394
93539
|
if (emitFlags & 64) {
|
|
93395
93540
|
sourceMapsDisabled = false;
|
|
93396
93541
|
}
|
|
93397
|
-
if (node.kind !==
|
|
93542
|
+
if (node.kind !== 348
|
|
93398
93543
|
&& (emitFlags & 32) === 0
|
|
93399
93544
|
&& sourceMapRange.end >= 0) {
|
|
93400
93545
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
@@ -94394,17 +94539,66 @@ var ts;
|
|
|
94394
94539
|
return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
|
|
94395
94540
|
}
|
|
94396
94541
|
ts.getModeForResolutionAtIndex = getModeForResolutionAtIndex;
|
|
94397
|
-
function
|
|
94542
|
+
function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
94398
94543
|
var _a;
|
|
94544
|
+
if (ts.isExportDeclaration(decl)) {
|
|
94545
|
+
return decl.isTypeOnly;
|
|
94546
|
+
}
|
|
94547
|
+
if ((_a = decl.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly) {
|
|
94548
|
+
return true;
|
|
94549
|
+
}
|
|
94550
|
+
return false;
|
|
94551
|
+
}
|
|
94552
|
+
ts.isExclusivelyTypeOnlyImportOrExport = isExclusivelyTypeOnlyImportOrExport;
|
|
94553
|
+
function getModeForUsageLocation(file, usage) {
|
|
94554
|
+
var _a, _b;
|
|
94399
94555
|
if (file.impliedNodeFormat === undefined)
|
|
94400
94556
|
return undefined;
|
|
94557
|
+
if ((ts.isImportDeclaration(usage.parent) || ts.isExportDeclaration(usage.parent))) {
|
|
94558
|
+
var isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
|
|
94559
|
+
if (isTypeOnly) {
|
|
94560
|
+
var override = getResolutionModeOverrideForClause(usage.parent.assertClause);
|
|
94561
|
+
if (override) {
|
|
94562
|
+
return override;
|
|
94563
|
+
}
|
|
94564
|
+
}
|
|
94565
|
+
}
|
|
94566
|
+
if (usage.parent.parent && ts.isImportTypeNode(usage.parent.parent)) {
|
|
94567
|
+
var override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) === null || _a === void 0 ? void 0 : _a.assertClause);
|
|
94568
|
+
if (override) {
|
|
94569
|
+
return override;
|
|
94570
|
+
}
|
|
94571
|
+
}
|
|
94401
94572
|
if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
94402
94573
|
return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
94403
94574
|
}
|
|
94404
|
-
var exprParentParent = (
|
|
94575
|
+
var exprParentParent = (_b = ts.walkUpParenthesizedExpressions(usage.parent)) === null || _b === void 0 ? void 0 : _b.parent;
|
|
94405
94576
|
return exprParentParent && ts.isImportEqualsDeclaration(exprParentParent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
94406
94577
|
}
|
|
94407
94578
|
ts.getModeForUsageLocation = getModeForUsageLocation;
|
|
94579
|
+
function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) {
|
|
94580
|
+
if (!clause)
|
|
94581
|
+
return undefined;
|
|
94582
|
+
if (ts.length(clause.elements) !== 1) {
|
|
94583
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(clause, ts.Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require);
|
|
94584
|
+
return undefined;
|
|
94585
|
+
}
|
|
94586
|
+
var elem = clause.elements[0];
|
|
94587
|
+
if (!ts.isStringLiteralLike(elem.name))
|
|
94588
|
+
return undefined;
|
|
94589
|
+
if (elem.name.text !== "resolution-mode") {
|
|
94590
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.name, ts.Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions);
|
|
94591
|
+
return undefined;
|
|
94592
|
+
}
|
|
94593
|
+
if (!ts.isStringLiteralLike(elem.value))
|
|
94594
|
+
return undefined;
|
|
94595
|
+
if (elem.value.text !== "import" && elem.value.text !== "require") {
|
|
94596
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.value, ts.Diagnostics.resolution_mode_should_be_either_require_or_import);
|
|
94597
|
+
return undefined;
|
|
94598
|
+
}
|
|
94599
|
+
return elem.value.text === "import" ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
94600
|
+
}
|
|
94601
|
+
ts.getResolutionModeOverrideForClause = getResolutionModeOverrideForClause;
|
|
94408
94602
|
function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
|
|
94409
94603
|
if (names.length === 0) {
|
|
94410
94604
|
return [];
|
|
@@ -99243,70 +99437,81 @@ var ts;
|
|
|
99243
99437
|
useCaseSensitiveFileNames: (_a = host.useCaseSensitiveFileNames) === null || _a === void 0 ? void 0 : _a.call(host),
|
|
99244
99438
|
};
|
|
99245
99439
|
}
|
|
99246
|
-
function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier) {
|
|
99247
|
-
|
|
99440
|
+
function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier, options) {
|
|
99441
|
+
if (options === void 0) { options = {}; }
|
|
99442
|
+
var res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {}, options);
|
|
99248
99443
|
if (res === oldImportSpecifier)
|
|
99249
99444
|
return undefined;
|
|
99250
99445
|
return res;
|
|
99251
99446
|
}
|
|
99252
99447
|
moduleSpecifiers_1.updateModuleSpecifier = updateModuleSpecifier;
|
|
99253
|
-
function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host) {
|
|
99254
|
-
|
|
99448
|
+
function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, options) {
|
|
99449
|
+
if (options === void 0) { options = {}; }
|
|
99450
|
+
return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferences(host, {}, compilerOptions, importingSourceFile), {}, options);
|
|
99255
99451
|
}
|
|
99256
99452
|
moduleSpecifiers_1.getModuleSpecifier = getModuleSpecifier;
|
|
99257
|
-
function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences) {
|
|
99453
|
+
function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options) {
|
|
99454
|
+
if (options === void 0) { options = {}; }
|
|
99258
99455
|
var info = getInfo(importingSourceFile.path, host);
|
|
99259
|
-
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences);
|
|
99260
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true); });
|
|
99456
|
+
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
99457
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
99261
99458
|
}
|
|
99262
99459
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
99263
|
-
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences) {
|
|
99460
|
+
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
99461
|
+
if (options === void 0) { options = {}; }
|
|
99264
99462
|
var info = getInfo(importingSourceFileName, host);
|
|
99265
|
-
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences);
|
|
99266
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions); }) ||
|
|
99463
|
+
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
99464
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
99267
99465
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
99268
99466
|
}
|
|
99269
|
-
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences) {
|
|
99270
|
-
|
|
99467
|
+
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
99468
|
+
if (options === void 0) { options = {}; }
|
|
99469
|
+
return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options)[0];
|
|
99271
99470
|
}
|
|
99272
99471
|
moduleSpecifiers_1.tryGetModuleSpecifiersFromCache = tryGetModuleSpecifiersFromCache;
|
|
99273
|
-
function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences) {
|
|
99472
|
+
function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
99274
99473
|
var _a;
|
|
99474
|
+
if (options === void 0) { options = {}; }
|
|
99275
99475
|
var moduleSourceFile = ts.getSourceFileOfModule(moduleSymbol);
|
|
99276
99476
|
if (!moduleSourceFile) {
|
|
99277
99477
|
return ts.emptyArray;
|
|
99278
99478
|
}
|
|
99279
99479
|
var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
99280
|
-
var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences);
|
|
99480
|
+
var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options);
|
|
99281
99481
|
return [cached === null || cached === void 0 ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached === null || cached === void 0 ? void 0 : cached.modulePaths, cache];
|
|
99282
99482
|
}
|
|
99283
|
-
function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99284
|
-
|
|
99483
|
+
function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99484
|
+
if (options === void 0) { options = {}; }
|
|
99485
|
+
return getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options).moduleSpecifiers;
|
|
99285
99486
|
}
|
|
99286
99487
|
moduleSpecifiers_1.getModuleSpecifiers = getModuleSpecifiers;
|
|
99287
|
-
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99488
|
+
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99489
|
+
if (options === void 0) { options = {}; }
|
|
99288
99490
|
var computedWithoutCache = false;
|
|
99289
99491
|
var ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
|
|
99290
99492
|
if (ambient)
|
|
99291
99493
|
return { moduleSpecifiers: [ambient], computedWithoutCache: computedWithoutCache };
|
|
99292
|
-
var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
|
|
99494
|
+
var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
|
|
99293
99495
|
if (specifiers)
|
|
99294
99496
|
return { moduleSpecifiers: specifiers, computedWithoutCache: computedWithoutCache };
|
|
99295
99497
|
if (!moduleSourceFile)
|
|
99296
99498
|
return { moduleSpecifiers: ts.emptyArray, computedWithoutCache: computedWithoutCache };
|
|
99297
99499
|
computedWithoutCache = true;
|
|
99298
99500
|
modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
|
|
99299
|
-
var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences);
|
|
99300
|
-
cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, modulePaths, result);
|
|
99501
|
+
var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
|
|
99502
|
+
cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
|
|
99301
99503
|
return { moduleSpecifiers: result, computedWithoutCache: computedWithoutCache };
|
|
99302
99504
|
}
|
|
99303
99505
|
moduleSpecifiers_1.getModuleSpecifiersWithCacheInfo = getModuleSpecifiersWithCacheInfo;
|
|
99304
|
-
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99506
|
+
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99507
|
+
if (options === void 0) { options = {}; }
|
|
99305
99508
|
var info = getInfo(importingSourceFile.path, host);
|
|
99306
99509
|
var preferences = getPreferences(host, userPreferences, compilerOptions, importingSourceFile);
|
|
99307
99510
|
var existingSpecifier = ts.forEach(modulePaths, function (modulePath) { return ts.forEach(host.getFileIncludeReasons().get(ts.toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), function (reason) {
|
|
99308
99511
|
if (reason.kind !== ts.FileIncludeKind.Import || reason.file !== importingSourceFile.path)
|
|
99309
99512
|
return undefined;
|
|
99513
|
+
if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== ts.getModeForResolutionAtIndex(importingSourceFile, reason.index))
|
|
99514
|
+
return undefined;
|
|
99310
99515
|
var specifier = ts.getModuleNameStringLiteralAt(importingSourceFile, reason.index).text;
|
|
99311
99516
|
return preferences.relativePreference !== 1 || !ts.pathIsRelative(specifier) ?
|
|
99312
99517
|
specifier :
|
|
@@ -99322,7 +99527,7 @@ var ts;
|
|
|
99322
99527
|
var relativeSpecifiers;
|
|
99323
99528
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
99324
99529
|
var modulePath = modulePaths_1[_i];
|
|
99325
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions);
|
|
99530
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
99326
99531
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
99327
99532
|
if (specifier && modulePath.isRedirect) {
|
|
99328
99533
|
return nodeModulesSpecifiers;
|
|
@@ -99461,18 +99666,19 @@ var ts;
|
|
|
99461
99666
|
: undefined);
|
|
99462
99667
|
}
|
|
99463
99668
|
moduleSpecifiers_1.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
99464
|
-
function getAllModulePaths(importingFilePath, importedFileName, host, preferences,
|
|
99669
|
+
function getAllModulePaths(importingFilePath, importedFileName, host, preferences, options) {
|
|
99465
99670
|
var _a;
|
|
99466
|
-
if (
|
|
99671
|
+
if (options === void 0) { options = {}; }
|
|
99672
|
+
var importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host));
|
|
99467
99673
|
var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
99468
99674
|
if (cache) {
|
|
99469
|
-
var cached = cache.get(importingFilePath, importedFilePath, preferences);
|
|
99675
|
+
var cached = cache.get(importingFilePath, importedFilePath, preferences, options);
|
|
99470
99676
|
if (cached === null || cached === void 0 ? void 0 : cached.modulePaths)
|
|
99471
99677
|
return cached.modulePaths;
|
|
99472
99678
|
}
|
|
99473
99679
|
var modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host);
|
|
99474
99680
|
if (cache) {
|
|
99475
|
-
cache.setModulePaths(importingFilePath, importedFilePath, preferences, modulePaths);
|
|
99681
|
+
cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths);
|
|
99476
99682
|
}
|
|
99477
99683
|
return modulePaths;
|
|
99478
99684
|
}
|
|
@@ -99652,7 +99858,7 @@ var ts;
|
|
|
99652
99858
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
99653
99859
|
: ts.removeFileExtension(relativePath);
|
|
99654
99860
|
}
|
|
99655
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly) {
|
|
99861
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
99656
99862
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
99657
99863
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
99658
99864
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -99711,7 +99917,7 @@ var ts;
|
|
|
99711
99917
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
99712
99918
|
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
99713
99919
|
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
99714
|
-
var conditions = ["node", importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99920
|
+
var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99715
99921
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
99716
99922
|
? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
|
|
99717
99923
|
: undefined;
|