typescript 4.7.0-dev.20220228 → 4.7.0-dev.20220303
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es2020.bigint.d.ts +3 -1
- package/lib/lib.es2020.d.ts +2 -0
- package/lib/lib.es2020.date.d.ts +44 -0
- package/lib/lib.es2020.intl.d.ts +7 -0
- package/lib/lib.es2020.number.d.ts +30 -0
- package/lib/tsc.js +871 -674
- package/lib/tsserver.js +1201 -1004
- package/lib/tsserverlibrary.d.ts +84 -66
- package/lib/tsserverlibrary.js +1201 -1004
- package/lib/typescript.d.ts +84 -66
- package/lib/typescript.js +1189 -992
- package/lib/typescriptServices.d.ts +84 -66
- package/lib/typescriptServices.js +1189 -992
- package/lib/typingsInstaller.js +1003 -807
- 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-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220303";
|
|
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."),
|
|
@@ -9330,8 +9333,8 @@ var ts;
|
|
|
9330
9333
|
switch (declaration.kind) {
|
|
9331
9334
|
case 79:
|
|
9332
9335
|
return declaration;
|
|
9333
|
-
case
|
|
9334
|
-
case
|
|
9336
|
+
case 346:
|
|
9337
|
+
case 339: {
|
|
9335
9338
|
var name = declaration.name;
|
|
9336
9339
|
if (name.kind === 160) {
|
|
9337
9340
|
return name.right;
|
|
@@ -9355,9 +9358,9 @@ var ts;
|
|
|
9355
9358
|
return undefined;
|
|
9356
9359
|
}
|
|
9357
9360
|
}
|
|
9358
|
-
case
|
|
9361
|
+
case 344:
|
|
9359
9362
|
return getNameOfJSDocTypedef(declaration);
|
|
9360
|
-
case
|
|
9363
|
+
case 338:
|
|
9361
9364
|
return nameForNamelessJSDocTypedef(declaration);
|
|
9362
9365
|
case 270: {
|
|
9363
9366
|
var expression = declaration.expression;
|
|
@@ -9581,12 +9584,12 @@ var ts;
|
|
|
9581
9584
|
ts.getAllJSDocTagsOfKind = getAllJSDocTagsOfKind;
|
|
9582
9585
|
function getTextOfJSDocComment(comment) {
|
|
9583
9586
|
return typeof comment === "string" ? comment
|
|
9584
|
-
: comment === null || comment === void 0 ? void 0 : comment.map(function (c) { return c.kind ===
|
|
9587
|
+
: comment === null || comment === void 0 ? void 0 : comment.map(function (c) { return c.kind === 320 ? c.text : formatJSDocLink(c); }).join("");
|
|
9585
9588
|
}
|
|
9586
9589
|
ts.getTextOfJSDocComment = getTextOfJSDocComment;
|
|
9587
9590
|
function formatJSDocLink(link) {
|
|
9588
|
-
var kind = link.kind ===
|
|
9589
|
-
: link.kind ===
|
|
9591
|
+
var kind = link.kind === 323 ? "link"
|
|
9592
|
+
: link.kind === 324 ? "linkcode"
|
|
9590
9593
|
: "linkplain";
|
|
9591
9594
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
9592
9595
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
@@ -9597,7 +9600,7 @@ var ts;
|
|
|
9597
9600
|
return ts.emptyArray;
|
|
9598
9601
|
}
|
|
9599
9602
|
if (ts.isJSDocTypeAlias(node)) {
|
|
9600
|
-
ts.Debug.assert(node.parent.kind ===
|
|
9603
|
+
ts.Debug.assert(node.parent.kind === 319);
|
|
9601
9604
|
return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
|
|
9602
9605
|
}
|
|
9603
9606
|
if (node.typeParameters) {
|
|
@@ -9692,8 +9695,8 @@ var ts;
|
|
|
9692
9695
|
ts.isNamedExportBindings = isNamedExportBindings;
|
|
9693
9696
|
function isUnparsedTextLike(node) {
|
|
9694
9697
|
switch (node.kind) {
|
|
9695
|
-
case 300:
|
|
9696
9698
|
case 301:
|
|
9699
|
+
case 302:
|
|
9697
9700
|
return true;
|
|
9698
9701
|
default:
|
|
9699
9702
|
return false;
|
|
@@ -9702,12 +9705,12 @@ var ts;
|
|
|
9702
9705
|
ts.isUnparsedTextLike = isUnparsedTextLike;
|
|
9703
9706
|
function isUnparsedNode(node) {
|
|
9704
9707
|
return isUnparsedTextLike(node) ||
|
|
9705
|
-
node.kind ===
|
|
9706
|
-
node.kind ===
|
|
9708
|
+
node.kind === 299 ||
|
|
9709
|
+
node.kind === 303;
|
|
9707
9710
|
}
|
|
9708
9711
|
ts.isUnparsedNode = isUnparsedNode;
|
|
9709
9712
|
function isJSDocPropertyLikeTag(node) {
|
|
9710
|
-
return node.kind ===
|
|
9713
|
+
return node.kind === 346 || node.kind === 339;
|
|
9711
9714
|
}
|
|
9712
9715
|
ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag;
|
|
9713
9716
|
function isNode(node) {
|
|
@@ -9878,11 +9881,11 @@ var ts;
|
|
|
9878
9881
|
switch (kind) {
|
|
9879
9882
|
case 167:
|
|
9880
9883
|
case 173:
|
|
9881
|
-
case
|
|
9884
|
+
case 322:
|
|
9882
9885
|
case 174:
|
|
9883
9886
|
case 175:
|
|
9884
9887
|
case 178:
|
|
9885
|
-
case
|
|
9888
|
+
case 316:
|
|
9886
9889
|
case 179:
|
|
9887
9890
|
return true;
|
|
9888
9891
|
default:
|
|
@@ -9940,9 +9943,9 @@ var ts;
|
|
|
9940
9943
|
ts.isClassOrTypeElement = isClassOrTypeElement;
|
|
9941
9944
|
function isObjectLiteralElementLike(node) {
|
|
9942
9945
|
var kind = node.kind;
|
|
9943
|
-
return kind ===
|
|
9944
|
-
|| kind === 295
|
|
9946
|
+
return kind === 295
|
|
9945
9947
|
|| kind === 296
|
|
9948
|
+
|| kind === 297
|
|
9946
9949
|
|| kind === 168
|
|
9947
9950
|
|| kind === 171
|
|
9948
9951
|
|| kind === 172;
|
|
@@ -10009,9 +10012,9 @@ var ts;
|
|
|
10009
10012
|
function isObjectBindingOrAssignmentElement(node) {
|
|
10010
10013
|
switch (node.kind) {
|
|
10011
10014
|
case 202:
|
|
10012
|
-
case 294:
|
|
10013
10015
|
case 295:
|
|
10014
10016
|
case 296:
|
|
10017
|
+
case 297:
|
|
10015
10018
|
return true;
|
|
10016
10019
|
}
|
|
10017
10020
|
return false;
|
|
@@ -10147,8 +10150,8 @@ var ts;
|
|
|
10147
10150
|
case 224:
|
|
10148
10151
|
case 228:
|
|
10149
10152
|
case 226:
|
|
10153
|
+
case 350:
|
|
10150
10154
|
case 349:
|
|
10151
|
-
case 348:
|
|
10152
10155
|
return true;
|
|
10153
10156
|
default:
|
|
10154
10157
|
return isUnaryExpressionKind(kind);
|
|
@@ -10250,7 +10253,7 @@ var ts;
|
|
|
10250
10253
|
|| kind === 169
|
|
10251
10254
|
|| kind === 170
|
|
10252
10255
|
|| kind === 259
|
|
10253
|
-
|| kind ===
|
|
10256
|
+
|| kind === 298
|
|
10254
10257
|
|| kind === 274
|
|
10255
10258
|
|| kind === 255
|
|
10256
10259
|
|| kind === 212
|
|
@@ -10267,17 +10270,17 @@ var ts;
|
|
|
10267
10270
|
|| kind === 267
|
|
10268
10271
|
|| kind === 273
|
|
10269
10272
|
|| kind === 163
|
|
10270
|
-
|| kind ===
|
|
10273
|
+
|| kind === 295
|
|
10271
10274
|
|| kind === 166
|
|
10272
10275
|
|| kind === 165
|
|
10273
10276
|
|| kind === 172
|
|
10274
|
-
|| kind ===
|
|
10277
|
+
|| kind === 296
|
|
10275
10278
|
|| kind === 258
|
|
10276
10279
|
|| kind === 162
|
|
10277
10280
|
|| kind === 253
|
|
10278
|
-
|| kind ===
|
|
10279
|
-
|| kind ===
|
|
10280
|
-
|| kind ===
|
|
10281
|
+
|| kind === 344
|
|
10282
|
+
|| kind === 337
|
|
10283
|
+
|| kind === 346;
|
|
10281
10284
|
}
|
|
10282
10285
|
function isDeclarationStatementKind(kind) {
|
|
10283
10286
|
return kind === 255
|
|
@@ -10312,13 +10315,13 @@ var ts;
|
|
|
10312
10315
|
|| kind === 236
|
|
10313
10316
|
|| kind === 240
|
|
10314
10317
|
|| kind === 247
|
|
10315
|
-
|| kind ===
|
|
10316
|
-
|| kind ===
|
|
10317
|
-
|| kind ===
|
|
10318
|
+
|| kind === 348
|
|
10319
|
+
|| kind === 352
|
|
10320
|
+
|| kind === 351;
|
|
10318
10321
|
}
|
|
10319
10322
|
function isDeclaration(node) {
|
|
10320
10323
|
if (node.kind === 162) {
|
|
10321
|
-
return (node.parent && node.parent.kind !==
|
|
10324
|
+
return (node.parent && node.parent.kind !== 343) || ts.isInJSFile(node);
|
|
10322
10325
|
}
|
|
10323
10326
|
return isDeclarationKind(node.kind);
|
|
10324
10327
|
}
|
|
@@ -10403,13 +10406,13 @@ var ts;
|
|
|
10403
10406
|
}
|
|
10404
10407
|
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
|
|
10405
10408
|
function isJSDocNode(node) {
|
|
10406
|
-
return node.kind >=
|
|
10409
|
+
return node.kind >= 308 && node.kind <= 346;
|
|
10407
10410
|
}
|
|
10408
10411
|
ts.isJSDocNode = isJSDocNode;
|
|
10409
10412
|
function isJSDocCommentContainingNode(node) {
|
|
10410
|
-
return node.kind ===
|
|
10411
|
-
|| node.kind ===
|
|
10412
|
-
|| node.kind ===
|
|
10413
|
+
return node.kind === 319
|
|
10414
|
+
|| node.kind === 318
|
|
10415
|
+
|| node.kind === 320
|
|
10413
10416
|
|| isJSDocLinkLike(node)
|
|
10414
10417
|
|| isJSDocTag(node)
|
|
10415
10418
|
|| ts.isJSDocTypeLiteral(node)
|
|
@@ -10417,7 +10420,7 @@ var ts;
|
|
|
10417
10420
|
}
|
|
10418
10421
|
ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
|
|
10419
10422
|
function isJSDocTag(node) {
|
|
10420
|
-
return node.kind >=
|
|
10423
|
+
return node.kind >= 326 && node.kind <= 346;
|
|
10421
10424
|
}
|
|
10422
10425
|
ts.isJSDocTag = isJSDocTag;
|
|
10423
10426
|
function isSetAccessor(node) {
|
|
@@ -10448,8 +10451,8 @@ var ts;
|
|
|
10448
10451
|
case 202:
|
|
10449
10452
|
case 165:
|
|
10450
10453
|
case 166:
|
|
10451
|
-
case
|
|
10452
|
-
case
|
|
10454
|
+
case 295:
|
|
10455
|
+
case 298:
|
|
10453
10456
|
return true;
|
|
10454
10457
|
default:
|
|
10455
10458
|
return false;
|
|
@@ -10493,7 +10496,7 @@ var ts;
|
|
|
10493
10496
|
}
|
|
10494
10497
|
ts.isStringLiteralLike = isStringLiteralLike;
|
|
10495
10498
|
function isJSDocLinkLike(node) {
|
|
10496
|
-
return node.kind ===
|
|
10499
|
+
return node.kind === 323 || node.kind === 324 || node.kind === 325;
|
|
10497
10500
|
}
|
|
10498
10501
|
ts.isJSDocLinkLike = isJSDocLinkLike;
|
|
10499
10502
|
})(ts || (ts = {}));
|
|
@@ -10732,7 +10735,7 @@ var ts;
|
|
|
10732
10735
|
}
|
|
10733
10736
|
}
|
|
10734
10737
|
function getSourceFileOfNode(node) {
|
|
10735
|
-
while (node && node.kind !==
|
|
10738
|
+
while (node && node.kind !== 304) {
|
|
10736
10739
|
node = node.parent;
|
|
10737
10740
|
}
|
|
10738
10741
|
return node;
|
|
@@ -10902,7 +10905,7 @@ var ts;
|
|
|
10902
10905
|
if (includeJsDoc && ts.hasJSDocNodes(node)) {
|
|
10903
10906
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
10904
10907
|
}
|
|
10905
|
-
if (node.kind ===
|
|
10908
|
+
if (node.kind === 347 && node._children.length > 0) {
|
|
10906
10909
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
10907
10910
|
}
|
|
10908
10911
|
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, false, false, isInJSDoc(node));
|
|
@@ -11140,7 +11143,7 @@ var ts;
|
|
|
11140
11143
|
return !!node && node.kind === 260 && (!node.body);
|
|
11141
11144
|
}
|
|
11142
11145
|
function isBlockScopedContainerTopLevel(node) {
|
|
11143
|
-
return node.kind ===
|
|
11146
|
+
return node.kind === 304 ||
|
|
11144
11147
|
node.kind === 260 ||
|
|
11145
11148
|
ts.isFunctionLikeOrClassStaticBlockDeclaration(node);
|
|
11146
11149
|
}
|
|
@@ -11155,7 +11158,7 @@ var ts;
|
|
|
11155
11158
|
ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
|
|
11156
11159
|
function isModuleAugmentationExternal(node) {
|
|
11157
11160
|
switch (node.parent.kind) {
|
|
11158
|
-
case
|
|
11161
|
+
case 304:
|
|
11159
11162
|
return ts.isExternalModule(node.parent);
|
|
11160
11163
|
case 261:
|
|
11161
11164
|
return isAmbientModule(node.parent.parent) && ts.isSourceFile(node.parent.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
|
|
@@ -11205,7 +11208,7 @@ var ts;
|
|
|
11205
11208
|
ts.isEffectiveStrictModeSourceFile = isEffectiveStrictModeSourceFile;
|
|
11206
11209
|
function isBlockScope(node, parentNode) {
|
|
11207
11210
|
switch (node.kind) {
|
|
11208
|
-
case
|
|
11211
|
+
case 304:
|
|
11209
11212
|
case 262:
|
|
11210
11213
|
case 291:
|
|
11211
11214
|
case 260:
|
|
@@ -11230,9 +11233,9 @@ var ts;
|
|
|
11230
11233
|
ts.isBlockScope = isBlockScope;
|
|
11231
11234
|
function isDeclarationWithTypeParameters(node) {
|
|
11232
11235
|
switch (node.kind) {
|
|
11233
|
-
case
|
|
11234
|
-
case
|
|
11235
|
-
case
|
|
11236
|
+
case 337:
|
|
11237
|
+
case 344:
|
|
11238
|
+
case 322:
|
|
11236
11239
|
return true;
|
|
11237
11240
|
default:
|
|
11238
11241
|
ts.assertType(node);
|
|
@@ -11248,12 +11251,12 @@ var ts;
|
|
|
11248
11251
|
case 175:
|
|
11249
11252
|
case 178:
|
|
11250
11253
|
case 179:
|
|
11251
|
-
case
|
|
11254
|
+
case 316:
|
|
11252
11255
|
case 256:
|
|
11253
11256
|
case 225:
|
|
11254
11257
|
case 257:
|
|
11255
11258
|
case 258:
|
|
11256
|
-
case
|
|
11259
|
+
case 343:
|
|
11257
11260
|
case 255:
|
|
11258
11261
|
case 168:
|
|
11259
11262
|
case 170:
|
|
@@ -11361,7 +11364,7 @@ var ts;
|
|
|
11361
11364
|
else {
|
|
11362
11365
|
return ts.Debug.assertNever(name.name);
|
|
11363
11366
|
}
|
|
11364
|
-
case
|
|
11367
|
+
case 310:
|
|
11365
11368
|
return entityNameToString(name.left) + entityNameToString(name.right);
|
|
11366
11369
|
default:
|
|
11367
11370
|
return ts.Debug.assertNever(name);
|
|
@@ -11463,7 +11466,7 @@ var ts;
|
|
|
11463
11466
|
function getErrorSpanForNode(sourceFile, node) {
|
|
11464
11467
|
var errorNode = node;
|
|
11465
11468
|
switch (node.kind) {
|
|
11466
|
-
case
|
|
11469
|
+
case 304:
|
|
11467
11470
|
var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
|
|
11468
11471
|
if (pos_1 === sourceFile.text.length) {
|
|
11469
11472
|
return ts.createTextSpan(0, 0);
|
|
@@ -11476,7 +11479,7 @@ var ts;
|
|
|
11476
11479
|
case 257:
|
|
11477
11480
|
case 260:
|
|
11478
11481
|
case 259:
|
|
11479
|
-
case
|
|
11482
|
+
case 298:
|
|
11480
11483
|
case 255:
|
|
11481
11484
|
case 212:
|
|
11482
11485
|
case 168:
|
|
@@ -11654,7 +11657,7 @@ var ts;
|
|
|
11654
11657
|
return ts.isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
|
|
11655
11658
|
case 162:
|
|
11656
11659
|
return node === parent.constraint;
|
|
11657
|
-
case
|
|
11660
|
+
case 343:
|
|
11658
11661
|
return node === parent.constraint;
|
|
11659
11662
|
case 166:
|
|
11660
11663
|
case 165:
|
|
@@ -11781,12 +11784,12 @@ var ts;
|
|
|
11781
11784
|
if (node) {
|
|
11782
11785
|
switch (node.kind) {
|
|
11783
11786
|
case 202:
|
|
11784
|
-
case
|
|
11787
|
+
case 298:
|
|
11785
11788
|
case 163:
|
|
11786
|
-
case
|
|
11789
|
+
case 295:
|
|
11787
11790
|
case 166:
|
|
11788
11791
|
case 165:
|
|
11789
|
-
case
|
|
11792
|
+
case 296:
|
|
11790
11793
|
case 253:
|
|
11791
11794
|
return true;
|
|
11792
11795
|
}
|
|
@@ -11859,7 +11862,7 @@ var ts;
|
|
|
11859
11862
|
ts.isThisTypePredicate = isThisTypePredicate;
|
|
11860
11863
|
function getPropertyAssignment(objectLiteral, key, key2) {
|
|
11861
11864
|
return objectLiteral.properties.filter(function (property) {
|
|
11862
|
-
if (property.kind ===
|
|
11865
|
+
if (property.kind === 295) {
|
|
11863
11866
|
var propName = getTextOfPropertyName(property.name);
|
|
11864
11867
|
return key === propName || (!!key2 && key2 === propName);
|
|
11865
11868
|
}
|
|
@@ -11921,7 +11924,7 @@ var ts;
|
|
|
11921
11924
|
}
|
|
11922
11925
|
ts.getContainingFunctionOrClassStaticBlock = getContainingFunctionOrClassStaticBlock;
|
|
11923
11926
|
function getThisContainer(node, includeArrowFunctions) {
|
|
11924
|
-
ts.Debug.assert(node.kind !==
|
|
11927
|
+
ts.Debug.assert(node.kind !== 304);
|
|
11925
11928
|
while (true) {
|
|
11926
11929
|
node = node.parent;
|
|
11927
11930
|
if (!node) {
|
|
@@ -11961,7 +11964,7 @@ var ts;
|
|
|
11961
11964
|
case 174:
|
|
11962
11965
|
case 175:
|
|
11963
11966
|
case 259:
|
|
11964
|
-
case
|
|
11967
|
+
case 304:
|
|
11965
11968
|
return node;
|
|
11966
11969
|
}
|
|
11967
11970
|
}
|
|
@@ -12224,7 +12227,7 @@ var ts;
|
|
|
12224
12227
|
node = node.parent;
|
|
12225
12228
|
}
|
|
12226
12229
|
return node.parent.kind === 180 || ts.isJSDocLinkLike(node.parent) || ts.isJSDocNameReference(node.parent) || ts.isJSDocMemberName(node.parent) || isJSXTagName(node);
|
|
12227
|
-
case
|
|
12230
|
+
case 310:
|
|
12228
12231
|
while (ts.isJSDocMemberName(node.parent)) {
|
|
12229
12232
|
node = node.parent;
|
|
12230
12233
|
}
|
|
@@ -12253,8 +12256,8 @@ var ts;
|
|
|
12253
12256
|
case 163:
|
|
12254
12257
|
case 166:
|
|
12255
12258
|
case 165:
|
|
12256
|
-
case
|
|
12257
|
-
case
|
|
12259
|
+
case 298:
|
|
12260
|
+
case 295:
|
|
12258
12261
|
case 202:
|
|
12259
12262
|
return parent.initializer === node;
|
|
12260
12263
|
case 237:
|
|
@@ -12287,11 +12290,11 @@ var ts;
|
|
|
12287
12290
|
case 164:
|
|
12288
12291
|
case 287:
|
|
12289
12292
|
case 286:
|
|
12290
|
-
case
|
|
12293
|
+
case 297:
|
|
12291
12294
|
return true;
|
|
12292
12295
|
case 227:
|
|
12293
12296
|
return parent.expression === node && !isPartOfTypeNode(parent);
|
|
12294
|
-
case
|
|
12297
|
+
case 296:
|
|
12295
12298
|
return parent.objectAssignmentInitializer === node;
|
|
12296
12299
|
default:
|
|
12297
12300
|
return isExpressionNode(parent);
|
|
@@ -12781,8 +12784,8 @@ var ts;
|
|
|
12781
12784
|
case 163:
|
|
12782
12785
|
case 168:
|
|
12783
12786
|
case 167:
|
|
12787
|
+
case 296:
|
|
12784
12788
|
case 295:
|
|
12785
|
-
case 294:
|
|
12786
12789
|
case 166:
|
|
12787
12790
|
case 165:
|
|
12788
12791
|
return node.questionToken !== undefined;
|
|
@@ -12798,7 +12801,7 @@ var ts;
|
|
|
12798
12801
|
}
|
|
12799
12802
|
ts.isJSDocConstructSignature = isJSDocConstructSignature;
|
|
12800
12803
|
function isJSDocTypeAlias(node) {
|
|
12801
|
-
return node.kind ===
|
|
12804
|
+
return node.kind === 344 || node.kind === 337 || node.kind === 338;
|
|
12802
12805
|
}
|
|
12803
12806
|
ts.isJSDocTypeAlias = isJSDocTypeAlias;
|
|
12804
12807
|
function isTypeAlias(node) {
|
|
@@ -12828,7 +12831,7 @@ var ts;
|
|
|
12828
12831
|
return v && v.initializer;
|
|
12829
12832
|
case 166:
|
|
12830
12833
|
return node.initializer;
|
|
12831
|
-
case
|
|
12834
|
+
case 295:
|
|
12832
12835
|
return node.initializer;
|
|
12833
12836
|
}
|
|
12834
12837
|
}
|
|
@@ -12883,7 +12886,7 @@ var ts;
|
|
|
12883
12886
|
}
|
|
12884
12887
|
function getNextJSDocCommentLocation(node) {
|
|
12885
12888
|
var parent = node.parent;
|
|
12886
|
-
if (parent.kind ===
|
|
12889
|
+
if (parent.kind === 295 ||
|
|
12887
12890
|
parent.kind === 270 ||
|
|
12888
12891
|
parent.kind === 166 ||
|
|
12889
12892
|
parent.kind === 237 && node.kind === 205 ||
|
|
@@ -12976,7 +12979,7 @@ var ts;
|
|
|
12976
12979
|
ts.hasRestParameter = hasRestParameter;
|
|
12977
12980
|
function isRestParameter(node) {
|
|
12978
12981
|
var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
|
|
12979
|
-
return node.dotDotDotToken !== undefined || !!type && type.kind ===
|
|
12982
|
+
return node.dotDotDotToken !== undefined || !!type && type.kind === 317;
|
|
12980
12983
|
}
|
|
12981
12984
|
ts.isRestParameter = isRestParameter;
|
|
12982
12985
|
function hasTypeArguments(node) {
|
|
@@ -13005,16 +13008,16 @@ var ts;
|
|
|
13005
13008
|
case 229:
|
|
13006
13009
|
node = parent;
|
|
13007
13010
|
break;
|
|
13008
|
-
case
|
|
13011
|
+
case 297:
|
|
13009
13012
|
node = parent.parent;
|
|
13010
13013
|
break;
|
|
13011
|
-
case
|
|
13014
|
+
case 296:
|
|
13012
13015
|
if (parent.name !== node) {
|
|
13013
13016
|
return 0;
|
|
13014
13017
|
}
|
|
13015
13018
|
node = parent.parent;
|
|
13016
13019
|
break;
|
|
13017
|
-
case
|
|
13020
|
+
case 295:
|
|
13018
13021
|
if (parent.name === node) {
|
|
13019
13022
|
return 0;
|
|
13020
13023
|
}
|
|
@@ -13156,8 +13159,8 @@ var ts;
|
|
|
13156
13159
|
case 167:
|
|
13157
13160
|
case 171:
|
|
13158
13161
|
case 172:
|
|
13159
|
-
case
|
|
13160
|
-
case
|
|
13162
|
+
case 298:
|
|
13163
|
+
case 295:
|
|
13161
13164
|
case 205:
|
|
13162
13165
|
return parent.name === node;
|
|
13163
13166
|
case 160:
|
|
@@ -13183,8 +13186,8 @@ var ts;
|
|
|
13183
13186
|
node.kind === 270 && exportAssignmentIsAlias(node) ||
|
|
13184
13187
|
ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 && exportAssignmentIsAlias(node) ||
|
|
13185
13188
|
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 ===
|
|
13189
|
+
node.kind === 296 ||
|
|
13190
|
+
node.kind === 295 && isAliasableExpression(node.initializer);
|
|
13188
13191
|
}
|
|
13189
13192
|
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
|
|
13190
13193
|
function getAliasDeclarationFromName(node) {
|
|
@@ -13218,7 +13221,7 @@ var ts;
|
|
|
13218
13221
|
}
|
|
13219
13222
|
ts.getExportAssignmentExpression = getExportAssignmentExpression;
|
|
13220
13223
|
function getPropertyAssignmentAliasLikeExpression(node) {
|
|
13221
|
-
return node.kind ===
|
|
13224
|
+
return node.kind === 296 ? node.name : node.kind === 295 ? node.initializer :
|
|
13222
13225
|
node.parent.right;
|
|
13223
13226
|
}
|
|
13224
13227
|
ts.getPropertyAssignmentAliasLikeExpression = getPropertyAssignmentAliasLikeExpression;
|
|
@@ -13466,7 +13469,7 @@ var ts;
|
|
|
13466
13469
|
|| kind === 171
|
|
13467
13470
|
|| kind === 172
|
|
13468
13471
|
|| kind === 260
|
|
13469
|
-
|| kind ===
|
|
13472
|
+
|| kind === 304;
|
|
13470
13473
|
}
|
|
13471
13474
|
ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
|
|
13472
13475
|
function nodeIsSynthesized(range) {
|
|
@@ -13541,7 +13544,7 @@ var ts;
|
|
|
13541
13544
|
ts.getOperator = getOperator;
|
|
13542
13545
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
13543
13546
|
switch (nodeKind) {
|
|
13544
|
-
case
|
|
13547
|
+
case 350:
|
|
13545
13548
|
return 0;
|
|
13546
13549
|
case 224:
|
|
13547
13550
|
return 1;
|
|
@@ -14280,7 +14283,7 @@ var ts;
|
|
|
14280
14283
|
}
|
|
14281
14284
|
ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
|
|
14282
14285
|
function isNonTypeAliasTemplate(tag) {
|
|
14283
|
-
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind ===
|
|
14286
|
+
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 && tag.parent.tags.some(isJSDocTypeAlias));
|
|
14284
14287
|
}
|
|
14285
14288
|
function getEffectiveSetAccessorTypeAnnotationNode(node) {
|
|
14286
14289
|
var parameter = getSetAccessorValueParameter(node);
|
|
@@ -15058,11 +15061,11 @@ var ts;
|
|
|
15058
15061
|
: 0;
|
|
15059
15062
|
case 205:
|
|
15060
15063
|
return parent.name !== node ? 0 : accessKind(parent);
|
|
15061
|
-
case
|
|
15064
|
+
case 295: {
|
|
15062
15065
|
var parentAccess = accessKind(parent.parent);
|
|
15063
15066
|
return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess;
|
|
15064
15067
|
}
|
|
15065
|
-
case
|
|
15068
|
+
case 296:
|
|
15066
15069
|
return node === parent.objectAssignmentInitializer ? 0 : accessKind(parent.parent);
|
|
15067
15070
|
case 203:
|
|
15068
15071
|
return accessKind(parent);
|
|
@@ -15210,13 +15213,13 @@ var ts;
|
|
|
15210
15213
|
|| kind === 152
|
|
15211
15214
|
|| kind === 143
|
|
15212
15215
|
|| kind === 227
|
|
15213
|
-
|| kind === 310
|
|
15214
15216
|
|| kind === 311
|
|
15215
15217
|
|| kind === 312
|
|
15216
15218
|
|| kind === 313
|
|
15217
15219
|
|| kind === 314
|
|
15218
15220
|
|| kind === 315
|
|
15219
|
-
|| kind === 316
|
|
15221
|
+
|| kind === 316
|
|
15222
|
+
|| kind === 317;
|
|
15220
15223
|
}
|
|
15221
15224
|
ts.isTypeNodeKind = isTypeNodeKind;
|
|
15222
15225
|
function isAccessExpression(node) {
|
|
@@ -15275,7 +15278,7 @@ var ts;
|
|
|
15275
15278
|
case 206:
|
|
15276
15279
|
case 205:
|
|
15277
15280
|
case 229:
|
|
15278
|
-
case
|
|
15281
|
+
case 349:
|
|
15279
15282
|
node = node.expression;
|
|
15280
15283
|
continue;
|
|
15281
15284
|
}
|
|
@@ -16529,7 +16532,7 @@ var ts;
|
|
|
16529
16532
|
return parent.types;
|
|
16530
16533
|
case 183:
|
|
16531
16534
|
case 203:
|
|
16532
|
-
case
|
|
16535
|
+
case 350:
|
|
16533
16536
|
case 268:
|
|
16534
16537
|
case 272:
|
|
16535
16538
|
return parent.elements;
|
|
@@ -16559,7 +16562,7 @@ var ts;
|
|
|
16559
16562
|
return ts.isClassElement(node) ? parent.members : undefined;
|
|
16560
16563
|
case 259:
|
|
16561
16564
|
return ts.isEnumMember(node) ? parent.members : undefined;
|
|
16562
|
-
case
|
|
16565
|
+
case 304:
|
|
16563
16566
|
return parent.statements;
|
|
16564
16567
|
}
|
|
16565
16568
|
}
|
|
@@ -17337,6 +17340,8 @@ var ts;
|
|
|
17337
17340
|
updateAssertClause: updateAssertClause,
|
|
17338
17341
|
createAssertEntry: createAssertEntry,
|
|
17339
17342
|
updateAssertEntry: updateAssertEntry,
|
|
17343
|
+
createImportTypeAssertionContainer: createImportTypeAssertionContainer,
|
|
17344
|
+
updateImportTypeAssertionContainer: updateImportTypeAssertionContainer,
|
|
17340
17345
|
createNamespaceImport: createNamespaceImport,
|
|
17341
17346
|
updateNamespaceImport: updateNamespaceImport,
|
|
17342
17347
|
createNamespaceExport: createNamespaceExport,
|
|
@@ -17356,18 +17361,18 @@ var ts;
|
|
|
17356
17361
|
createMissingDeclaration: createMissingDeclaration,
|
|
17357
17362
|
createExternalModuleReference: createExternalModuleReference,
|
|
17358
17363
|
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(
|
|
17364
|
+
get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(311); },
|
|
17365
|
+
get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(312); },
|
|
17366
|
+
get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(314); },
|
|
17367
|
+
get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(314); },
|
|
17368
|
+
get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(313); },
|
|
17369
|
+
get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(313); },
|
|
17370
|
+
get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(315); },
|
|
17371
|
+
get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(315); },
|
|
17372
|
+
get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(317); },
|
|
17373
|
+
get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(317); },
|
|
17374
|
+
get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(318); },
|
|
17375
|
+
get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(318); },
|
|
17371
17376
|
createJSDocFunctionType: createJSDocFunctionType,
|
|
17372
17377
|
updateJSDocFunctionType: updateJSDocFunctionType,
|
|
17373
17378
|
createJSDocTypeLiteral: createJSDocTypeLiteral,
|
|
@@ -17402,30 +17407,30 @@ var ts;
|
|
|
17402
17407
|
updateJSDocLinkCode: updateJSDocLinkCode,
|
|
17403
17408
|
createJSDocLinkPlain: createJSDocLinkPlain,
|
|
17404
17409
|
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(
|
|
17410
|
+
get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(342); },
|
|
17411
|
+
get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(342); },
|
|
17412
|
+
get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(340); },
|
|
17413
|
+
get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(340); },
|
|
17414
|
+
get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(341); },
|
|
17415
|
+
get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(341); },
|
|
17416
|
+
get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(338); },
|
|
17417
|
+
get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(338); },
|
|
17418
|
+
get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(329); },
|
|
17419
|
+
get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(329); },
|
|
17420
|
+
get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(331); },
|
|
17421
|
+
get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(331); },
|
|
17422
|
+
get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(332); },
|
|
17423
|
+
get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(332); },
|
|
17424
|
+
get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(333); },
|
|
17425
|
+
get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(333); },
|
|
17426
|
+
get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(334); },
|
|
17427
|
+
get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(334); },
|
|
17428
|
+
get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(335); },
|
|
17429
|
+
get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(335); },
|
|
17430
|
+
get createJSDocOverrideTag() { return getJSDocSimpleTagCreateFunction(336); },
|
|
17431
|
+
get updateJSDocOverrideTag() { return getJSDocSimpleTagUpdateFunction(336); },
|
|
17432
|
+
get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(330); },
|
|
17433
|
+
get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(330); },
|
|
17429
17434
|
createJSDocUnknownTag: createJSDocUnknownTag,
|
|
17430
17435
|
updateJSDocUnknownTag: updateJSDocUnknownTag,
|
|
17431
17436
|
createJSDocText: createJSDocText,
|
|
@@ -17616,7 +17621,7 @@ var ts;
|
|
|
17616
17621
|
case 171:
|
|
17617
17622
|
case 172:
|
|
17618
17623
|
case 166:
|
|
17619
|
-
case
|
|
17624
|
+
case 295:
|
|
17620
17625
|
if (ts.isIdentifier(name)) {
|
|
17621
17626
|
node.transformFlags |= propagateIdentifierNameFlags(name);
|
|
17622
17627
|
break;
|
|
@@ -18425,23 +18430,33 @@ var ts;
|
|
|
18425
18430
|
? update(createTemplateLiteralType(head, templateSpans), node)
|
|
18426
18431
|
: node;
|
|
18427
18432
|
}
|
|
18428
|
-
function createImportTypeNode(argument,
|
|
18429
|
-
|
|
18433
|
+
function createImportTypeNode(argument, qualifierOrAssertions, typeArgumentsOrQualifier, isTypeOfOrTypeArguments, isTypeOf) {
|
|
18434
|
+
var assertion = qualifierOrAssertions && qualifierOrAssertions.kind === 294 ? qualifierOrAssertions : undefined;
|
|
18435
|
+
var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
|
|
18436
|
+
: typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
|
|
18437
|
+
var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
|
|
18438
|
+
isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : false;
|
|
18430
18439
|
var node = createBaseNode(199);
|
|
18431
18440
|
node.argument = argument;
|
|
18441
|
+
node.assertions = assertion;
|
|
18432
18442
|
node.qualifier = qualifier;
|
|
18433
18443
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
18434
18444
|
node.isTypeOf = isTypeOf;
|
|
18435
18445
|
node.transformFlags = 1;
|
|
18436
18446
|
return node;
|
|
18437
18447
|
}
|
|
18438
|
-
function updateImportTypeNode(node, argument,
|
|
18439
|
-
|
|
18448
|
+
function updateImportTypeNode(node, argument, qualifierOrAssertions, typeArgumentsOrQualifier, isTypeOfOrTypeArguments, isTypeOf) {
|
|
18449
|
+
var assertion = qualifierOrAssertions && qualifierOrAssertions.kind === 294 ? qualifierOrAssertions : undefined;
|
|
18450
|
+
var qualifier = qualifierOrAssertions && ts.isEntityName(qualifierOrAssertions) ? qualifierOrAssertions
|
|
18451
|
+
: typeArgumentsOrQualifier && !ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : undefined;
|
|
18452
|
+
var typeArguments = ts.isArray(typeArgumentsOrQualifier) ? typeArgumentsOrQualifier : ts.isArray(isTypeOfOrTypeArguments) ? isTypeOfOrTypeArguments : undefined;
|
|
18453
|
+
isTypeOf = typeof isTypeOfOrTypeArguments === "boolean" ? isTypeOfOrTypeArguments : typeof isTypeOf === "boolean" ? isTypeOf : node.isTypeOf;
|
|
18440
18454
|
return node.argument !== argument
|
|
18455
|
+
|| node.assertions !== assertion
|
|
18441
18456
|
|| node.qualifier !== qualifier
|
|
18442
18457
|
|| node.typeArguments !== typeArguments
|
|
18443
18458
|
|| node.isTypeOf !== isTypeOf
|
|
18444
|
-
? update(createImportTypeNode(argument, qualifier, typeArguments, isTypeOf), node)
|
|
18459
|
+
? update(createImportTypeNode(argument, assertion, qualifier, typeArguments, isTypeOf), node)
|
|
18445
18460
|
: node;
|
|
18446
18461
|
}
|
|
18447
18462
|
function createParenthesizedType(type) {
|
|
@@ -19829,6 +19844,18 @@ var ts;
|
|
|
19829
19844
|
? update(createAssertEntry(name, value), node)
|
|
19830
19845
|
: node;
|
|
19831
19846
|
}
|
|
19847
|
+
function createImportTypeAssertionContainer(clause, multiLine) {
|
|
19848
|
+
var node = createBaseNode(294);
|
|
19849
|
+
node.assertClause = clause;
|
|
19850
|
+
node.multiLine = multiLine;
|
|
19851
|
+
return node;
|
|
19852
|
+
}
|
|
19853
|
+
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
19854
|
+
return node.assertClause !== clause
|
|
19855
|
+
|| node.multiLine !== multiLine
|
|
19856
|
+
? update(createImportTypeAssertionContainer(clause, multiLine), node)
|
|
19857
|
+
: node;
|
|
19858
|
+
}
|
|
19832
19859
|
function createNamespaceImport(name) {
|
|
19833
19860
|
var node = createBaseNode(267);
|
|
19834
19861
|
node.name = name;
|
|
@@ -19984,7 +20011,7 @@ var ts;
|
|
|
19984
20011
|
: node;
|
|
19985
20012
|
}
|
|
19986
20013
|
function createJSDocFunctionType(parameters, type) {
|
|
19987
|
-
var node = createBaseSignatureDeclaration(
|
|
20014
|
+
var node = createBaseSignatureDeclaration(316, undefined, undefined, undefined, undefined, parameters, type);
|
|
19988
20015
|
return node;
|
|
19989
20016
|
}
|
|
19990
20017
|
function updateJSDocFunctionType(node, parameters, type) {
|
|
@@ -19995,7 +20022,7 @@ var ts;
|
|
|
19995
20022
|
}
|
|
19996
20023
|
function createJSDocTypeLiteral(propertyTags, isArrayType) {
|
|
19997
20024
|
if (isArrayType === void 0) { isArrayType = false; }
|
|
19998
|
-
var node = createBaseNode(
|
|
20025
|
+
var node = createBaseNode(321);
|
|
19999
20026
|
node.jsDocPropertyTags = asNodeArray(propertyTags);
|
|
20000
20027
|
node.isArrayType = isArrayType;
|
|
20001
20028
|
return node;
|
|
@@ -20007,7 +20034,7 @@ var ts;
|
|
|
20007
20034
|
: node;
|
|
20008
20035
|
}
|
|
20009
20036
|
function createJSDocTypeExpression(type) {
|
|
20010
|
-
var node = createBaseNode(
|
|
20037
|
+
var node = createBaseNode(308);
|
|
20011
20038
|
node.type = type;
|
|
20012
20039
|
return node;
|
|
20013
20040
|
}
|
|
@@ -20017,7 +20044,7 @@ var ts;
|
|
|
20017
20044
|
: node;
|
|
20018
20045
|
}
|
|
20019
20046
|
function createJSDocSignature(typeParameters, parameters, type) {
|
|
20020
|
-
var node = createBaseNode(
|
|
20047
|
+
var node = createBaseNode(322);
|
|
20021
20048
|
node.typeParameters = asNodeArray(typeParameters);
|
|
20022
20049
|
node.parameters = createNodeArray(parameters);
|
|
20023
20050
|
node.type = type;
|
|
@@ -20043,7 +20070,7 @@ var ts;
|
|
|
20043
20070
|
return node;
|
|
20044
20071
|
}
|
|
20045
20072
|
function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
|
|
20046
|
-
var node = createBaseJSDocTag(
|
|
20073
|
+
var node = createBaseJSDocTag(343, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("template"), comment);
|
|
20047
20074
|
node.constraint = constraint;
|
|
20048
20075
|
node.typeParameters = createNodeArray(typeParameters);
|
|
20049
20076
|
return node;
|
|
@@ -20058,7 +20085,7 @@ var ts;
|
|
|
20058
20085
|
: node;
|
|
20059
20086
|
}
|
|
20060
20087
|
function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {
|
|
20061
|
-
var node = createBaseJSDocTag(
|
|
20088
|
+
var node = createBaseJSDocTag(344, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("typedef"), comment);
|
|
20062
20089
|
node.typeExpression = typeExpression;
|
|
20063
20090
|
node.fullName = fullName;
|
|
20064
20091
|
node.name = ts.getJSDocTypeAliasName(fullName);
|
|
@@ -20074,7 +20101,7 @@ var ts;
|
|
|
20074
20101
|
: node;
|
|
20075
20102
|
}
|
|
20076
20103
|
function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
20077
|
-
var node = createBaseJSDocTag(
|
|
20104
|
+
var node = createBaseJSDocTag(339, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("param"), comment);
|
|
20078
20105
|
node.typeExpression = typeExpression;
|
|
20079
20106
|
node.name = name;
|
|
20080
20107
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -20093,7 +20120,7 @@ var ts;
|
|
|
20093
20120
|
: node;
|
|
20094
20121
|
}
|
|
20095
20122
|
function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
20096
|
-
var node = createBaseJSDocTag(
|
|
20123
|
+
var node = createBaseJSDocTag(346, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("prop"), comment);
|
|
20097
20124
|
node.typeExpression = typeExpression;
|
|
20098
20125
|
node.name = name;
|
|
20099
20126
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -20112,7 +20139,7 @@ var ts;
|
|
|
20112
20139
|
: node;
|
|
20113
20140
|
}
|
|
20114
20141
|
function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {
|
|
20115
|
-
var node = createBaseJSDocTag(
|
|
20142
|
+
var node = createBaseJSDocTag(337, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("callback"), comment);
|
|
20116
20143
|
node.typeExpression = typeExpression;
|
|
20117
20144
|
node.fullName = fullName;
|
|
20118
20145
|
node.name = ts.getJSDocTypeAliasName(fullName);
|
|
@@ -20128,7 +20155,7 @@ var ts;
|
|
|
20128
20155
|
: node;
|
|
20129
20156
|
}
|
|
20130
20157
|
function createJSDocAugmentsTag(tagName, className, comment) {
|
|
20131
|
-
var node = createBaseJSDocTag(
|
|
20158
|
+
var node = createBaseJSDocTag(327, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("augments"), comment);
|
|
20132
20159
|
node.class = className;
|
|
20133
20160
|
return node;
|
|
20134
20161
|
}
|
|
@@ -20141,12 +20168,12 @@ var ts;
|
|
|
20141
20168
|
: node;
|
|
20142
20169
|
}
|
|
20143
20170
|
function createJSDocImplementsTag(tagName, className, comment) {
|
|
20144
|
-
var node = createBaseJSDocTag(
|
|
20171
|
+
var node = createBaseJSDocTag(328, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("implements"), comment);
|
|
20145
20172
|
node.class = className;
|
|
20146
20173
|
return node;
|
|
20147
20174
|
}
|
|
20148
20175
|
function createJSDocSeeTag(tagName, name, comment) {
|
|
20149
|
-
var node = createBaseJSDocTag(
|
|
20176
|
+
var node = createBaseJSDocTag(345, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("see"), comment);
|
|
20150
20177
|
node.name = name;
|
|
20151
20178
|
return node;
|
|
20152
20179
|
}
|
|
@@ -20158,7 +20185,7 @@ var ts;
|
|
|
20158
20185
|
: node;
|
|
20159
20186
|
}
|
|
20160
20187
|
function createJSDocNameReference(name) {
|
|
20161
|
-
var node = createBaseNode(
|
|
20188
|
+
var node = createBaseNode(309);
|
|
20162
20189
|
node.name = name;
|
|
20163
20190
|
return node;
|
|
20164
20191
|
}
|
|
@@ -20168,7 +20195,7 @@ var ts;
|
|
|
20168
20195
|
: node;
|
|
20169
20196
|
}
|
|
20170
20197
|
function createJSDocMemberName(left, right) {
|
|
20171
|
-
var node = createBaseNode(
|
|
20198
|
+
var node = createBaseNode(310);
|
|
20172
20199
|
node.left = left;
|
|
20173
20200
|
node.right = right;
|
|
20174
20201
|
node.transformFlags |=
|
|
@@ -20183,7 +20210,7 @@ var ts;
|
|
|
20183
20210
|
: node;
|
|
20184
20211
|
}
|
|
20185
20212
|
function createJSDocLink(name, text) {
|
|
20186
|
-
var node = createBaseNode(
|
|
20213
|
+
var node = createBaseNode(323);
|
|
20187
20214
|
node.name = name;
|
|
20188
20215
|
node.text = text;
|
|
20189
20216
|
return node;
|
|
@@ -20194,7 +20221,7 @@ var ts;
|
|
|
20194
20221
|
: node;
|
|
20195
20222
|
}
|
|
20196
20223
|
function createJSDocLinkCode(name, text) {
|
|
20197
|
-
var node = createBaseNode(
|
|
20224
|
+
var node = createBaseNode(324);
|
|
20198
20225
|
node.name = name;
|
|
20199
20226
|
node.text = text;
|
|
20200
20227
|
return node;
|
|
@@ -20205,7 +20232,7 @@ var ts;
|
|
|
20205
20232
|
: node;
|
|
20206
20233
|
}
|
|
20207
20234
|
function createJSDocLinkPlain(name, text) {
|
|
20208
|
-
var node = createBaseNode(
|
|
20235
|
+
var node = createBaseNode(325);
|
|
20209
20236
|
node.name = name;
|
|
20210
20237
|
node.text = text;
|
|
20211
20238
|
return node;
|
|
@@ -20248,7 +20275,7 @@ var ts;
|
|
|
20248
20275
|
: node;
|
|
20249
20276
|
}
|
|
20250
20277
|
function createJSDocUnknownTag(tagName, comment) {
|
|
20251
|
-
var node = createBaseJSDocTag(
|
|
20278
|
+
var node = createBaseJSDocTag(326, tagName, comment);
|
|
20252
20279
|
return node;
|
|
20253
20280
|
}
|
|
20254
20281
|
function updateJSDocUnknownTag(node, tagName, comment) {
|
|
@@ -20258,7 +20285,7 @@ var ts;
|
|
|
20258
20285
|
: node;
|
|
20259
20286
|
}
|
|
20260
20287
|
function createJSDocText(text) {
|
|
20261
|
-
var node = createBaseNode(
|
|
20288
|
+
var node = createBaseNode(320);
|
|
20262
20289
|
node.text = text;
|
|
20263
20290
|
return node;
|
|
20264
20291
|
}
|
|
@@ -20268,7 +20295,7 @@ var ts;
|
|
|
20268
20295
|
: node;
|
|
20269
20296
|
}
|
|
20270
20297
|
function createJSDocComment(comment, tags) {
|
|
20271
|
-
var node = createBaseNode(
|
|
20298
|
+
var node = createBaseNode(319);
|
|
20272
20299
|
node.comment = comment;
|
|
20273
20300
|
node.tags = asNodeArray(tags);
|
|
20274
20301
|
return node;
|
|
@@ -20523,7 +20550,7 @@ var ts;
|
|
|
20523
20550
|
: node;
|
|
20524
20551
|
}
|
|
20525
20552
|
function createPropertyAssignment(name, initializer) {
|
|
20526
|
-
var node = createBaseNamedDeclaration(
|
|
20553
|
+
var node = createBaseNamedDeclaration(295, undefined, undefined, name);
|
|
20527
20554
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
20528
20555
|
node.transformFlags |=
|
|
20529
20556
|
propagateChildFlags(node.name) |
|
|
@@ -20548,7 +20575,7 @@ var ts;
|
|
|
20548
20575
|
: node;
|
|
20549
20576
|
}
|
|
20550
20577
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
20551
|
-
var node = createBaseNamedDeclaration(
|
|
20578
|
+
var node = createBaseNamedDeclaration(296, undefined, undefined, name);
|
|
20552
20579
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
20553
20580
|
node.transformFlags |=
|
|
20554
20581
|
propagateChildFlags(node.objectAssignmentInitializer) |
|
|
@@ -20575,7 +20602,7 @@ var ts;
|
|
|
20575
20602
|
: node;
|
|
20576
20603
|
}
|
|
20577
20604
|
function createSpreadAssignment(expression) {
|
|
20578
|
-
var node = createBaseNode(
|
|
20605
|
+
var node = createBaseNode(297);
|
|
20579
20606
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
20580
20607
|
node.transformFlags |=
|
|
20581
20608
|
propagateChildFlags(node.expression) |
|
|
@@ -20589,7 +20616,7 @@ var ts;
|
|
|
20589
20616
|
: node;
|
|
20590
20617
|
}
|
|
20591
20618
|
function createEnumMember(name, initializer) {
|
|
20592
|
-
var node = createBaseNode(
|
|
20619
|
+
var node = createBaseNode(298);
|
|
20593
20620
|
node.name = asName(name);
|
|
20594
20621
|
node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
20595
20622
|
node.transformFlags |=
|
|
@@ -20605,7 +20632,7 @@ var ts;
|
|
|
20605
20632
|
: node;
|
|
20606
20633
|
}
|
|
20607
20634
|
function createSourceFile(statements, endOfFileToken, flags) {
|
|
20608
|
-
var node = baseFactory.createBaseSourceFileNode(
|
|
20635
|
+
var node = baseFactory.createBaseSourceFileNode(304);
|
|
20609
20636
|
node.statements = createNodeArray(statements);
|
|
20610
20637
|
node.endOfFileToken = endOfFileToken;
|
|
20611
20638
|
node.flags |= flags;
|
|
@@ -20622,7 +20649,7 @@ var ts;
|
|
|
20622
20649
|
return node;
|
|
20623
20650
|
}
|
|
20624
20651
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
20625
|
-
var node = baseFactory.createBaseSourceFileNode(
|
|
20652
|
+
var node = baseFactory.createBaseSourceFileNode(304);
|
|
20626
20653
|
for (var p in source) {
|
|
20627
20654
|
if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
|
|
20628
20655
|
continue;
|
|
@@ -20659,7 +20686,7 @@ var ts;
|
|
|
20659
20686
|
}
|
|
20660
20687
|
function createBundle(sourceFiles, prepends) {
|
|
20661
20688
|
if (prepends === void 0) { prepends = ts.emptyArray; }
|
|
20662
|
-
var node = createBaseNode(
|
|
20689
|
+
var node = createBaseNode(305);
|
|
20663
20690
|
node.prepends = prepends;
|
|
20664
20691
|
node.sourceFiles = sourceFiles;
|
|
20665
20692
|
return node;
|
|
@@ -20672,7 +20699,7 @@ var ts;
|
|
|
20672
20699
|
: node;
|
|
20673
20700
|
}
|
|
20674
20701
|
function createUnparsedSource(prologues, syntheticReferences, texts) {
|
|
20675
|
-
var node = createBaseNode(
|
|
20702
|
+
var node = createBaseNode(306);
|
|
20676
20703
|
node.prologues = prologues;
|
|
20677
20704
|
node.syntheticReferences = syntheticReferences;
|
|
20678
20705
|
node.texts = texts;
|
|
@@ -20689,24 +20716,24 @@ var ts;
|
|
|
20689
20716
|
return node;
|
|
20690
20717
|
}
|
|
20691
20718
|
function createUnparsedPrologue(data) {
|
|
20692
|
-
return createBaseUnparsedNode(
|
|
20719
|
+
return createBaseUnparsedNode(299, data);
|
|
20693
20720
|
}
|
|
20694
20721
|
function createUnparsedPrepend(data, texts) {
|
|
20695
|
-
var node = createBaseUnparsedNode(
|
|
20722
|
+
var node = createBaseUnparsedNode(300, data);
|
|
20696
20723
|
node.texts = texts;
|
|
20697
20724
|
return node;
|
|
20698
20725
|
}
|
|
20699
20726
|
function createUnparsedTextLike(data, internal) {
|
|
20700
|
-
return createBaseUnparsedNode(internal ?
|
|
20727
|
+
return createBaseUnparsedNode(internal ? 302 : 301, data);
|
|
20701
20728
|
}
|
|
20702
20729
|
function createUnparsedSyntheticReference(section) {
|
|
20703
|
-
var node = createBaseNode(
|
|
20730
|
+
var node = createBaseNode(303);
|
|
20704
20731
|
node.data = section.data;
|
|
20705
20732
|
node.section = section;
|
|
20706
20733
|
return node;
|
|
20707
20734
|
}
|
|
20708
20735
|
function createInputFiles() {
|
|
20709
|
-
var node = createBaseNode(
|
|
20736
|
+
var node = createBaseNode(307);
|
|
20710
20737
|
node.javascriptText = "";
|
|
20711
20738
|
node.declarationText = "";
|
|
20712
20739
|
return node;
|
|
@@ -20720,18 +20747,18 @@ var ts;
|
|
|
20720
20747
|
return node;
|
|
20721
20748
|
}
|
|
20722
20749
|
function createSyntaxList(children) {
|
|
20723
|
-
var node = createBaseNode(
|
|
20750
|
+
var node = createBaseNode(347);
|
|
20724
20751
|
node._children = children;
|
|
20725
20752
|
return node;
|
|
20726
20753
|
}
|
|
20727
20754
|
function createNotEmittedStatement(original) {
|
|
20728
|
-
var node = createBaseNode(
|
|
20755
|
+
var node = createBaseNode(348);
|
|
20729
20756
|
node.original = original;
|
|
20730
20757
|
ts.setTextRange(node, original);
|
|
20731
20758
|
return node;
|
|
20732
20759
|
}
|
|
20733
20760
|
function createPartiallyEmittedExpression(expression, original) {
|
|
20734
|
-
var node = createBaseNode(
|
|
20761
|
+
var node = createBaseNode(349);
|
|
20735
20762
|
node.expression = expression;
|
|
20736
20763
|
node.original = original;
|
|
20737
20764
|
node.transformFlags |=
|
|
@@ -20757,7 +20784,7 @@ var ts;
|
|
|
20757
20784
|
return node;
|
|
20758
20785
|
}
|
|
20759
20786
|
function createCommaListExpression(elements) {
|
|
20760
|
-
var node = createBaseNode(
|
|
20787
|
+
var node = createBaseNode(350);
|
|
20761
20788
|
node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
|
|
20762
20789
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
20763
20790
|
return node;
|
|
@@ -20768,19 +20795,19 @@ var ts;
|
|
|
20768
20795
|
: node;
|
|
20769
20796
|
}
|
|
20770
20797
|
function createEndOfDeclarationMarker(original) {
|
|
20771
|
-
var node = createBaseNode(
|
|
20798
|
+
var node = createBaseNode(352);
|
|
20772
20799
|
node.emitNode = {};
|
|
20773
20800
|
node.original = original;
|
|
20774
20801
|
return node;
|
|
20775
20802
|
}
|
|
20776
20803
|
function createMergeDeclarationMarker(original) {
|
|
20777
|
-
var node = createBaseNode(
|
|
20804
|
+
var node = createBaseNode(351);
|
|
20778
20805
|
node.emitNode = {};
|
|
20779
20806
|
node.original = original;
|
|
20780
20807
|
return node;
|
|
20781
20808
|
}
|
|
20782
20809
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
20783
|
-
var node = createBaseNode(
|
|
20810
|
+
var node = createBaseNode(353);
|
|
20784
20811
|
node.expression = expression;
|
|
20785
20812
|
node.thisArg = thisArg;
|
|
20786
20813
|
node.transformFlags |=
|
|
@@ -20798,7 +20825,7 @@ var ts;
|
|
|
20798
20825
|
if (node === undefined) {
|
|
20799
20826
|
return node;
|
|
20800
20827
|
}
|
|
20801
|
-
var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(
|
|
20828
|
+
var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(304) :
|
|
20802
20829
|
ts.isIdentifier(node) ? baseFactory.createBaseIdentifierNode(79) :
|
|
20803
20830
|
ts.isPrivateIdentifier(node) ? baseFactory.createBasePrivateIdentifierNode(80) :
|
|
20804
20831
|
!ts.isNodeKind(node.kind) ? baseFactory.createBaseTokenNode(node.kind) :
|
|
@@ -20893,7 +20920,7 @@ var ts;
|
|
|
20893
20920
|
case 210: return updateTypeAssertion(outerExpression, outerExpression.type, expression);
|
|
20894
20921
|
case 228: return updateAsExpression(outerExpression, expression, outerExpression.type);
|
|
20895
20922
|
case 229: return updateNonNullExpression(outerExpression, expression);
|
|
20896
|
-
case
|
|
20923
|
+
case 349: return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
20897
20924
|
}
|
|
20898
20925
|
}
|
|
20899
20926
|
function isIgnorableParen(node) {
|
|
@@ -21231,24 +21258,24 @@ var ts;
|
|
|
21231
21258
|
}
|
|
21232
21259
|
function getDefaultTagNameForKind(kind) {
|
|
21233
21260
|
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
|
|
21261
|
+
case 342: return "type";
|
|
21262
|
+
case 340: return "returns";
|
|
21263
|
+
case 341: return "this";
|
|
21264
|
+
case 338: return "enum";
|
|
21265
|
+
case 329: return "author";
|
|
21266
|
+
case 331: return "class";
|
|
21267
|
+
case 332: return "public";
|
|
21268
|
+
case 333: return "private";
|
|
21269
|
+
case 334: return "protected";
|
|
21270
|
+
case 335: return "readonly";
|
|
21271
|
+
case 336: return "override";
|
|
21272
|
+
case 343: return "template";
|
|
21273
|
+
case 344: return "typedef";
|
|
21274
|
+
case 339: return "param";
|
|
21275
|
+
case 346: return "prop";
|
|
21276
|
+
case 337: return "callback";
|
|
21277
|
+
case 327: return "augments";
|
|
21278
|
+
case 328: return "implements";
|
|
21252
21279
|
default:
|
|
21253
21280
|
return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
|
|
21254
21281
|
}
|
|
@@ -21378,7 +21405,7 @@ var ts;
|
|
|
21378
21405
|
return 536887296;
|
|
21379
21406
|
case 210:
|
|
21380
21407
|
case 228:
|
|
21381
|
-
case
|
|
21408
|
+
case 349:
|
|
21382
21409
|
case 211:
|
|
21383
21410
|
case 106:
|
|
21384
21411
|
return 536870912;
|
|
@@ -21674,7 +21701,7 @@ var ts;
|
|
|
21674
21701
|
var _a;
|
|
21675
21702
|
if (!node.emitNode) {
|
|
21676
21703
|
if (ts.isParseTreeNode(node)) {
|
|
21677
|
-
if (node.kind ===
|
|
21704
|
+
if (node.kind === 304) {
|
|
21678
21705
|
return node.emitNode = { annotatedNodes: [node] };
|
|
21679
21706
|
}
|
|
21680
21707
|
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 +22767,11 @@ var ts;
|
|
|
22740
22767
|
}
|
|
22741
22768
|
ts.isSyntheticExpression = isSyntheticExpression;
|
|
22742
22769
|
function isPartiallyEmittedExpression(node) {
|
|
22743
|
-
return node.kind ===
|
|
22770
|
+
return node.kind === 349;
|
|
22744
22771
|
}
|
|
22745
22772
|
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
|
|
22746
22773
|
function isCommaListExpression(node) {
|
|
22747
|
-
return node.kind ===
|
|
22774
|
+
return node.kind === 350;
|
|
22748
22775
|
}
|
|
22749
22776
|
ts.isCommaListExpression = isCommaListExpression;
|
|
22750
22777
|
function isTemplateSpan(node) {
|
|
@@ -22932,19 +22959,19 @@ var ts;
|
|
|
22932
22959
|
}
|
|
22933
22960
|
ts.isMissingDeclaration = isMissingDeclaration;
|
|
22934
22961
|
function isNotEmittedStatement(node) {
|
|
22935
|
-
return node.kind ===
|
|
22962
|
+
return node.kind === 348;
|
|
22936
22963
|
}
|
|
22937
22964
|
ts.isNotEmittedStatement = isNotEmittedStatement;
|
|
22938
22965
|
function isSyntheticReference(node) {
|
|
22939
|
-
return node.kind ===
|
|
22966
|
+
return node.kind === 353;
|
|
22940
22967
|
}
|
|
22941
22968
|
ts.isSyntheticReference = isSyntheticReference;
|
|
22942
22969
|
function isMergeDeclarationMarker(node) {
|
|
22943
|
-
return node.kind ===
|
|
22970
|
+
return node.kind === 351;
|
|
22944
22971
|
}
|
|
22945
22972
|
ts.isMergeDeclarationMarker = isMergeDeclarationMarker;
|
|
22946
22973
|
function isEndOfDeclarationMarker(node) {
|
|
22947
|
-
return node.kind ===
|
|
22974
|
+
return node.kind === 352;
|
|
22948
22975
|
}
|
|
22949
22976
|
ts.isEndOfDeclarationMarker = isEndOfDeclarationMarker;
|
|
22950
22977
|
function isExternalModuleReference(node) {
|
|
@@ -23012,191 +23039,191 @@ var ts;
|
|
|
23012
23039
|
}
|
|
23013
23040
|
ts.isCatchClause = isCatchClause;
|
|
23014
23041
|
function isPropertyAssignment(node) {
|
|
23015
|
-
return node.kind ===
|
|
23042
|
+
return node.kind === 295;
|
|
23016
23043
|
}
|
|
23017
23044
|
ts.isPropertyAssignment = isPropertyAssignment;
|
|
23018
23045
|
function isShorthandPropertyAssignment(node) {
|
|
23019
|
-
return node.kind ===
|
|
23046
|
+
return node.kind === 296;
|
|
23020
23047
|
}
|
|
23021
23048
|
ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
|
|
23022
23049
|
function isSpreadAssignment(node) {
|
|
23023
|
-
return node.kind ===
|
|
23050
|
+
return node.kind === 297;
|
|
23024
23051
|
}
|
|
23025
23052
|
ts.isSpreadAssignment = isSpreadAssignment;
|
|
23026
23053
|
function isEnumMember(node) {
|
|
23027
|
-
return node.kind ===
|
|
23054
|
+
return node.kind === 298;
|
|
23028
23055
|
}
|
|
23029
23056
|
ts.isEnumMember = isEnumMember;
|
|
23030
23057
|
function isUnparsedPrepend(node) {
|
|
23031
|
-
return node.kind ===
|
|
23058
|
+
return node.kind === 300;
|
|
23032
23059
|
}
|
|
23033
23060
|
ts.isUnparsedPrepend = isUnparsedPrepend;
|
|
23034
23061
|
function isSourceFile(node) {
|
|
23035
|
-
return node.kind ===
|
|
23062
|
+
return node.kind === 304;
|
|
23036
23063
|
}
|
|
23037
23064
|
ts.isSourceFile = isSourceFile;
|
|
23038
23065
|
function isBundle(node) {
|
|
23039
|
-
return node.kind ===
|
|
23066
|
+
return node.kind === 305;
|
|
23040
23067
|
}
|
|
23041
23068
|
ts.isBundle = isBundle;
|
|
23042
23069
|
function isUnparsedSource(node) {
|
|
23043
|
-
return node.kind ===
|
|
23070
|
+
return node.kind === 306;
|
|
23044
23071
|
}
|
|
23045
23072
|
ts.isUnparsedSource = isUnparsedSource;
|
|
23046
23073
|
function isJSDocTypeExpression(node) {
|
|
23047
|
-
return node.kind ===
|
|
23074
|
+
return node.kind === 308;
|
|
23048
23075
|
}
|
|
23049
23076
|
ts.isJSDocTypeExpression = isJSDocTypeExpression;
|
|
23050
23077
|
function isJSDocNameReference(node) {
|
|
23051
|
-
return node.kind ===
|
|
23078
|
+
return node.kind === 309;
|
|
23052
23079
|
}
|
|
23053
23080
|
ts.isJSDocNameReference = isJSDocNameReference;
|
|
23054
23081
|
function isJSDocMemberName(node) {
|
|
23055
|
-
return node.kind ===
|
|
23082
|
+
return node.kind === 310;
|
|
23056
23083
|
}
|
|
23057
23084
|
ts.isJSDocMemberName = isJSDocMemberName;
|
|
23058
23085
|
function isJSDocLink(node) {
|
|
23059
|
-
return node.kind ===
|
|
23086
|
+
return node.kind === 323;
|
|
23060
23087
|
}
|
|
23061
23088
|
ts.isJSDocLink = isJSDocLink;
|
|
23062
23089
|
function isJSDocLinkCode(node) {
|
|
23063
|
-
return node.kind ===
|
|
23090
|
+
return node.kind === 324;
|
|
23064
23091
|
}
|
|
23065
23092
|
ts.isJSDocLinkCode = isJSDocLinkCode;
|
|
23066
23093
|
function isJSDocLinkPlain(node) {
|
|
23067
|
-
return node.kind ===
|
|
23094
|
+
return node.kind === 325;
|
|
23068
23095
|
}
|
|
23069
23096
|
ts.isJSDocLinkPlain = isJSDocLinkPlain;
|
|
23070
23097
|
function isJSDocAllType(node) {
|
|
23071
|
-
return node.kind ===
|
|
23098
|
+
return node.kind === 311;
|
|
23072
23099
|
}
|
|
23073
23100
|
ts.isJSDocAllType = isJSDocAllType;
|
|
23074
23101
|
function isJSDocUnknownType(node) {
|
|
23075
|
-
return node.kind ===
|
|
23102
|
+
return node.kind === 312;
|
|
23076
23103
|
}
|
|
23077
23104
|
ts.isJSDocUnknownType = isJSDocUnknownType;
|
|
23078
23105
|
function isJSDocNullableType(node) {
|
|
23079
|
-
return node.kind ===
|
|
23106
|
+
return node.kind === 313;
|
|
23080
23107
|
}
|
|
23081
23108
|
ts.isJSDocNullableType = isJSDocNullableType;
|
|
23082
23109
|
function isJSDocNonNullableType(node) {
|
|
23083
|
-
return node.kind ===
|
|
23110
|
+
return node.kind === 314;
|
|
23084
23111
|
}
|
|
23085
23112
|
ts.isJSDocNonNullableType = isJSDocNonNullableType;
|
|
23086
23113
|
function isJSDocOptionalType(node) {
|
|
23087
|
-
return node.kind ===
|
|
23114
|
+
return node.kind === 315;
|
|
23088
23115
|
}
|
|
23089
23116
|
ts.isJSDocOptionalType = isJSDocOptionalType;
|
|
23090
23117
|
function isJSDocFunctionType(node) {
|
|
23091
|
-
return node.kind ===
|
|
23118
|
+
return node.kind === 316;
|
|
23092
23119
|
}
|
|
23093
23120
|
ts.isJSDocFunctionType = isJSDocFunctionType;
|
|
23094
23121
|
function isJSDocVariadicType(node) {
|
|
23095
|
-
return node.kind ===
|
|
23122
|
+
return node.kind === 317;
|
|
23096
23123
|
}
|
|
23097
23124
|
ts.isJSDocVariadicType = isJSDocVariadicType;
|
|
23098
23125
|
function isJSDocNamepathType(node) {
|
|
23099
|
-
return node.kind ===
|
|
23126
|
+
return node.kind === 318;
|
|
23100
23127
|
}
|
|
23101
23128
|
ts.isJSDocNamepathType = isJSDocNamepathType;
|
|
23102
23129
|
function isJSDoc(node) {
|
|
23103
|
-
return node.kind ===
|
|
23130
|
+
return node.kind === 319;
|
|
23104
23131
|
}
|
|
23105
23132
|
ts.isJSDoc = isJSDoc;
|
|
23106
23133
|
function isJSDocTypeLiteral(node) {
|
|
23107
|
-
return node.kind ===
|
|
23134
|
+
return node.kind === 321;
|
|
23108
23135
|
}
|
|
23109
23136
|
ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
|
|
23110
23137
|
function isJSDocSignature(node) {
|
|
23111
|
-
return node.kind ===
|
|
23138
|
+
return node.kind === 322;
|
|
23112
23139
|
}
|
|
23113
23140
|
ts.isJSDocSignature = isJSDocSignature;
|
|
23114
23141
|
function isJSDocAugmentsTag(node) {
|
|
23115
|
-
return node.kind ===
|
|
23142
|
+
return node.kind === 327;
|
|
23116
23143
|
}
|
|
23117
23144
|
ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
|
|
23118
23145
|
function isJSDocAuthorTag(node) {
|
|
23119
|
-
return node.kind ===
|
|
23146
|
+
return node.kind === 329;
|
|
23120
23147
|
}
|
|
23121
23148
|
ts.isJSDocAuthorTag = isJSDocAuthorTag;
|
|
23122
23149
|
function isJSDocClassTag(node) {
|
|
23123
|
-
return node.kind ===
|
|
23150
|
+
return node.kind === 331;
|
|
23124
23151
|
}
|
|
23125
23152
|
ts.isJSDocClassTag = isJSDocClassTag;
|
|
23126
23153
|
function isJSDocCallbackTag(node) {
|
|
23127
|
-
return node.kind ===
|
|
23154
|
+
return node.kind === 337;
|
|
23128
23155
|
}
|
|
23129
23156
|
ts.isJSDocCallbackTag = isJSDocCallbackTag;
|
|
23130
23157
|
function isJSDocPublicTag(node) {
|
|
23131
|
-
return node.kind ===
|
|
23158
|
+
return node.kind === 332;
|
|
23132
23159
|
}
|
|
23133
23160
|
ts.isJSDocPublicTag = isJSDocPublicTag;
|
|
23134
23161
|
function isJSDocPrivateTag(node) {
|
|
23135
|
-
return node.kind ===
|
|
23162
|
+
return node.kind === 333;
|
|
23136
23163
|
}
|
|
23137
23164
|
ts.isJSDocPrivateTag = isJSDocPrivateTag;
|
|
23138
23165
|
function isJSDocProtectedTag(node) {
|
|
23139
|
-
return node.kind ===
|
|
23166
|
+
return node.kind === 334;
|
|
23140
23167
|
}
|
|
23141
23168
|
ts.isJSDocProtectedTag = isJSDocProtectedTag;
|
|
23142
23169
|
function isJSDocReadonlyTag(node) {
|
|
23143
|
-
return node.kind ===
|
|
23170
|
+
return node.kind === 335;
|
|
23144
23171
|
}
|
|
23145
23172
|
ts.isJSDocReadonlyTag = isJSDocReadonlyTag;
|
|
23146
23173
|
function isJSDocOverrideTag(node) {
|
|
23147
|
-
return node.kind ===
|
|
23174
|
+
return node.kind === 336;
|
|
23148
23175
|
}
|
|
23149
23176
|
ts.isJSDocOverrideTag = isJSDocOverrideTag;
|
|
23150
23177
|
function isJSDocDeprecatedTag(node) {
|
|
23151
|
-
return node.kind ===
|
|
23178
|
+
return node.kind === 330;
|
|
23152
23179
|
}
|
|
23153
23180
|
ts.isJSDocDeprecatedTag = isJSDocDeprecatedTag;
|
|
23154
23181
|
function isJSDocSeeTag(node) {
|
|
23155
|
-
return node.kind ===
|
|
23182
|
+
return node.kind === 345;
|
|
23156
23183
|
}
|
|
23157
23184
|
ts.isJSDocSeeTag = isJSDocSeeTag;
|
|
23158
23185
|
function isJSDocEnumTag(node) {
|
|
23159
|
-
return node.kind ===
|
|
23186
|
+
return node.kind === 338;
|
|
23160
23187
|
}
|
|
23161
23188
|
ts.isJSDocEnumTag = isJSDocEnumTag;
|
|
23162
23189
|
function isJSDocParameterTag(node) {
|
|
23163
|
-
return node.kind ===
|
|
23190
|
+
return node.kind === 339;
|
|
23164
23191
|
}
|
|
23165
23192
|
ts.isJSDocParameterTag = isJSDocParameterTag;
|
|
23166
23193
|
function isJSDocReturnTag(node) {
|
|
23167
|
-
return node.kind ===
|
|
23194
|
+
return node.kind === 340;
|
|
23168
23195
|
}
|
|
23169
23196
|
ts.isJSDocReturnTag = isJSDocReturnTag;
|
|
23170
23197
|
function isJSDocThisTag(node) {
|
|
23171
|
-
return node.kind ===
|
|
23198
|
+
return node.kind === 341;
|
|
23172
23199
|
}
|
|
23173
23200
|
ts.isJSDocThisTag = isJSDocThisTag;
|
|
23174
23201
|
function isJSDocTypeTag(node) {
|
|
23175
|
-
return node.kind ===
|
|
23202
|
+
return node.kind === 342;
|
|
23176
23203
|
}
|
|
23177
23204
|
ts.isJSDocTypeTag = isJSDocTypeTag;
|
|
23178
23205
|
function isJSDocTemplateTag(node) {
|
|
23179
|
-
return node.kind ===
|
|
23206
|
+
return node.kind === 343;
|
|
23180
23207
|
}
|
|
23181
23208
|
ts.isJSDocTemplateTag = isJSDocTemplateTag;
|
|
23182
23209
|
function isJSDocTypedefTag(node) {
|
|
23183
|
-
return node.kind ===
|
|
23210
|
+
return node.kind === 344;
|
|
23184
23211
|
}
|
|
23185
23212
|
ts.isJSDocTypedefTag = isJSDocTypedefTag;
|
|
23186
23213
|
function isJSDocUnknownTag(node) {
|
|
23187
|
-
return node.kind ===
|
|
23214
|
+
return node.kind === 326;
|
|
23188
23215
|
}
|
|
23189
23216
|
ts.isJSDocUnknownTag = isJSDocUnknownTag;
|
|
23190
23217
|
function isJSDocPropertyTag(node) {
|
|
23191
|
-
return node.kind ===
|
|
23218
|
+
return node.kind === 346;
|
|
23192
23219
|
}
|
|
23193
23220
|
ts.isJSDocPropertyTag = isJSDocPropertyTag;
|
|
23194
23221
|
function isJSDocImplementsTag(node) {
|
|
23195
|
-
return node.kind ===
|
|
23222
|
+
return node.kind === 328;
|
|
23196
23223
|
}
|
|
23197
23224
|
ts.isJSDocImplementsTag = isJSDocImplementsTag;
|
|
23198
23225
|
function isSyntaxList(n) {
|
|
23199
|
-
return n.kind ===
|
|
23226
|
+
return n.kind === 347;
|
|
23200
23227
|
}
|
|
23201
23228
|
ts.isSyntaxList = isSyntaxList;
|
|
23202
23229
|
})(ts || (ts = {}));
|
|
@@ -23360,9 +23387,9 @@ var ts;
|
|
|
23360
23387
|
case 171:
|
|
23361
23388
|
case 172:
|
|
23362
23389
|
return createExpressionForAccessorDeclaration(factory, node.properties, property, receiver, !!node.multiLine);
|
|
23363
|
-
case 294:
|
|
23364
|
-
return createExpressionForPropertyAssignment(factory, property, receiver);
|
|
23365
23390
|
case 295:
|
|
23391
|
+
return createExpressionForPropertyAssignment(factory, property, receiver);
|
|
23392
|
+
case 296:
|
|
23366
23393
|
return createExpressionForShorthandPropertyAssignment(factory, property, receiver);
|
|
23367
23394
|
case 168:
|
|
23368
23395
|
return createExpressionForMethodDeclaration(factory, property, receiver);
|
|
@@ -23431,7 +23458,7 @@ var ts;
|
|
|
23431
23458
|
ts.startsWithUseStrict = startsWithUseStrict;
|
|
23432
23459
|
function isCommaSequence(node) {
|
|
23433
23460
|
return node.kind === 220 && node.operatorToken.kind === 27 ||
|
|
23434
|
-
node.kind ===
|
|
23461
|
+
node.kind === 350;
|
|
23435
23462
|
}
|
|
23436
23463
|
ts.isCommaSequence = isCommaSequence;
|
|
23437
23464
|
function isJSDocTypeAssertion(node) {
|
|
@@ -23459,7 +23486,7 @@ var ts;
|
|
|
23459
23486
|
return (kinds & 2) !== 0;
|
|
23460
23487
|
case 229:
|
|
23461
23488
|
return (kinds & 4) !== 0;
|
|
23462
|
-
case
|
|
23489
|
+
case 349:
|
|
23463
23490
|
return (kinds & 8) !== 0;
|
|
23464
23491
|
}
|
|
23465
23492
|
return false;
|
|
@@ -23637,11 +23664,11 @@ var ts;
|
|
|
23637
23664
|
}
|
|
23638
23665
|
if (ts.isObjectLiteralElementLike(bindingElement)) {
|
|
23639
23666
|
switch (bindingElement.kind) {
|
|
23640
|
-
case 294:
|
|
23641
|
-
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
|
|
23642
23667
|
case 295:
|
|
23643
|
-
return bindingElement.
|
|
23668
|
+
return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
|
|
23644
23669
|
case 296:
|
|
23670
|
+
return bindingElement.name;
|
|
23671
|
+
case 297:
|
|
23645
23672
|
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
|
|
23646
23673
|
}
|
|
23647
23674
|
return undefined;
|
|
@@ -23661,7 +23688,7 @@ var ts;
|
|
|
23661
23688
|
case 202:
|
|
23662
23689
|
return bindingElement.dotDotDotToken;
|
|
23663
23690
|
case 224:
|
|
23664
|
-
case
|
|
23691
|
+
case 297:
|
|
23665
23692
|
return bindingElement;
|
|
23666
23693
|
}
|
|
23667
23694
|
return undefined;
|
|
@@ -23686,7 +23713,7 @@ var ts;
|
|
|
23686
23713
|
: propertyName;
|
|
23687
23714
|
}
|
|
23688
23715
|
break;
|
|
23689
|
-
case
|
|
23716
|
+
case 295:
|
|
23690
23717
|
if (bindingElement.name) {
|
|
23691
23718
|
var propertyName = bindingElement.name;
|
|
23692
23719
|
if (ts.isPrivateIdentifier(propertyName)) {
|
|
@@ -23697,7 +23724,7 @@ var ts;
|
|
|
23697
23724
|
: propertyName;
|
|
23698
23725
|
}
|
|
23699
23726
|
break;
|
|
23700
|
-
case
|
|
23727
|
+
case 297:
|
|
23701
23728
|
if (bindingElement.name && ts.isPrivateIdentifier(bindingElement.name)) {
|
|
23702
23729
|
return ts.Debug.failBadSyntaxKind(bindingElement.name);
|
|
23703
23730
|
}
|
|
@@ -24045,7 +24072,7 @@ var ts;
|
|
|
24045
24072
|
visitNode(cbNode, node.constraint) ||
|
|
24046
24073
|
visitNode(cbNode, node.default) ||
|
|
24047
24074
|
visitNode(cbNode, node.expression);
|
|
24048
|
-
case
|
|
24075
|
+
case 296:
|
|
24049
24076
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24050
24077
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24051
24078
|
visitNode(cbNode, node.name) ||
|
|
@@ -24053,7 +24080,7 @@ var ts;
|
|
|
24053
24080
|
visitNode(cbNode, node.exclamationToken) ||
|
|
24054
24081
|
visitNode(cbNode, node.equalsToken) ||
|
|
24055
24082
|
visitNode(cbNode, node.objectAssignmentInitializer);
|
|
24056
|
-
case
|
|
24083
|
+
case 297:
|
|
24057
24084
|
return visitNode(cbNode, node.expression);
|
|
24058
24085
|
case 163:
|
|
24059
24086
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
@@ -24078,7 +24105,7 @@ var ts;
|
|
|
24078
24105
|
visitNode(cbNode, node.questionToken) ||
|
|
24079
24106
|
visitNode(cbNode, node.type) ||
|
|
24080
24107
|
visitNode(cbNode, node.initializer);
|
|
24081
|
-
case
|
|
24108
|
+
case 295:
|
|
24082
24109
|
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
|
24083
24110
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24084
24111
|
visitNode(cbNode, node.name) ||
|
|
@@ -24159,8 +24186,11 @@ var ts;
|
|
|
24159
24186
|
return visitNode(cbNode, node.typeParameter);
|
|
24160
24187
|
case 199:
|
|
24161
24188
|
return visitNode(cbNode, node.argument) ||
|
|
24189
|
+
visitNode(cbNode, node.assertions) ||
|
|
24162
24190
|
visitNode(cbNode, node.qualifier) ||
|
|
24163
24191
|
visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
24192
|
+
case 294:
|
|
24193
|
+
return visitNode(cbNode, node.assertClause);
|
|
24164
24194
|
case 190:
|
|
24165
24195
|
case 192:
|
|
24166
24196
|
return visitNode(cbNode, node.type);
|
|
@@ -24249,7 +24279,7 @@ var ts;
|
|
|
24249
24279
|
case 234:
|
|
24250
24280
|
case 261:
|
|
24251
24281
|
return visitNodes(cbNode, cbNodes, node.statements);
|
|
24252
|
-
case
|
|
24282
|
+
case 304:
|
|
24253
24283
|
return visitNodes(cbNode, cbNodes, node.statements) ||
|
|
24254
24284
|
visitNode(cbNode, node.endOfFileToken);
|
|
24255
24285
|
case 236:
|
|
@@ -24342,7 +24372,7 @@ var ts;
|
|
|
24342
24372
|
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
|
24343
24373
|
visitNode(cbNode, node.name) ||
|
|
24344
24374
|
visitNodes(cbNode, cbNodes, node.members);
|
|
24345
|
-
case
|
|
24375
|
+
case 298:
|
|
24346
24376
|
return visitNode(cbNode, node.name) ||
|
|
24347
24377
|
visitNode(cbNode, node.initializer);
|
|
24348
24378
|
case 260:
|
|
@@ -24411,7 +24441,7 @@ var ts;
|
|
|
24411
24441
|
return visitNode(cbNode, node.expression);
|
|
24412
24442
|
case 275:
|
|
24413
24443
|
return visitNodes(cbNode, cbNodes, node.decorators);
|
|
24414
|
-
case
|
|
24444
|
+
case 350:
|
|
24415
24445
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
24416
24446
|
case 277:
|
|
24417
24447
|
return visitNode(cbNode, node.openingElement) ||
|
|
@@ -24440,29 +24470,29 @@ var ts;
|
|
|
24440
24470
|
return visitNode(cbNode, node.tagName);
|
|
24441
24471
|
case 184:
|
|
24442
24472
|
case 185:
|
|
24443
|
-
case
|
|
24444
|
-
case 313:
|
|
24445
|
-
case 312:
|
|
24473
|
+
case 308:
|
|
24446
24474
|
case 314:
|
|
24447
|
-
case
|
|
24448
|
-
return visitNode(cbNode, node.type);
|
|
24475
|
+
case 313:
|
|
24449
24476
|
case 315:
|
|
24477
|
+
case 317:
|
|
24478
|
+
return visitNode(cbNode, node.type);
|
|
24479
|
+
case 316:
|
|
24450
24480
|
return visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
24451
24481
|
visitNode(cbNode, node.type);
|
|
24452
|
-
case
|
|
24482
|
+
case 319:
|
|
24453
24483
|
return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
24454
24484
|
|| visitNodes(cbNode, cbNodes, node.tags);
|
|
24455
|
-
case
|
|
24485
|
+
case 345:
|
|
24456
24486
|
return visitNode(cbNode, node.tagName) ||
|
|
24457
24487
|
visitNode(cbNode, node.name) ||
|
|
24458
24488
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24459
|
-
case 308:
|
|
24460
|
-
return visitNode(cbNode, node.name);
|
|
24461
24489
|
case 309:
|
|
24490
|
+
return visitNode(cbNode, node.name);
|
|
24491
|
+
case 310:
|
|
24462
24492
|
return visitNode(cbNode, node.left) ||
|
|
24463
24493
|
visitNode(cbNode, node.right);
|
|
24464
|
-
case
|
|
24465
|
-
case
|
|
24494
|
+
case 339:
|
|
24495
|
+
case 346:
|
|
24466
24496
|
return visitNode(cbNode, node.tagName) ||
|
|
24467
24497
|
(node.isNameFirst
|
|
24468
24498
|
? visitNode(cbNode, node.name) ||
|
|
@@ -24471,64 +24501,64 @@ var ts;
|
|
|
24471
24501
|
: visitNode(cbNode, node.typeExpression) ||
|
|
24472
24502
|
visitNode(cbNode, node.name) ||
|
|
24473
24503
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
|
|
24474
|
-
case
|
|
24504
|
+
case 329:
|
|
24475
24505
|
return visitNode(cbNode, node.tagName) ||
|
|
24476
24506
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24477
|
-
case
|
|
24507
|
+
case 328:
|
|
24478
24508
|
return visitNode(cbNode, node.tagName) ||
|
|
24479
24509
|
visitNode(cbNode, node.class) ||
|
|
24480
24510
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24481
|
-
case
|
|
24511
|
+
case 327:
|
|
24482
24512
|
return visitNode(cbNode, node.tagName) ||
|
|
24483
24513
|
visitNode(cbNode, node.class) ||
|
|
24484
24514
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24485
|
-
case
|
|
24515
|
+
case 343:
|
|
24486
24516
|
return visitNode(cbNode, node.tagName) ||
|
|
24487
24517
|
visitNode(cbNode, node.constraint) ||
|
|
24488
24518
|
visitNodes(cbNode, cbNodes, node.typeParameters) ||
|
|
24489
24519
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24490
|
-
case
|
|
24520
|
+
case 344:
|
|
24491
24521
|
return visitNode(cbNode, node.tagName) ||
|
|
24492
24522
|
(node.typeExpression &&
|
|
24493
|
-
node.typeExpression.kind ===
|
|
24523
|
+
node.typeExpression.kind === 308
|
|
24494
24524
|
? visitNode(cbNode, node.typeExpression) ||
|
|
24495
24525
|
visitNode(cbNode, node.fullName) ||
|
|
24496
24526
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
24497
24527
|
: visitNode(cbNode, node.fullName) ||
|
|
24498
24528
|
visitNode(cbNode, node.typeExpression) ||
|
|
24499
24529
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
|
|
24500
|
-
case
|
|
24530
|
+
case 337:
|
|
24501
24531
|
return visitNode(cbNode, node.tagName) ||
|
|
24502
24532
|
visitNode(cbNode, node.fullName) ||
|
|
24503
24533
|
visitNode(cbNode, node.typeExpression) ||
|
|
24504
24534
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24505
|
-
case 339:
|
|
24506
|
-
case 341:
|
|
24507
24535
|
case 340:
|
|
24508
|
-
case
|
|
24536
|
+
case 342:
|
|
24537
|
+
case 341:
|
|
24538
|
+
case 338:
|
|
24509
24539
|
return visitNode(cbNode, node.tagName) ||
|
|
24510
24540
|
visitNode(cbNode, node.typeExpression) ||
|
|
24511
24541
|
(typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24512
|
-
case
|
|
24542
|
+
case 322:
|
|
24513
24543
|
return ts.forEach(node.typeParameters, cbNode) ||
|
|
24514
24544
|
ts.forEach(node.parameters, cbNode) ||
|
|
24515
24545
|
visitNode(cbNode, node.type);
|
|
24516
|
-
case 322:
|
|
24517
24546
|
case 323:
|
|
24518
24547
|
case 324:
|
|
24548
|
+
case 325:
|
|
24519
24549
|
return visitNode(cbNode, node.name);
|
|
24520
|
-
case
|
|
24550
|
+
case 321:
|
|
24521
24551
|
return ts.forEach(node.jsDocPropertyTags, cbNode);
|
|
24522
|
-
case
|
|
24523
|
-
case 330:
|
|
24552
|
+
case 326:
|
|
24524
24553
|
case 331:
|
|
24525
24554
|
case 332:
|
|
24526
24555
|
case 333:
|
|
24527
24556
|
case 334:
|
|
24528
|
-
case
|
|
24557
|
+
case 335:
|
|
24558
|
+
case 330:
|
|
24529
24559
|
return visitNode(cbNode, node.tagName)
|
|
24530
24560
|
|| (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
|
|
24531
|
-
case
|
|
24561
|
+
case 349:
|
|
24532
24562
|
return visitNode(cbNode, node.expression);
|
|
24533
24563
|
}
|
|
24534
24564
|
}
|
|
@@ -25279,9 +25309,7 @@ var ts;
|
|
|
25279
25309
|
return;
|
|
25280
25310
|
}
|
|
25281
25311
|
if (initializer) {
|
|
25282
|
-
|
|
25283
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
|
|
25284
|
-
}
|
|
25312
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
|
|
25285
25313
|
return;
|
|
25286
25314
|
}
|
|
25287
25315
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -25863,7 +25891,7 @@ var ts;
|
|
|
25863
25891
|
return false;
|
|
25864
25892
|
}
|
|
25865
25893
|
function isReusableEnumMember(node) {
|
|
25866
|
-
return node.kind ===
|
|
25894
|
+
return node.kind === 298;
|
|
25867
25895
|
}
|
|
25868
25896
|
function isReusableTypeMember(node) {
|
|
25869
25897
|
if (node) {
|
|
@@ -26621,6 +26649,22 @@ var ts;
|
|
|
26621
26649
|
nextToken();
|
|
26622
26650
|
return token() === 100;
|
|
26623
26651
|
}
|
|
26652
|
+
function parseImportTypeAssertions() {
|
|
26653
|
+
var pos = getNodePos();
|
|
26654
|
+
var openBracePosition = scanner.getTokenPos();
|
|
26655
|
+
parseExpected(18);
|
|
26656
|
+
var multiLine = scanner.hasPrecedingLineBreak();
|
|
26657
|
+
parseExpected(129);
|
|
26658
|
+
parseExpected(58);
|
|
26659
|
+
var clause = parseAssertClause(true);
|
|
26660
|
+
if (!parseExpected(19)) {
|
|
26661
|
+
var lastError = ts.lastOrUndefined(parseDiagnostics);
|
|
26662
|
+
if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
|
|
26663
|
+
ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
|
|
26664
|
+
}
|
|
26665
|
+
}
|
|
26666
|
+
return finishNode(factory.createImportTypeAssertionContainer(clause, multiLine), pos);
|
|
26667
|
+
}
|
|
26624
26668
|
function parseImportType() {
|
|
26625
26669
|
sourceFlags |= 1048576;
|
|
26626
26670
|
var pos = getNodePos();
|
|
@@ -26628,10 +26672,14 @@ var ts;
|
|
|
26628
26672
|
parseExpected(100);
|
|
26629
26673
|
parseExpected(20);
|
|
26630
26674
|
var type = parseType();
|
|
26675
|
+
var assertions;
|
|
26676
|
+
if (parseOptional(27)) {
|
|
26677
|
+
assertions = parseImportTypeAssertions();
|
|
26678
|
+
}
|
|
26631
26679
|
parseExpected(21);
|
|
26632
26680
|
var qualifier = parseOptional(24) ? parseEntityNameOfTypeReference() : undefined;
|
|
26633
26681
|
var typeArguments = parseTypeArgumentsOfTypeReference();
|
|
26634
|
-
return finishNode(factory.createImportTypeNode(type, qualifier, typeArguments, isTypeOf), pos);
|
|
26682
|
+
return finishNode(factory.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos);
|
|
26635
26683
|
}
|
|
26636
26684
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
26637
26685
|
nextToken();
|
|
@@ -29214,9 +29262,11 @@ var ts;
|
|
|
29214
29262
|
var value = parseAssignmentExpressionOrHigher(false);
|
|
29215
29263
|
return finishNode(factory.createAssertEntry(name, value), pos);
|
|
29216
29264
|
}
|
|
29217
|
-
function parseAssertClause() {
|
|
29265
|
+
function parseAssertClause(skipAssertKeyword) {
|
|
29218
29266
|
var pos = getNodePos();
|
|
29219
|
-
|
|
29267
|
+
if (!skipAssertKeyword) {
|
|
29268
|
+
parseExpected(129);
|
|
29269
|
+
}
|
|
29220
29270
|
var openBracePosition = scanner.getTokenPos();
|
|
29221
29271
|
if (parseExpected(18)) {
|
|
29222
29272
|
var multiLine = scanner.hasPrecedingLineBreak();
|
|
@@ -29976,7 +30026,7 @@ var ts;
|
|
|
29976
30026
|
var child = void 0;
|
|
29977
30027
|
var children = void 0;
|
|
29978
30028
|
while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) {
|
|
29979
|
-
if (child.kind ===
|
|
30029
|
+
if (child.kind === 339 || child.kind === 346) {
|
|
29980
30030
|
children = ts.append(children, child);
|
|
29981
30031
|
}
|
|
29982
30032
|
}
|
|
@@ -30099,7 +30149,7 @@ var ts;
|
|
|
30099
30149
|
var hasChildren = false;
|
|
30100
30150
|
while (child = tryParse(function () { return parseChildPropertyTag(indent); })) {
|
|
30101
30151
|
hasChildren = true;
|
|
30102
|
-
if (child.kind ===
|
|
30152
|
+
if (child.kind === 342) {
|
|
30103
30153
|
if (childTypeTag) {
|
|
30104
30154
|
parseErrorAtCurrentToken(ts.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
|
30105
30155
|
var lastError = ts.lastOrUndefined(parseDiagnostics);
|
|
@@ -30167,7 +30217,7 @@ var ts;
|
|
|
30167
30217
|
var returnTag = tryParse(function () {
|
|
30168
30218
|
if (parseOptionalJsdoc(59)) {
|
|
30169
30219
|
var tag = parseTag(indent);
|
|
30170
|
-
if (tag && tag.kind ===
|
|
30220
|
+
if (tag && tag.kind === 340) {
|
|
30171
30221
|
return tag;
|
|
30172
30222
|
}
|
|
30173
30223
|
}
|
|
@@ -30201,7 +30251,7 @@ var ts;
|
|
|
30201
30251
|
case 59:
|
|
30202
30252
|
if (canParseTag) {
|
|
30203
30253
|
var child = tryParseChildTag(target, indent);
|
|
30204
|
-
if (child && (child.kind ===
|
|
30254
|
+
if (child && (child.kind === 339 || child.kind === 346) &&
|
|
30205
30255
|
target !== 4 &&
|
|
30206
30256
|
name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
|
|
30207
30257
|
return false;
|
|
@@ -30944,11 +30994,13 @@ var ts;
|
|
|
30944
30994
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
30945
30995
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
30946
30996
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
30997
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
30947
30998
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
30948
30999
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
30949
31000
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
30950
31001
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
30951
31002
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
31003
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
30952
31004
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
30953
31005
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
30954
31006
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -32628,7 +32680,7 @@ var ts;
|
|
|
32628
32680
|
function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) {
|
|
32629
32681
|
var result = returnValue ? {} : undefined;
|
|
32630
32682
|
var _loop_4 = function (element) {
|
|
32631
|
-
if (element.kind !==
|
|
32683
|
+
if (element.kind !== 295) {
|
|
32632
32684
|
errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element, ts.Diagnostics.Property_assignment_expected));
|
|
32633
32685
|
return "continue";
|
|
32634
32686
|
}
|
|
@@ -33959,6 +34011,7 @@ var ts;
|
|
|
33959
34011
|
return ts.comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0;
|
|
33960
34012
|
}
|
|
33961
34013
|
function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache, resolutionMode) {
|
|
34014
|
+
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
34015
|
var traceEnabled = isTraceEnabled(options, host);
|
|
33963
34016
|
if (redirectedReference) {
|
|
33964
34017
|
options = redirectedReference.commandLine.options;
|
|
@@ -35787,7 +35840,7 @@ var ts;
|
|
|
35787
35840
|
return "__constructor";
|
|
35788
35841
|
case 178:
|
|
35789
35842
|
case 173:
|
|
35790
|
-
case
|
|
35843
|
+
case 322:
|
|
35791
35844
|
return "__call";
|
|
35792
35845
|
case 179:
|
|
35793
35846
|
case 174:
|
|
@@ -35796,7 +35849,7 @@ var ts;
|
|
|
35796
35849
|
return "__index";
|
|
35797
35850
|
case 271:
|
|
35798
35851
|
return "__export";
|
|
35799
|
-
case
|
|
35852
|
+
case 304:
|
|
35800
35853
|
return "export=";
|
|
35801
35854
|
case 220:
|
|
35802
35855
|
if (ts.getAssignmentDeclarationKind(node) === 2) {
|
|
@@ -35804,10 +35857,10 @@ var ts;
|
|
|
35804
35857
|
}
|
|
35805
35858
|
ts.Debug.fail("Unknown binary declaration kind");
|
|
35806
35859
|
break;
|
|
35807
|
-
case
|
|
35860
|
+
case 316:
|
|
35808
35861
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
35809
35862
|
case 163:
|
|
35810
|
-
ts.Debug.assert(node.parent.kind ===
|
|
35863
|
+
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
35864
|
var functionType = node.parent;
|
|
35812
35865
|
var index = functionType.parameters.indexOf(node);
|
|
35813
35866
|
return "arg" + index;
|
|
@@ -35992,7 +36045,7 @@ var ts;
|
|
|
35992
36045
|
node.flags |= 512;
|
|
35993
36046
|
node.endFlowNode = currentFlow;
|
|
35994
36047
|
}
|
|
35995
|
-
if (node.kind ===
|
|
36048
|
+
if (node.kind === 304) {
|
|
35996
36049
|
node.flags |= emitFlags;
|
|
35997
36050
|
node.endFlowNode = currentFlow;
|
|
35998
36051
|
}
|
|
@@ -36127,12 +36180,12 @@ var ts;
|
|
|
36127
36180
|
case 229:
|
|
36128
36181
|
bindNonNullExpressionFlow(node);
|
|
36129
36182
|
break;
|
|
36130
|
-
case
|
|
36131
|
-
case 336:
|
|
36183
|
+
case 344:
|
|
36132
36184
|
case 337:
|
|
36185
|
+
case 338:
|
|
36133
36186
|
bindJSDocTypeAlias(node);
|
|
36134
36187
|
break;
|
|
36135
|
-
case
|
|
36188
|
+
case 304: {
|
|
36136
36189
|
bindEachFunctionsFirst(node.statements);
|
|
36137
36190
|
bind(node.endOfFileToken);
|
|
36138
36191
|
break;
|
|
@@ -36146,7 +36199,7 @@ var ts;
|
|
|
36146
36199
|
break;
|
|
36147
36200
|
case 204:
|
|
36148
36201
|
case 203:
|
|
36149
|
-
case
|
|
36202
|
+
case 295:
|
|
36150
36203
|
case 224:
|
|
36151
36204
|
inAssignmentPattern = saveInAssignmentPattern;
|
|
36152
36205
|
default:
|
|
@@ -36635,13 +36688,13 @@ var ts;
|
|
|
36635
36688
|
else if (node.kind === 204) {
|
|
36636
36689
|
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
|
|
36637
36690
|
var p = _c[_b];
|
|
36638
|
-
if (p.kind ===
|
|
36691
|
+
if (p.kind === 295) {
|
|
36639
36692
|
bindDestructuringTargetFlow(p.initializer);
|
|
36640
36693
|
}
|
|
36641
|
-
else if (p.kind ===
|
|
36694
|
+
else if (p.kind === 296) {
|
|
36642
36695
|
bindAssignmentTargetFlow(p.name);
|
|
36643
36696
|
}
|
|
36644
|
-
else if (p.kind ===
|
|
36697
|
+
else if (p.kind === 297) {
|
|
36645
36698
|
bindAssignmentTargetFlow(p.expression);
|
|
36646
36699
|
}
|
|
36647
36700
|
}
|
|
@@ -36853,7 +36906,7 @@ var ts;
|
|
|
36853
36906
|
}
|
|
36854
36907
|
function bindJSDocTypeAlias(node) {
|
|
36855
36908
|
bind(node.tagName);
|
|
36856
|
-
if (node.kind !==
|
|
36909
|
+
if (node.kind !== 338 && node.fullName) {
|
|
36857
36910
|
ts.setParent(node.fullName, node);
|
|
36858
36911
|
ts.setParentRecursive(node.fullName, false);
|
|
36859
36912
|
}
|
|
@@ -36962,7 +37015,7 @@ var ts;
|
|
|
36962
37015
|
case 259:
|
|
36963
37016
|
case 204:
|
|
36964
37017
|
case 181:
|
|
36965
|
-
case
|
|
37018
|
+
case 321:
|
|
36966
37019
|
case 285:
|
|
36967
37020
|
return 1;
|
|
36968
37021
|
case 257:
|
|
@@ -36971,7 +37024,7 @@ var ts;
|
|
|
36971
37024
|
case 258:
|
|
36972
37025
|
case 194:
|
|
36973
37026
|
return 1 | 32;
|
|
36974
|
-
case
|
|
37027
|
+
case 304:
|
|
36975
37028
|
return 1 | 4 | 32;
|
|
36976
37029
|
case 171:
|
|
36977
37030
|
case 172:
|
|
@@ -36983,8 +37036,8 @@ var ts;
|
|
|
36983
37036
|
case 255:
|
|
36984
37037
|
case 167:
|
|
36985
37038
|
case 173:
|
|
36986
|
-
case
|
|
36987
|
-
case
|
|
37039
|
+
case 322:
|
|
37040
|
+
case 316:
|
|
36988
37041
|
case 178:
|
|
36989
37042
|
case 174:
|
|
36990
37043
|
case 175:
|
|
@@ -37019,7 +37072,7 @@ var ts;
|
|
|
37019
37072
|
switch (container.kind) {
|
|
37020
37073
|
case 260:
|
|
37021
37074
|
return declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37022
|
-
case
|
|
37075
|
+
case 304:
|
|
37023
37076
|
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
|
|
37024
37077
|
case 225:
|
|
37025
37078
|
case 256:
|
|
@@ -37027,7 +37080,7 @@ var ts;
|
|
|
37027
37080
|
case 259:
|
|
37028
37081
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
37029
37082
|
case 181:
|
|
37030
|
-
case
|
|
37083
|
+
case 321:
|
|
37031
37084
|
case 204:
|
|
37032
37085
|
case 257:
|
|
37033
37086
|
case 285:
|
|
@@ -37036,7 +37089,7 @@ var ts;
|
|
|
37036
37089
|
case 179:
|
|
37037
37090
|
case 173:
|
|
37038
37091
|
case 174:
|
|
37039
|
-
case
|
|
37092
|
+
case 322:
|
|
37040
37093
|
case 175:
|
|
37041
37094
|
case 168:
|
|
37042
37095
|
case 167:
|
|
@@ -37046,9 +37099,9 @@ var ts;
|
|
|
37046
37099
|
case 255:
|
|
37047
37100
|
case 212:
|
|
37048
37101
|
case 213:
|
|
37049
|
-
case
|
|
37050
|
-
case
|
|
37051
|
-
case
|
|
37102
|
+
case 316:
|
|
37103
|
+
case 344:
|
|
37104
|
+
case 337:
|
|
37052
37105
|
case 169:
|
|
37053
37106
|
case 258:
|
|
37054
37107
|
case 194:
|
|
@@ -37128,11 +37181,11 @@ var ts;
|
|
|
37128
37181
|
var seen = new ts.Map();
|
|
37129
37182
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
37130
37183
|
var prop = _a[_i];
|
|
37131
|
-
if (prop.kind ===
|
|
37184
|
+
if (prop.kind === 297 || prop.name.kind !== 79) {
|
|
37132
37185
|
continue;
|
|
37133
37186
|
}
|
|
37134
37187
|
var identifier = prop.name;
|
|
37135
|
-
var currentKind = prop.kind ===
|
|
37188
|
+
var currentKind = prop.kind === 295 || prop.kind === 296 || prop.kind === 168
|
|
37136
37189
|
? 1
|
|
37137
37190
|
: 2;
|
|
37138
37191
|
var existingKind = seen.get(identifier.escapedText);
|
|
@@ -37163,7 +37216,7 @@ var ts;
|
|
|
37163
37216
|
case 260:
|
|
37164
37217
|
declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37165
37218
|
break;
|
|
37166
|
-
case
|
|
37219
|
+
case 304:
|
|
37167
37220
|
if (ts.isExternalOrCommonJsModule(container)) {
|
|
37168
37221
|
declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37169
37222
|
break;
|
|
@@ -37335,7 +37388,7 @@ var ts;
|
|
|
37335
37388
|
}
|
|
37336
37389
|
function checkStrictModeFunctionDeclaration(node) {
|
|
37337
37390
|
if (languageVersion < 2) {
|
|
37338
|
-
if (blockScopeContainer.kind !==
|
|
37391
|
+
if (blockScopeContainer.kind !== 304 &&
|
|
37339
37392
|
blockScopeContainer.kind !== 260 &&
|
|
37340
37393
|
!ts.isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) {
|
|
37341
37394
|
var errorSpan = ts.getErrorSpanForNode(file, node);
|
|
@@ -37468,7 +37521,7 @@ var ts;
|
|
|
37468
37521
|
break;
|
|
37469
37522
|
}
|
|
37470
37523
|
case 108:
|
|
37471
|
-
if (currentFlow && (ts.isExpression(node) || parent.kind ===
|
|
37524
|
+
if (currentFlow && (ts.isExpression(node) || parent.kind === 296)) {
|
|
37472
37525
|
node.flowNode = currentFlow;
|
|
37473
37526
|
}
|
|
37474
37527
|
return checkContextualIdentifier(node);
|
|
@@ -37565,10 +37618,10 @@ var ts;
|
|
|
37565
37618
|
case 166:
|
|
37566
37619
|
case 165:
|
|
37567
37620
|
return bindPropertyWorker(node);
|
|
37568
|
-
case 294:
|
|
37569
37621
|
case 295:
|
|
37622
|
+
case 296:
|
|
37570
37623
|
return bindPropertyOrMethodOrAccessor(node, 4, 0);
|
|
37571
|
-
case
|
|
37624
|
+
case 298:
|
|
37572
37625
|
return bindPropertyOrMethodOrAccessor(node, 8, 900095);
|
|
37573
37626
|
case 173:
|
|
37574
37627
|
case 174:
|
|
@@ -37586,15 +37639,15 @@ var ts;
|
|
|
37586
37639
|
case 172:
|
|
37587
37640
|
return bindPropertyOrMethodOrAccessor(node, 65536, 78783);
|
|
37588
37641
|
case 178:
|
|
37589
|
-
case
|
|
37590
|
-
case
|
|
37642
|
+
case 316:
|
|
37643
|
+
case 322:
|
|
37591
37644
|
case 179:
|
|
37592
37645
|
return bindFunctionOrConstructorType(node);
|
|
37593
37646
|
case 181:
|
|
37594
|
-
case
|
|
37647
|
+
case 321:
|
|
37595
37648
|
case 194:
|
|
37596
37649
|
return bindAnonymousTypeWorker(node);
|
|
37597
|
-
case
|
|
37650
|
+
case 331:
|
|
37598
37651
|
return bindJSDocClassTag(node);
|
|
37599
37652
|
case 204:
|
|
37600
37653
|
return bindObjectLiteralExpression(node);
|
|
@@ -37648,7 +37701,7 @@ var ts;
|
|
|
37648
37701
|
return bindExportDeclaration(node);
|
|
37649
37702
|
case 270:
|
|
37650
37703
|
return bindExportAssignment(node);
|
|
37651
|
-
case
|
|
37704
|
+
case 304:
|
|
37652
37705
|
updateStrictModeStatementList(node.statements);
|
|
37653
37706
|
return bindSourceFileIfExternalModule();
|
|
37654
37707
|
case 234:
|
|
@@ -37657,22 +37710,22 @@ var ts;
|
|
|
37657
37710
|
}
|
|
37658
37711
|
case 261:
|
|
37659
37712
|
return updateStrictModeStatementList(node.statements);
|
|
37660
|
-
case
|
|
37661
|
-
if (node.parent.kind ===
|
|
37713
|
+
case 339:
|
|
37714
|
+
if (node.parent.kind === 322) {
|
|
37662
37715
|
return bindParameter(node);
|
|
37663
37716
|
}
|
|
37664
|
-
if (node.parent.kind !==
|
|
37717
|
+
if (node.parent.kind !== 321) {
|
|
37665
37718
|
break;
|
|
37666
37719
|
}
|
|
37667
|
-
case
|
|
37720
|
+
case 346:
|
|
37668
37721
|
var propTag = node;
|
|
37669
|
-
var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind ===
|
|
37722
|
+
var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 315 ?
|
|
37670
37723
|
4 | 16777216 :
|
|
37671
37724
|
4;
|
|
37672
37725
|
return declareSymbolAndAddToSymbolTable(propTag, flags, 0);
|
|
37673
|
-
case
|
|
37674
|
-
case 336:
|
|
37726
|
+
case 344:
|
|
37675
37727
|
case 337:
|
|
37728
|
+
case 338:
|
|
37676
37729
|
return (delayedTypeAliases || (delayedTypeAliases = [])).push(node);
|
|
37677
37730
|
}
|
|
37678
37731
|
}
|
|
@@ -37851,7 +37904,7 @@ var ts;
|
|
|
37851
37904
|
declareSymbol(symbolTable, containingClass.symbol, node, 4 | 67108864, 0, true);
|
|
37852
37905
|
}
|
|
37853
37906
|
break;
|
|
37854
|
-
case
|
|
37907
|
+
case 304:
|
|
37855
37908
|
if (ts.hasDynamicName(node)) {
|
|
37856
37909
|
break;
|
|
37857
37910
|
}
|
|
@@ -37879,7 +37932,7 @@ var ts;
|
|
|
37879
37932
|
if (node.expression.kind === 108) {
|
|
37880
37933
|
bindThisPropertyAssignment(node);
|
|
37881
37934
|
}
|
|
37882
|
-
else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind ===
|
|
37935
|
+
else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 304) {
|
|
37883
37936
|
if (ts.isPrototypeAccess(node.expression)) {
|
|
37884
37937
|
bindPrototypePropertyAssignment(node, node.parent);
|
|
37885
37938
|
}
|
|
@@ -37910,7 +37963,7 @@ var ts;
|
|
|
37910
37963
|
}
|
|
37911
37964
|
function bindObjectDefinePropertyAssignment(node) {
|
|
37912
37965
|
var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]);
|
|
37913
|
-
var isToplevel = node.parent.parent.kind ===
|
|
37966
|
+
var isToplevel = node.parent.parent.kind === 304;
|
|
37914
37967
|
namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false);
|
|
37915
37968
|
bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false);
|
|
37916
37969
|
}
|
|
@@ -38004,8 +38057,8 @@ var ts;
|
|
|
38004
38057
|
}
|
|
38005
38058
|
function isTopLevelNamespaceAssignment(propertyAccess) {
|
|
38006
38059
|
return ts.isBinaryExpression(propertyAccess.parent)
|
|
38007
|
-
? getParentOfBinaryExpression(propertyAccess.parent).parent.kind ===
|
|
38008
|
-
: propertyAccess.parent.parent.kind ===
|
|
38060
|
+
? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 304
|
|
38061
|
+
: propertyAccess.parent.parent.kind === 304;
|
|
38009
38062
|
}
|
|
38010
38063
|
function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
|
|
38011
38064
|
var namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
|
|
@@ -38118,7 +38171,7 @@ var ts;
|
|
|
38118
38171
|
}
|
|
38119
38172
|
}
|
|
38120
38173
|
function bindParameter(node) {
|
|
38121
|
-
if (node.kind ===
|
|
38174
|
+
if (node.kind === 339 && container.kind !== 322) {
|
|
38122
38175
|
return;
|
|
38123
38176
|
}
|
|
38124
38177
|
if (inStrictMode && !(node.flags & 8388608)) {
|
|
@@ -39553,7 +39606,7 @@ var ts;
|
|
|
39553
39606
|
return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
|
|
39554
39607
|
}
|
|
39555
39608
|
function isGlobalSourceFile(node) {
|
|
39556
|
-
return node.kind ===
|
|
39609
|
+
return node.kind === 304 && !ts.isExternalOrCommonJsModule(node);
|
|
39557
39610
|
}
|
|
39558
39611
|
function getSymbol(symbols, name, meaning) {
|
|
39559
39612
|
if (meaning) {
|
|
@@ -39764,7 +39817,7 @@ var ts;
|
|
|
39764
39817
|
case 168:
|
|
39765
39818
|
case 171:
|
|
39766
39819
|
case 172:
|
|
39767
|
-
case
|
|
39820
|
+
case 295:
|
|
39768
39821
|
return requiresScopeChangeWorker(node.name);
|
|
39769
39822
|
case 166:
|
|
39770
39823
|
if (ts.hasStaticModifier(node)) {
|
|
@@ -39806,12 +39859,12 @@ var ts;
|
|
|
39806
39859
|
if (result = lookup(location.locals, name, meaning)) {
|
|
39807
39860
|
var useResult = true;
|
|
39808
39861
|
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
|
|
39809
|
-
if (meaning & result.flags & 788968 && lastLocation.kind !==
|
|
39862
|
+
if (meaning & result.flags & 788968 && lastLocation.kind !== 319) {
|
|
39810
39863
|
useResult = result.flags & 262144
|
|
39811
39864
|
? lastLocation === location.type ||
|
|
39812
39865
|
lastLocation.kind === 163 ||
|
|
39813
|
-
lastLocation.kind === 338 ||
|
|
39814
39866
|
lastLocation.kind === 339 ||
|
|
39867
|
+
lastLocation.kind === 340 ||
|
|
39815
39868
|
lastLocation.kind === 162
|
|
39816
39869
|
: false;
|
|
39817
39870
|
}
|
|
@@ -39840,13 +39893,13 @@ var ts;
|
|
|
39840
39893
|
}
|
|
39841
39894
|
withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation);
|
|
39842
39895
|
switch (location.kind) {
|
|
39843
|
-
case
|
|
39896
|
+
case 304:
|
|
39844
39897
|
if (!ts.isExternalOrCommonJsModule(location))
|
|
39845
39898
|
break;
|
|
39846
39899
|
isInExternalModule = true;
|
|
39847
39900
|
case 260:
|
|
39848
39901
|
var moduleExports = ((_a = getSymbolOfNode(location)) === null || _a === void 0 ? void 0 : _a.exports) || emptySymbols;
|
|
39849
|
-
if (location.kind ===
|
|
39902
|
+
if (location.kind === 304 || (ts.isModuleDeclaration(location) && location.flags & 8388608 && !ts.isGlobalScopeAugmentation(location))) {
|
|
39850
39903
|
if (result = moduleExports.get("default")) {
|
|
39851
39904
|
var localSymbol = ts.getLocalSymbolForExportDefault(result);
|
|
39852
39905
|
if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) {
|
|
@@ -39962,9 +40015,9 @@ var ts;
|
|
|
39962
40015
|
location = location.parent;
|
|
39963
40016
|
}
|
|
39964
40017
|
break;
|
|
39965
|
-
case
|
|
39966
|
-
case 336:
|
|
40018
|
+
case 344:
|
|
39967
40019
|
case 337:
|
|
40020
|
+
case 338:
|
|
39968
40021
|
var root = ts.getJSDocRoot(location);
|
|
39969
40022
|
if (root) {
|
|
39970
40023
|
location = root.parent;
|
|
@@ -40009,7 +40062,7 @@ var ts;
|
|
|
40009
40062
|
}
|
|
40010
40063
|
if (!result) {
|
|
40011
40064
|
if (lastLocation) {
|
|
40012
|
-
ts.Debug.assert(lastLocation.kind ===
|
|
40065
|
+
ts.Debug.assert(lastLocation.kind === 304);
|
|
40013
40066
|
if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) {
|
|
40014
40067
|
return lastLocation.symbol;
|
|
40015
40068
|
}
|
|
@@ -40383,8 +40436,8 @@ var ts;
|
|
|
40383
40436
|
&& node.parent.left === node
|
|
40384
40437
|
&& node.parent.operatorToken.kind === 63
|
|
40385
40438
|
&& isAliasableOrJsExpression(node.parent.right)
|
|
40386
|
-
|| node.kind ===
|
|
40387
|
-
|| node.kind ===
|
|
40439
|
+
|| node.kind === 296
|
|
40440
|
+
|| node.kind === 295 && isAliasableOrJsExpression(node.initializer)
|
|
40388
40441
|
|| ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
|
|
40389
40442
|
}
|
|
40390
40443
|
function isAliasableOrJsExpression(e) {
|
|
@@ -40755,9 +40808,9 @@ var ts;
|
|
|
40755
40808
|
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
|
|
40756
40809
|
case 263:
|
|
40757
40810
|
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
|
|
40758
|
-
case
|
|
40811
|
+
case 296:
|
|
40759
40812
|
return resolveEntityName(node.name, 111551 | 788968 | 1920, true, dontRecursivelyResolve);
|
|
40760
|
-
case
|
|
40813
|
+
case 295:
|
|
40761
40814
|
return getTargetOfPropertyAssignment(node, dontRecursivelyResolve);
|
|
40762
40815
|
case 206:
|
|
40763
40816
|
case 205:
|
|
@@ -41057,7 +41110,7 @@ var ts;
|
|
|
41057
41110
|
: undefined;
|
|
41058
41111
|
}
|
|
41059
41112
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation) {
|
|
41060
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
41113
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41061
41114
|
if (isForAugmentation === void 0) { isForAugmentation = false; }
|
|
41062
41115
|
if (ts.startsWith(moduleReference, "@types/")) {
|
|
41063
41116
|
var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
@@ -41093,7 +41146,9 @@ var ts;
|
|
|
41093
41146
|
}
|
|
41094
41147
|
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
41095
41148
|
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
41096
|
-
|
|
41149
|
+
var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
|
|
41150
|
+
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;
|
|
41151
|
+
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
|
|
41097
41152
|
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);
|
|
41098
41153
|
}
|
|
41099
41154
|
if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
|
|
@@ -41161,10 +41216,10 @@ var ts;
|
|
|
41161
41216
|
}
|
|
41162
41217
|
else if (mode === ts.ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) {
|
|
41163
41218
|
var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
|
|
41164
|
-
var suggestedExt = (
|
|
41219
|
+
var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
|
|
41165
41220
|
var actualExt = _a[0], _importExt = _a[1];
|
|
41166
41221
|
return host.fileExists(absoluteRef_1 + actualExt);
|
|
41167
|
-
})) === null ||
|
|
41222
|
+
})) === null || _h === void 0 ? void 0 : _h[1];
|
|
41168
41223
|
if (suggestedExt) {
|
|
41169
41224
|
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);
|
|
41170
41225
|
}
|
|
@@ -41226,9 +41281,10 @@ var ts;
|
|
|
41226
41281
|
return links.cjsExportMerged = merged;
|
|
41227
41282
|
}
|
|
41228
41283
|
function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {
|
|
41284
|
+
var _a;
|
|
41229
41285
|
var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
|
|
41230
41286
|
if (!dontResolveAlias && symbol) {
|
|
41231
|
-
if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol,
|
|
41287
|
+
if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol, 304)) {
|
|
41232
41288
|
var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015
|
|
41233
41289
|
? "allowSyntheticDefaultImports"
|
|
41234
41290
|
: "esModuleInterop";
|
|
@@ -41244,12 +41300,16 @@ var ts;
|
|
|
41244
41300
|
if (defaultOnlyType) {
|
|
41245
41301
|
return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);
|
|
41246
41302
|
}
|
|
41247
|
-
|
|
41303
|
+
var targetFile = (_a = moduleSymbol === null || moduleSymbol === void 0 ? void 0 : moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
|
|
41304
|
+
var isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat);
|
|
41305
|
+
if (ts.getESModuleInterop(compilerOptions) || isEsmCjsRef) {
|
|
41248
41306
|
var sigs = getSignaturesOfStructuredType(type, 0);
|
|
41249
41307
|
if (!sigs || !sigs.length) {
|
|
41250
41308
|
sigs = getSignaturesOfStructuredType(type, 1);
|
|
41251
41309
|
}
|
|
41252
|
-
if ((sigs && sigs.length) ||
|
|
41310
|
+
if ((sigs && sigs.length) ||
|
|
41311
|
+
getPropertyOfType(type, "default", true) ||
|
|
41312
|
+
isEsmCjsRef) {
|
|
41253
41313
|
var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
41254
41314
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
41255
41315
|
}
|
|
@@ -41660,7 +41720,7 @@ var ts;
|
|
|
41660
41720
|
}
|
|
41661
41721
|
}
|
|
41662
41722
|
switch (location.kind) {
|
|
41663
|
-
case
|
|
41723
|
+
case 304:
|
|
41664
41724
|
if (!ts.isExternalOrCommonJsModule(location)) {
|
|
41665
41725
|
break;
|
|
41666
41726
|
}
|
|
@@ -41896,10 +41956,10 @@ var ts;
|
|
|
41896
41956
|
return node && getSymbolOfNode(node);
|
|
41897
41957
|
}
|
|
41898
41958
|
function hasExternalModuleSymbol(declaration) {
|
|
41899
|
-
return ts.isAmbientModule(declaration) || (declaration.kind ===
|
|
41959
|
+
return ts.isAmbientModule(declaration) || (declaration.kind === 304 && ts.isExternalOrCommonJsModule(declaration));
|
|
41900
41960
|
}
|
|
41901
41961
|
function hasNonGlobalAugmentationExternalModuleSymbol(declaration) {
|
|
41902
|
-
return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind ===
|
|
41962
|
+
return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 304 && ts.isExternalOrCommonJsModule(declaration));
|
|
41903
41963
|
}
|
|
41904
41964
|
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
|
|
41905
41965
|
var aliasesToMakeVisible;
|
|
@@ -41990,7 +42050,7 @@ var ts;
|
|
|
41990
42050
|
return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
|
|
41991
42051
|
function symbolToStringWorker(writer) {
|
|
41992
42052
|
var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
41993
|
-
var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) ===
|
|
42053
|
+
var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 304 ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
|
|
41994
42054
|
var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
|
|
41995
42055
|
printer.writeNode(4, entity, sourceFile, writer);
|
|
41996
42056
|
return writer;
|
|
@@ -42448,7 +42508,7 @@ var ts;
|
|
|
42448
42508
|
var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
|
|
42449
42509
|
(symbol.parent ||
|
|
42450
42510
|
ts.forEach(symbol.declarations, function (declaration) {
|
|
42451
|
-
return declaration.parent.kind ===
|
|
42511
|
+
return declaration.parent.kind === 304 || declaration.parent.kind === 261;
|
|
42452
42512
|
}));
|
|
42453
42513
|
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
|
|
42454
42514
|
return (!!(context.flags & 4096) || ((_a = context.visitedTypes) === null || _a === void 0 ? void 0 : _a.has(typeId))) &&
|
|
@@ -42812,8 +42872,8 @@ var ts;
|
|
|
42812
42872
|
}
|
|
42813
42873
|
function preserveCommentsOn(node) {
|
|
42814
42874
|
var _a;
|
|
42815
|
-
if (ts.some(propertySymbol.declarations, function (d) { return d.kind ===
|
|
42816
|
-
var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind ===
|
|
42875
|
+
if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 346; })) {
|
|
42876
|
+
var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 346; });
|
|
42817
42877
|
var commentText = ts.getTextOfJSDocComment(d.comment);
|
|
42818
42878
|
if (commentText) {
|
|
42819
42879
|
ts.setSyntheticLeadingComments(node, [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
@@ -42955,7 +43015,7 @@ var ts;
|
|
|
42955
43015
|
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) :
|
|
42956
43016
|
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) :
|
|
42957
43017
|
kind === 175 ? ts.factory.createIndexSignature(undefined, modifiers, parameters, returnTypeNode) :
|
|
42958
|
-
kind ===
|
|
43018
|
+
kind === 316 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
|
|
42959
43019
|
kind === 178 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
42960
43020
|
kind === 179 ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
42961
43021
|
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) :
|
|
@@ -42995,7 +43055,7 @@ var ts;
|
|
|
42995
43055
|
function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
|
|
42996
43056
|
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 163);
|
|
42997
43057
|
if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) {
|
|
42998
|
-
parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol,
|
|
43058
|
+
parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 339);
|
|
42999
43059
|
}
|
|
43000
43060
|
var parameterType = getTypeOfSymbol(parameterSymbol);
|
|
43001
43061
|
if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
|
|
@@ -43154,13 +43214,13 @@ var ts;
|
|
|
43154
43214
|
}
|
|
43155
43215
|
return top;
|
|
43156
43216
|
}
|
|
43157
|
-
function getSpecifierForModuleSymbol(symbol, context) {
|
|
43217
|
+
function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) {
|
|
43158
43218
|
var _a;
|
|
43159
|
-
var file = ts.getDeclarationOfKind(symbol,
|
|
43219
|
+
var file = ts.getDeclarationOfKind(symbol, 304);
|
|
43160
43220
|
if (!file) {
|
|
43161
43221
|
var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); });
|
|
43162
43222
|
if (equivalentFileSymbol) {
|
|
43163
|
-
file = ts.getDeclarationOfKind(equivalentFileSymbol,
|
|
43223
|
+
file = ts.getDeclarationOfKind(equivalentFileSymbol, 304);
|
|
43164
43224
|
}
|
|
43165
43225
|
}
|
|
43166
43226
|
if (file && file.moduleName !== undefined) {
|
|
@@ -43187,17 +43247,27 @@ var ts;
|
|
|
43187
43247
|
return ts.getSourceFileOfNode(ts.getNonAugmentationDeclaration(symbol)).fileName;
|
|
43188
43248
|
}
|
|
43189
43249
|
var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
|
|
43250
|
+
var resolutionMode = overrideImportMode || (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat);
|
|
43251
|
+
var cacheKey = getSpecifierCacheKey(contextFile.path, resolutionMode);
|
|
43190
43252
|
var links = getSymbolLinks(symbol);
|
|
43191
|
-
var specifier = links.specifierCache && links.specifierCache.get(
|
|
43253
|
+
var specifier = links.specifierCache && links.specifierCache.get(cacheKey);
|
|
43192
43254
|
if (!specifier) {
|
|
43193
43255
|
var isBundle_1 = !!ts.outFile(compilerOptions);
|
|
43194
43256
|
var moduleResolverHost = context.tracker.moduleResolverHost;
|
|
43195
43257
|
var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions;
|
|
43196
|
-
specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
43258
|
+
specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
43259
|
+
importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "project-relative",
|
|
43260
|
+
importModuleSpecifierEnding: isBundle_1 ? "minimal"
|
|
43261
|
+
: resolutionMode === ts.ModuleKind.ESNext ? "js"
|
|
43262
|
+
: undefined,
|
|
43263
|
+
}, { overrideImportMode: overrideImportMode }));
|
|
43197
43264
|
(_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map());
|
|
43198
|
-
links.specifierCache.set(
|
|
43265
|
+
links.specifierCache.set(cacheKey, specifier);
|
|
43199
43266
|
}
|
|
43200
43267
|
return specifier;
|
|
43268
|
+
function getSpecifierCacheKey(path, mode) {
|
|
43269
|
+
return mode === undefined ? path : mode + "|" + path;
|
|
43270
|
+
}
|
|
43201
43271
|
}
|
|
43202
43272
|
function symbolToEntityNameNode(symbol) {
|
|
43203
43273
|
var identifier = ts.factory.createIdentifier(ts.unescapeLeadingUnderscores(symbol.escapedName));
|
|
@@ -43209,11 +43279,40 @@ var ts;
|
|
|
43209
43279
|
if (ts.some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
43210
43280
|
var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined;
|
|
43211
43281
|
var typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);
|
|
43212
|
-
var
|
|
43282
|
+
var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
|
|
43283
|
+
var targetFile = ts.getSourceFileOfModule(chain[0]);
|
|
43284
|
+
var specifier = void 0;
|
|
43285
|
+
var assertion = void 0;
|
|
43286
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43287
|
+
if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
|
|
43288
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
|
|
43289
|
+
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
43290
|
+
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral("import"))
|
|
43291
|
+
])));
|
|
43292
|
+
}
|
|
43293
|
+
}
|
|
43294
|
+
if (!specifier) {
|
|
43295
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context);
|
|
43296
|
+
}
|
|
43213
43297
|
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
|
|
43214
|
-
|
|
43215
|
-
if (
|
|
43216
|
-
|
|
43298
|
+
var oldSpecifier = specifier;
|
|
43299
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43300
|
+
var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
43301
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
43302
|
+
if (specifier.indexOf("/node_modules/") >= 0) {
|
|
43303
|
+
specifier = oldSpecifier;
|
|
43304
|
+
}
|
|
43305
|
+
else {
|
|
43306
|
+
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
43307
|
+
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral(swappedMode === ts.ModuleKind.ESNext ? "import" : "require"))
|
|
43308
|
+
])));
|
|
43309
|
+
}
|
|
43310
|
+
}
|
|
43311
|
+
if (!assertion) {
|
|
43312
|
+
context.encounteredError = true;
|
|
43313
|
+
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
43314
|
+
context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
|
|
43315
|
+
}
|
|
43217
43316
|
}
|
|
43218
43317
|
}
|
|
43219
43318
|
var lit = ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(specifier));
|
|
@@ -43225,12 +43324,12 @@ var ts;
|
|
|
43225
43324
|
var lastId = ts.isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
43226
43325
|
lastId.typeArguments = undefined;
|
|
43227
43326
|
}
|
|
43228
|
-
return ts.factory.createImportTypeNode(lit, nonRootParts, typeParameterNodes, isTypeOf);
|
|
43327
|
+
return ts.factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
43229
43328
|
}
|
|
43230
43329
|
else {
|
|
43231
43330
|
var splitNode = getTopmostIndexedAccessType(nonRootParts);
|
|
43232
43331
|
var qualifier = splitNode.objectType.typeName;
|
|
43233
|
-
return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
43332
|
+
return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
43234
43333
|
}
|
|
43235
43334
|
}
|
|
43236
43335
|
var entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
|
|
@@ -43534,7 +43633,7 @@ var ts;
|
|
|
43534
43633
|
}
|
|
43535
43634
|
return transformed === existing ? ts.setTextRange(ts.factory.cloneNode(existing), existing) : transformed;
|
|
43536
43635
|
function visitExistingNodeTreeSymbols(node) {
|
|
43537
|
-
if (ts.isJSDocAllType(node) || node.kind ===
|
|
43636
|
+
if (ts.isJSDocAllType(node) || node.kind === 318) {
|
|
43538
43637
|
return ts.factory.createKeywordTypeNode(130);
|
|
43539
43638
|
}
|
|
43540
43639
|
if (ts.isJSDocUnknownType(node)) {
|
|
@@ -44222,7 +44321,7 @@ var ts;
|
|
|
44222
44321
|
}
|
|
44223
44322
|
ts.Debug.failBadSyntaxKind(((_c = node.parent) === null || _c === void 0 ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization");
|
|
44224
44323
|
break;
|
|
44225
|
-
case
|
|
44324
|
+
case 296:
|
|
44226
44325
|
if (((_e = (_d = node.parent) === null || _d === void 0 ? void 0 : _d.parent) === null || _e === void 0 ? void 0 : _e.kind) === 220) {
|
|
44227
44326
|
serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), targetName);
|
|
44228
44327
|
}
|
|
@@ -44627,7 +44726,7 @@ var ts;
|
|
|
44627
44726
|
ts.isExternalModuleAugmentation(node.parent.parent);
|
|
44628
44727
|
}
|
|
44629
44728
|
function isDefaultBindingContext(location) {
|
|
44630
|
-
return location.kind ===
|
|
44729
|
+
return location.kind === 304 || ts.isAmbientModule(location);
|
|
44631
44730
|
}
|
|
44632
44731
|
function getNameOfSymbolFromNameType(symbol, context) {
|
|
44633
44732
|
var nameType = getSymbolLinks(symbol).nameType;
|
|
@@ -44702,9 +44801,9 @@ var ts;
|
|
|
44702
44801
|
return false;
|
|
44703
44802
|
function determineIfDeclarationIsVisible() {
|
|
44704
44803
|
switch (node.kind) {
|
|
44705
|
-
case 336:
|
|
44706
|
-
case 343:
|
|
44707
44804
|
case 337:
|
|
44805
|
+
case 344:
|
|
44806
|
+
case 338:
|
|
44708
44807
|
return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent));
|
|
44709
44808
|
case 202:
|
|
44710
44809
|
return isDeclarationVisible(node.parent.parent);
|
|
@@ -44725,7 +44824,7 @@ var ts;
|
|
|
44725
44824
|
}
|
|
44726
44825
|
var parent = getDeclarationContainer(node);
|
|
44727
44826
|
if (!(ts.getCombinedModifierFlags(node) & 1) &&
|
|
44728
|
-
!(node.kind !== 264 && parent.kind !==
|
|
44827
|
+
!(node.kind !== 264 && parent.kind !== 304 && parent.flags & 8388608)) {
|
|
44729
44828
|
return isGlobalSourceFile(parent);
|
|
44730
44829
|
}
|
|
44731
44830
|
return isDeclarationVisible(parent);
|
|
@@ -44760,7 +44859,7 @@ var ts;
|
|
|
44760
44859
|
case 269:
|
|
44761
44860
|
return false;
|
|
44762
44861
|
case 162:
|
|
44763
|
-
case
|
|
44862
|
+
case 304:
|
|
44764
44863
|
case 263:
|
|
44765
44864
|
return true;
|
|
44766
44865
|
case 270:
|
|
@@ -44978,7 +45077,7 @@ var ts;
|
|
|
44978
45077
|
var ancestor = node.parent.parent;
|
|
44979
45078
|
switch (ancestor.kind) {
|
|
44980
45079
|
case 202:
|
|
44981
|
-
case
|
|
45080
|
+
case 295:
|
|
44982
45081
|
return getSyntheticElementAccess(ancestor);
|
|
44983
45082
|
case 203:
|
|
44984
45083
|
return getSyntheticElementAccess(node.parent);
|
|
@@ -44993,7 +45092,7 @@ var ts;
|
|
|
44993
45092
|
if (node.kind === 202 && parent.kind === 200) {
|
|
44994
45093
|
return getLiteralPropertyNameText(node.propertyName || node.name);
|
|
44995
45094
|
}
|
|
44996
|
-
if (node.kind ===
|
|
45095
|
+
if (node.kind === 295 || node.kind === 296) {
|
|
44997
45096
|
return getLiteralPropertyNameText(node.name);
|
|
44998
45097
|
}
|
|
44999
45098
|
return "" + parent.elements.indexOf(node);
|
|
@@ -45581,8 +45680,8 @@ var ts;
|
|
|
45581
45680
|
var memberDeclaration = root.kind === 163 ? root.parent : root;
|
|
45582
45681
|
return isPrivateWithinAmbient(memberDeclaration);
|
|
45583
45682
|
}
|
|
45584
|
-
function tryGetTypeFromEffectiveTypeNode(
|
|
45585
|
-
var typeNode = ts.getEffectiveTypeAnnotationNode(
|
|
45683
|
+
function tryGetTypeFromEffectiveTypeNode(node) {
|
|
45684
|
+
var typeNode = ts.getEffectiveTypeAnnotationNode(node);
|
|
45586
45685
|
if (typeNode) {
|
|
45587
45686
|
return getTypeFromTypeNode(typeNode);
|
|
45588
45687
|
}
|
|
@@ -46032,16 +46131,16 @@ var ts;
|
|
|
46032
46131
|
case 167:
|
|
46033
46132
|
case 178:
|
|
46034
46133
|
case 179:
|
|
46035
|
-
case
|
|
46134
|
+
case 316:
|
|
46036
46135
|
case 255:
|
|
46037
46136
|
case 168:
|
|
46038
46137
|
case 212:
|
|
46039
46138
|
case 213:
|
|
46040
46139
|
case 258:
|
|
46041
|
-
case 342:
|
|
46042
46140
|
case 343:
|
|
46141
|
+
case 344:
|
|
46142
|
+
case 338:
|
|
46043
46143
|
case 337:
|
|
46044
|
-
case 336:
|
|
46045
46144
|
case 194:
|
|
46046
46145
|
case 188: {
|
|
46047
46146
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
@@ -46057,13 +46156,13 @@ var ts;
|
|
|
46057
46156
|
getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
|
|
46058
46157
|
return thisType ? ts.append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters;
|
|
46059
46158
|
}
|
|
46060
|
-
case
|
|
46159
|
+
case 339:
|
|
46061
46160
|
var paramSymbol = ts.getParameterSymbolFromJSDoc(node);
|
|
46062
46161
|
if (paramSymbol) {
|
|
46063
46162
|
node = paramSymbol.valueDeclaration;
|
|
46064
46163
|
}
|
|
46065
46164
|
break;
|
|
46066
|
-
case
|
|
46165
|
+
case 319: {
|
|
46067
46166
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
46068
46167
|
return node.tags
|
|
46069
46168
|
? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
|
|
@@ -46406,7 +46505,7 @@ var ts;
|
|
|
46406
46505
|
}
|
|
46407
46506
|
else {
|
|
46408
46507
|
type = errorType;
|
|
46409
|
-
if (declaration.kind ===
|
|
46508
|
+
if (declaration.kind === 338) {
|
|
46410
46509
|
error(declaration.typeExpression.type, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
|
|
46411
46510
|
}
|
|
46412
46511
|
else {
|
|
@@ -48223,10 +48322,10 @@ var ts;
|
|
|
48223
48322
|
return result;
|
|
48224
48323
|
}
|
|
48225
48324
|
function isJSDocOptionalParameter(node) {
|
|
48226
|
-
return ts.isInJSFile(node) && (node.type && node.type.kind ===
|
|
48325
|
+
return ts.isInJSFile(node) && (node.type && node.type.kind === 315
|
|
48227
48326
|
|| ts.getJSDocParameterTags(node).some(function (_a) {
|
|
48228
48327
|
var isBracketed = _a.isBracketed, typeExpression = _a.typeExpression;
|
|
48229
|
-
return isBracketed || !!typeExpression && typeExpression.type.kind ===
|
|
48328
|
+
return isBracketed || !!typeExpression && typeExpression.type.kind === 315;
|
|
48230
48329
|
}));
|
|
48231
48330
|
}
|
|
48232
48331
|
function tryFindAmbientModule(moduleName, withAugmentations) {
|
|
@@ -48262,7 +48361,7 @@ var ts;
|
|
|
48262
48361
|
return false;
|
|
48263
48362
|
}
|
|
48264
48363
|
var isBracketed = node.isBracketed, typeExpression = node.typeExpression;
|
|
48265
|
-
return isBracketed || !!typeExpression && typeExpression.type.kind ===
|
|
48364
|
+
return isBracketed || !!typeExpression && typeExpression.type.kind === 315;
|
|
48266
48365
|
}
|
|
48267
48366
|
function createTypePredicate(kind, parameterName, parameterIndex, type) {
|
|
48268
48367
|
return { kind: kind, parameterName: parameterName, parameterIndex: parameterIndex, type: type };
|
|
@@ -48430,7 +48529,7 @@ var ts;
|
|
|
48430
48529
|
case 205:
|
|
48431
48530
|
case 206:
|
|
48432
48531
|
return traverse(node.expression);
|
|
48433
|
-
case
|
|
48532
|
+
case 295:
|
|
48434
48533
|
return traverse(node.initializer);
|
|
48435
48534
|
default:
|
|
48436
48535
|
return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && !!ts.forEachChild(node, traverse);
|
|
@@ -49064,7 +49163,7 @@ var ts;
|
|
|
49064
49163
|
function getConditionalFlowTypeOfType(type, node) {
|
|
49065
49164
|
var constraints;
|
|
49066
49165
|
var covariant = true;
|
|
49067
|
-
while (node && !ts.isStatement(node) && node.kind !==
|
|
49166
|
+
while (node && !ts.isStatement(node) && node.kind !== 319) {
|
|
49068
49167
|
var parent = node.parent;
|
|
49069
49168
|
if (parent.kind === 163) {
|
|
49070
49169
|
covariant = !covariant;
|
|
@@ -49405,10 +49504,10 @@ var ts;
|
|
|
49405
49504
|
case 190:
|
|
49406
49505
|
case 184:
|
|
49407
49506
|
case 196:
|
|
49408
|
-
case
|
|
49409
|
-
case 312:
|
|
49507
|
+
case 315:
|
|
49410
49508
|
case 313:
|
|
49411
|
-
case
|
|
49509
|
+
case 314:
|
|
49510
|
+
case 308:
|
|
49412
49511
|
return mayResolveTypeAlias(node.type);
|
|
49413
49512
|
case 185:
|
|
49414
49513
|
return node.type.kind !== 182 || mayResolveTypeAlias(node.type.elementType);
|
|
@@ -51378,8 +51477,8 @@ var ts;
|
|
|
51378
51477
|
function getTypeFromTypeNodeWorker(node) {
|
|
51379
51478
|
switch (node.kind) {
|
|
51380
51479
|
case 130:
|
|
51381
|
-
case 310:
|
|
51382
51480
|
case 311:
|
|
51481
|
+
case 312:
|
|
51383
51482
|
return anyType;
|
|
51384
51483
|
case 154:
|
|
51385
51484
|
return unknownType;
|
|
@@ -51427,26 +51526,26 @@ var ts;
|
|
|
51427
51526
|
return getTypeFromUnionTypeNode(node);
|
|
51428
51527
|
case 187:
|
|
51429
51528
|
return getTypeFromIntersectionTypeNode(node);
|
|
51430
|
-
case
|
|
51529
|
+
case 313:
|
|
51431
51530
|
return getTypeFromJSDocNullableTypeNode(node);
|
|
51432
|
-
case
|
|
51531
|
+
case 315:
|
|
51433
51532
|
return addOptionality(getTypeFromTypeNode(node.type));
|
|
51434
51533
|
case 196:
|
|
51435
51534
|
return getTypeFromNamedTupleTypeNode(node);
|
|
51436
51535
|
case 190:
|
|
51437
|
-
case
|
|
51438
|
-
case
|
|
51536
|
+
case 314:
|
|
51537
|
+
case 308:
|
|
51439
51538
|
return getTypeFromTypeNode(node.type);
|
|
51440
51539
|
case 185:
|
|
51441
51540
|
return getTypeFromRestTypeNode(node);
|
|
51442
|
-
case
|
|
51541
|
+
case 317:
|
|
51443
51542
|
return getTypeFromJSDocVariadicType(node);
|
|
51444
51543
|
case 178:
|
|
51445
51544
|
case 179:
|
|
51446
51545
|
case 181:
|
|
51447
|
-
case 320:
|
|
51448
|
-
case 315:
|
|
51449
51546
|
case 321:
|
|
51547
|
+
case 316:
|
|
51548
|
+
case 322:
|
|
51450
51549
|
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
|
|
51451
51550
|
case 192:
|
|
51452
51551
|
return getTypeFromTypeOperatorNode(node);
|
|
@@ -51786,7 +51885,7 @@ var ts;
|
|
|
51786
51885
|
var checkType_1 = root.checkType;
|
|
51787
51886
|
var distributionType = root.isDistributive ? getMappedType(checkType_1, newMapper_1) : undefined;
|
|
51788
51887
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 | 131072) ?
|
|
51789
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
51888
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
51790
51889
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
51791
51890
|
root.instantiations.set(id, result);
|
|
51792
51891
|
}
|
|
@@ -51929,7 +52028,7 @@ var ts;
|
|
|
51929
52028
|
case 220:
|
|
51930
52029
|
return (node.operatorToken.kind === 56 || node.operatorToken.kind === 60) &&
|
|
51931
52030
|
(isContextSensitive(node.left) || isContextSensitive(node.right));
|
|
51932
|
-
case
|
|
52031
|
+
case 295:
|
|
51933
52032
|
return isContextSensitive(node.initializer);
|
|
51934
52033
|
case 211:
|
|
51935
52034
|
return isContextSensitive(node.expression);
|
|
@@ -52398,8 +52497,8 @@ var ts;
|
|
|
52398
52497
|
case 172: return [3, 2];
|
|
52399
52498
|
case 171: return [3, 2];
|
|
52400
52499
|
case 168: return [3, 2];
|
|
52401
|
-
case
|
|
52402
|
-
case
|
|
52500
|
+
case 296: return [3, 2];
|
|
52501
|
+
case 295: return [3, 4];
|
|
52403
52502
|
}
|
|
52404
52503
|
return [3, 6];
|
|
52405
52504
|
case 2: return [4, { errorNode: prop.name, innerExpression: undefined, nameType: type }];
|
|
@@ -54127,8 +54226,8 @@ var ts;
|
|
|
54127
54226
|
}
|
|
54128
54227
|
return 0;
|
|
54129
54228
|
}
|
|
54130
|
-
if (
|
|
54131
|
-
|
|
54229
|
+
if (relation === strictSubtypeRelation &&
|
|
54230
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
54132
54231
|
return 0;
|
|
54133
54232
|
}
|
|
54134
54233
|
var related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, intersectionState);
|
|
@@ -55495,7 +55594,7 @@ var ts;
|
|
|
55495
55594
|
return;
|
|
55496
55595
|
}
|
|
55497
55596
|
break;
|
|
55498
|
-
case
|
|
55597
|
+
case 316:
|
|
55499
55598
|
error(declaration, ts.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
|
|
55500
55599
|
return;
|
|
55501
55600
|
case 255:
|
|
@@ -55657,7 +55756,7 @@ var ts;
|
|
|
55657
55756
|
function isNonGenericTopLevelType(type) {
|
|
55658
55757
|
if (type.aliasSymbol && !type.aliasTypeArguments) {
|
|
55659
55758
|
var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 258);
|
|
55660
|
-
return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind ===
|
|
55759
|
+
return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 304 ? true : n.kind === 260 ? false : "quit"; }));
|
|
55661
55760
|
}
|
|
55662
55761
|
return false;
|
|
55663
55762
|
}
|
|
@@ -56584,7 +56683,7 @@ var ts;
|
|
|
56584
56683
|
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
56585
56684
|
}
|
|
56586
56685
|
default:
|
|
56587
|
-
if (node.parent.kind ===
|
|
56686
|
+
if (node.parent.kind === 296) {
|
|
56588
56687
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
56589
56688
|
}
|
|
56590
56689
|
else {
|
|
@@ -56789,7 +56888,7 @@ var ts;
|
|
|
56789
56888
|
}
|
|
56790
56889
|
function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
|
|
56791
56890
|
var keyPropertyName = getKeyPropertyName(unionType);
|
|
56792
|
-
var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind ===
|
|
56891
|
+
var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 295 &&
|
|
56793
56892
|
p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer); });
|
|
56794
56893
|
var propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
|
|
56795
56894
|
return propType && getConstituentTypeForKeyType(unionType, propType);
|
|
@@ -56971,7 +57070,7 @@ var ts;
|
|
|
56971
57070
|
}
|
|
56972
57071
|
function getAssignedTypeOfBinaryExpression(node) {
|
|
56973
57072
|
var isDestructuringDefaultAssignment = node.parent.kind === 203 && isDestructuringAssignmentTarget(node.parent) ||
|
|
56974
|
-
node.parent.kind ===
|
|
57073
|
+
node.parent.kind === 295 && isDestructuringAssignmentTarget(node.parent.parent);
|
|
56975
57074
|
return isDestructuringDefaultAssignment ?
|
|
56976
57075
|
getTypeWithDefault(getAssignedType(node), node.right) :
|
|
56977
57076
|
getTypeOfExpression(node.right);
|
|
@@ -57007,9 +57106,9 @@ var ts;
|
|
|
57007
57106
|
return getAssignedTypeOfArrayLiteralElement(parent, node);
|
|
57008
57107
|
case 224:
|
|
57009
57108
|
return getAssignedTypeOfSpreadExpression(parent);
|
|
57010
|
-
case 294:
|
|
57011
|
-
return getAssignedTypeOfPropertyAssignment(parent);
|
|
57012
57109
|
case 295:
|
|
57110
|
+
return getAssignedTypeOfPropertyAssignment(parent);
|
|
57111
|
+
case 296:
|
|
57013
57112
|
return getAssignedTypeOfShorthandPropertyAssignment(parent);
|
|
57014
57113
|
}
|
|
57015
57114
|
return errorType;
|
|
@@ -58466,7 +58565,7 @@ var ts;
|
|
|
58466
58565
|
return ts.findAncestor(node.parent, function (node) {
|
|
58467
58566
|
return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
|
|
58468
58567
|
node.kind === 261 ||
|
|
58469
|
-
node.kind ===
|
|
58568
|
+
node.kind === 304 ||
|
|
58470
58569
|
node.kind === 166;
|
|
58471
58570
|
});
|
|
58472
58571
|
}
|
|
@@ -58665,7 +58764,7 @@ var ts;
|
|
|
58665
58764
|
}
|
|
58666
58765
|
else if (declaration.kind === 225) {
|
|
58667
58766
|
var container = ts.getThisContainer(node, false);
|
|
58668
|
-
while (container.kind !==
|
|
58767
|
+
while (container.kind !== 304) {
|
|
58669
58768
|
if (container.parent === declaration) {
|
|
58670
58769
|
if (ts.isPropertyDeclaration(container) && ts.isStatic(container) || ts.isClassStaticBlockDeclaration(container)) {
|
|
58671
58770
|
getNodeLinks(declaration).flags |= 16777216;
|
|
@@ -58986,7 +59085,7 @@ var ts;
|
|
|
58986
59085
|
return container.parent.parent.left.expression;
|
|
58987
59086
|
}
|
|
58988
59087
|
else if (container.kind === 212 &&
|
|
58989
|
-
container.parent.kind ===
|
|
59088
|
+
container.parent.kind === 295 &&
|
|
58990
59089
|
container.parent.parent.kind === 204 &&
|
|
58991
59090
|
ts.isBinaryExpression(container.parent.parent.parent) &&
|
|
58992
59091
|
ts.getAssignmentDeclarationKind(container.parent.parent.parent) === 6) {
|
|
@@ -59014,7 +59113,7 @@ var ts;
|
|
|
59014
59113
|
}
|
|
59015
59114
|
function getTypeForThisExpressionFromJSDoc(node) {
|
|
59016
59115
|
var jsdocType = ts.getJSDocType(node);
|
|
59017
|
-
if (jsdocType && jsdocType.kind ===
|
|
59116
|
+
if (jsdocType && jsdocType.kind === 316) {
|
|
59018
59117
|
var jsDocFunctionType = jsdocType;
|
|
59019
59118
|
if (jsDocFunctionType.parameters.length > 0 &&
|
|
59020
59119
|
jsDocFunctionType.parameters[0].name &&
|
|
@@ -59150,7 +59249,7 @@ var ts;
|
|
|
59150
59249
|
return (func.kind === 168 ||
|
|
59151
59250
|
func.kind === 171 ||
|
|
59152
59251
|
func.kind === 172) && func.parent.kind === 204 ? func.parent :
|
|
59153
|
-
func.kind === 212 && func.parent.kind ===
|
|
59252
|
+
func.kind === 212 && func.parent.kind === 295 ? func.parent.parent :
|
|
59154
59253
|
undefined;
|
|
59155
59254
|
}
|
|
59156
59255
|
function getThisTypeArgument(type) {
|
|
@@ -59186,7 +59285,7 @@ var ts;
|
|
|
59186
59285
|
if (thisType) {
|
|
59187
59286
|
return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral)));
|
|
59188
59287
|
}
|
|
59189
|
-
if (literal.parent.kind !==
|
|
59288
|
+
if (literal.parent.kind !== 295) {
|
|
59190
59289
|
break;
|
|
59191
59290
|
}
|
|
59192
59291
|
literal = literal.parent.parent;
|
|
@@ -59660,7 +59759,7 @@ var ts;
|
|
|
59660
59759
|
return false;
|
|
59661
59760
|
}
|
|
59662
59761
|
function discriminateContextualTypeByObjectMembers(node, contextualType) {
|
|
59663
|
-
return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind ===
|
|
59762
|
+
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);
|
|
59664
59763
|
}
|
|
59665
59764
|
function discriminateContextualTypeByJSXAttributes(node, contextualType) {
|
|
59666
59765
|
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);
|
|
@@ -59733,10 +59832,10 @@ var ts;
|
|
|
59733
59832
|
return ts.isConstTypeReference(parent.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(parent.type);
|
|
59734
59833
|
case 220:
|
|
59735
59834
|
return getContextualTypeForBinaryOperand(node, contextFlags);
|
|
59736
|
-
case 294:
|
|
59737
59835
|
case 295:
|
|
59738
|
-
return getContextualTypeForObjectLiteralElement(parent, contextFlags);
|
|
59739
59836
|
case 296:
|
|
59837
|
+
return getContextualTypeForObjectLiteralElement(parent, contextFlags);
|
|
59838
|
+
case 297:
|
|
59740
59839
|
return getContextualType(parent.parent, contextFlags);
|
|
59741
59840
|
case 203: {
|
|
59742
59841
|
var arrayLiteral = parent;
|
|
@@ -59756,6 +59855,8 @@ var ts;
|
|
|
59756
59855
|
}
|
|
59757
59856
|
case 229:
|
|
59758
59857
|
return getContextualType(parent, contextFlags);
|
|
59858
|
+
case 270:
|
|
59859
|
+
return tryGetTypeFromEffectiveTypeNode(parent);
|
|
59759
59860
|
case 287:
|
|
59760
59861
|
return getContextualTypeForJsxExpression(parent);
|
|
59761
59862
|
case 284:
|
|
@@ -60205,11 +60306,11 @@ var ts;
|
|
|
60205
60306
|
var member = getSymbolOfNode(memberDecl);
|
|
60206
60307
|
var computedNameType = memberDecl.name && memberDecl.name.kind === 161 ?
|
|
60207
60308
|
checkComputedPropertyName(memberDecl.name) : undefined;
|
|
60208
|
-
if (memberDecl.kind ===
|
|
60209
|
-
memberDecl.kind ===
|
|
60309
|
+
if (memberDecl.kind === 295 ||
|
|
60310
|
+
memberDecl.kind === 296 ||
|
|
60210
60311
|
ts.isObjectLiteralMethod(memberDecl)) {
|
|
60211
|
-
var type = memberDecl.kind ===
|
|
60212
|
-
memberDecl.kind ===
|
|
60312
|
+
var type = memberDecl.kind === 295 ? checkPropertyAssignment(memberDecl, checkMode) :
|
|
60313
|
+
memberDecl.kind === 296 ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
|
|
60213
60314
|
checkObjectLiteralMethod(memberDecl, checkMode);
|
|
60214
60315
|
if (isInJavascript) {
|
|
60215
60316
|
var jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl);
|
|
@@ -60230,8 +60331,8 @@ var ts;
|
|
|
60230
60331
|
prop.nameType = nameType;
|
|
60231
60332
|
}
|
|
60232
60333
|
if (inDestructuringPattern) {
|
|
60233
|
-
var isOptional = (memberDecl.kind ===
|
|
60234
|
-
(memberDecl.kind ===
|
|
60334
|
+
var isOptional = (memberDecl.kind === 295 && hasDefaultValue(memberDecl.initializer)) ||
|
|
60335
|
+
(memberDecl.kind === 296 && memberDecl.objectAssignmentInitializer);
|
|
60235
60336
|
if (isOptional) {
|
|
60236
60337
|
prop.flags |= 16777216;
|
|
60237
60338
|
}
|
|
@@ -60255,7 +60356,7 @@ var ts;
|
|
|
60255
60356
|
member = prop;
|
|
60256
60357
|
allPropertiesTable === null || allPropertiesTable === void 0 ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
|
|
60257
60358
|
}
|
|
60258
|
-
else if (memberDecl.kind ===
|
|
60359
|
+
else if (memberDecl.kind === 297) {
|
|
60259
60360
|
if (languageVersion < 2) {
|
|
60260
60361
|
checkExternalEmitHelpers(memberDecl, 2);
|
|
60261
60362
|
}
|
|
@@ -60310,7 +60411,7 @@ var ts;
|
|
|
60310
60411
|
}
|
|
60311
60412
|
propertiesArray.push(member);
|
|
60312
60413
|
}
|
|
60313
|
-
if (contextualTypeHasPattern && node.parent.kind !==
|
|
60414
|
+
if (contextualTypeHasPattern && node.parent.kind !== 297) {
|
|
60314
60415
|
for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
|
|
60315
60416
|
var prop = _e[_d];
|
|
60316
60417
|
if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
|
|
@@ -61263,11 +61364,11 @@ var ts;
|
|
|
61263
61364
|
switch (node.kind) {
|
|
61264
61365
|
case 166:
|
|
61265
61366
|
return true;
|
|
61266
|
-
case
|
|
61367
|
+
case 295:
|
|
61267
61368
|
case 168:
|
|
61268
61369
|
case 171:
|
|
61269
61370
|
case 172:
|
|
61270
|
-
case
|
|
61371
|
+
case 297:
|
|
61271
61372
|
case 161:
|
|
61272
61373
|
case 232:
|
|
61273
61374
|
case 287:
|
|
@@ -63544,7 +63645,7 @@ var ts;
|
|
|
63544
63645
|
}
|
|
63545
63646
|
function getParameterIdentifierNameAtPosition(signature, pos) {
|
|
63546
63647
|
var _a;
|
|
63547
|
-
if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) ===
|
|
63648
|
+
if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 316) {
|
|
63548
63649
|
return undefined;
|
|
63549
63650
|
}
|
|
63550
63651
|
var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
|
|
@@ -64543,7 +64644,7 @@ var ts;
|
|
|
64543
64644
|
if (rightIsThis === void 0) { rightIsThis = false; }
|
|
64544
64645
|
var properties = node.properties;
|
|
64545
64646
|
var property = properties[propertyIndex];
|
|
64546
|
-
if (property.kind ===
|
|
64647
|
+
if (property.kind === 295 || property.kind === 296) {
|
|
64547
64648
|
var name = property.name;
|
|
64548
64649
|
var exprType = getLiteralTypeFromPropertyName(name);
|
|
64549
64650
|
if (isTypeUsableAsPropertyName(exprType)) {
|
|
@@ -64556,9 +64657,9 @@ var ts;
|
|
|
64556
64657
|
}
|
|
64557
64658
|
var elementType = getIndexedAccessType(objectLiteralType, exprType, 32, name);
|
|
64558
64659
|
var type = getFlowTypeOfDestructuring(property, elementType);
|
|
64559
|
-
return checkDestructuringAssignment(property.kind ===
|
|
64660
|
+
return checkDestructuringAssignment(property.kind === 296 ? property : property.initializer, type);
|
|
64560
64661
|
}
|
|
64561
|
-
else if (property.kind ===
|
|
64662
|
+
else if (property.kind === 297) {
|
|
64562
64663
|
if (propertyIndex < properties.length - 1) {
|
|
64563
64664
|
error(property, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
|
|
64564
64665
|
}
|
|
@@ -64636,7 +64737,7 @@ var ts;
|
|
|
64636
64737
|
}
|
|
64637
64738
|
function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) {
|
|
64638
64739
|
var target;
|
|
64639
|
-
if (exprOrAssignment.kind ===
|
|
64740
|
+
if (exprOrAssignment.kind === 296) {
|
|
64640
64741
|
var prop = exprOrAssignment;
|
|
64641
64742
|
if (prop.objectAssignmentInitializer) {
|
|
64642
64743
|
if (strictNullChecks &&
|
|
@@ -64664,10 +64765,10 @@ var ts;
|
|
|
64664
64765
|
}
|
|
64665
64766
|
function checkReferenceAssignment(target, sourceType, checkMode) {
|
|
64666
64767
|
var targetType = checkExpression(target, checkMode);
|
|
64667
|
-
var error = target.parent.kind ===
|
|
64768
|
+
var error = target.parent.kind === 297 ?
|
|
64668
64769
|
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
|
|
64669
64770
|
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
|
|
64670
|
-
var optionalError = target.parent.kind ===
|
|
64771
|
+
var optionalError = target.parent.kind === 297 ?
|
|
64671
64772
|
ts.Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access :
|
|
64672
64773
|
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;
|
|
64673
64774
|
if (checkReferenceExpression(target, error, optionalError)) {
|
|
@@ -65932,7 +66033,7 @@ var ts;
|
|
|
65932
66033
|
checkAsyncFunctionReturnType(node, returnTypeNode);
|
|
65933
66034
|
}
|
|
65934
66035
|
}
|
|
65935
|
-
if (node.kind !== 175 && node.kind !==
|
|
66036
|
+
if (node.kind !== 175 && node.kind !== 316) {
|
|
65936
66037
|
registerForUnusedIdentifiersCheck(node);
|
|
65937
66038
|
}
|
|
65938
66039
|
}
|
|
@@ -66481,6 +66582,14 @@ var ts;
|
|
|
66481
66582
|
}
|
|
66482
66583
|
function checkImportType(node) {
|
|
66483
66584
|
checkSourceElement(node.argument);
|
|
66585
|
+
if (node.assertions) {
|
|
66586
|
+
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
66587
|
+
if (override) {
|
|
66588
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
66589
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
|
|
66590
|
+
}
|
|
66591
|
+
}
|
|
66592
|
+
}
|
|
66484
66593
|
getTypeFromTypeNode(node);
|
|
66485
66594
|
}
|
|
66486
66595
|
function checkNamedTupleMember(node) {
|
|
@@ -66761,9 +66870,9 @@ var ts;
|
|
|
66761
66870
|
switch (d.kind) {
|
|
66762
66871
|
case 257:
|
|
66763
66872
|
case 258:
|
|
66764
|
-
case
|
|
66765
|
-
case 336:
|
|
66873
|
+
case 344:
|
|
66766
66874
|
case 337:
|
|
66875
|
+
case 338:
|
|
66767
66876
|
return 2;
|
|
66768
66877
|
case 260:
|
|
66769
66878
|
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
|
|
@@ -66771,9 +66880,9 @@ var ts;
|
|
|
66771
66880
|
: 4;
|
|
66772
66881
|
case 256:
|
|
66773
66882
|
case 259:
|
|
66774
|
-
case
|
|
66883
|
+
case 298:
|
|
66775
66884
|
return 2 | 1;
|
|
66776
|
-
case
|
|
66885
|
+
case 304:
|
|
66777
66886
|
return 2 | 1 | 4;
|
|
66778
66887
|
case 270:
|
|
66779
66888
|
case 220:
|
|
@@ -67284,7 +67393,7 @@ var ts;
|
|
|
67284
67393
|
checkUnusedClassMembers(node, addDiagnostic);
|
|
67285
67394
|
checkUnusedTypeParameters(node, addDiagnostic);
|
|
67286
67395
|
break;
|
|
67287
|
-
case
|
|
67396
|
+
case 304:
|
|
67288
67397
|
case 260:
|
|
67289
67398
|
case 234:
|
|
67290
67399
|
case 262:
|
|
@@ -67579,7 +67688,7 @@ var ts;
|
|
|
67579
67688
|
node.kind === 167 ||
|
|
67580
67689
|
node.kind === 171 ||
|
|
67581
67690
|
node.kind === 172 ||
|
|
67582
|
-
node.kind ===
|
|
67691
|
+
node.kind === 295) {
|
|
67583
67692
|
return false;
|
|
67584
67693
|
}
|
|
67585
67694
|
if (node.flags & 8388608) {
|
|
@@ -67637,7 +67746,7 @@ var ts;
|
|
|
67637
67746
|
return;
|
|
67638
67747
|
}
|
|
67639
67748
|
var parent = getDeclarationContainer(node);
|
|
67640
|
-
if (parent.kind ===
|
|
67749
|
+
if (parent.kind === 304 && ts.isExternalOrCommonJsModule(parent)) {
|
|
67641
67750
|
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));
|
|
67642
67751
|
}
|
|
67643
67752
|
}
|
|
@@ -67649,7 +67758,7 @@ var ts;
|
|
|
67649
67758
|
return;
|
|
67650
67759
|
}
|
|
67651
67760
|
var parent = getDeclarationContainer(node);
|
|
67652
|
-
if (parent.kind ===
|
|
67761
|
+
if (parent.kind === 304 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048) {
|
|
67653
67762
|
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));
|
|
67654
67763
|
}
|
|
67655
67764
|
}
|
|
@@ -67740,7 +67849,7 @@ var ts;
|
|
|
67740
67849
|
(container.kind === 234 && ts.isFunctionLike(container.parent) ||
|
|
67741
67850
|
container.kind === 261 ||
|
|
67742
67851
|
container.kind === 260 ||
|
|
67743
|
-
container.kind ===
|
|
67852
|
+
container.kind === 304);
|
|
67744
67853
|
if (!namesShareScope) {
|
|
67745
67854
|
var name = symbolToString(localDeclarationSymbol);
|
|
67746
67855
|
error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
|
|
@@ -69928,7 +70037,7 @@ var ts;
|
|
|
69928
70037
|
return false;
|
|
69929
70038
|
}
|
|
69930
70039
|
var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
|
|
69931
|
-
if (node.parent.kind !==
|
|
70040
|
+
if (node.parent.kind !== 304 && !inAmbientExternalModule) {
|
|
69932
70041
|
error(moduleName, node.kind === 271 ?
|
|
69933
70042
|
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
|
|
69934
70043
|
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
|
|
@@ -70056,6 +70165,14 @@ var ts;
|
|
|
70056
70165
|
function checkAssertClause(declaration) {
|
|
70057
70166
|
var _a;
|
|
70058
70167
|
if (declaration.assertClause) {
|
|
70168
|
+
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
70169
|
+
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
70170
|
+
if (validForTypeAssertions && override) {
|
|
70171
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
70172
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
|
|
70173
|
+
}
|
|
70174
|
+
return;
|
|
70175
|
+
}
|
|
70059
70176
|
var mode = (moduleKind === ts.ModuleKind.NodeNext) && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
70060
70177
|
if (mode !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.ESNext) {
|
|
70061
70178
|
return grammarErrorOnNode(declaration.assertClause, moduleKind === ts.ModuleKind.NodeNext
|
|
@@ -70065,6 +70182,9 @@ var ts;
|
|
|
70065
70182
|
if (ts.isImportDeclaration(declaration) ? (_a = declaration.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
70066
70183
|
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
|
|
70067
70184
|
}
|
|
70185
|
+
if (override) {
|
|
70186
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
|
|
70187
|
+
}
|
|
70068
70188
|
}
|
|
70069
70189
|
}
|
|
70070
70190
|
function checkImportDeclaration(node) {
|
|
@@ -70149,7 +70269,7 @@ var ts;
|
|
|
70149
70269
|
var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
|
|
70150
70270
|
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 261 &&
|
|
70151
70271
|
!node.moduleSpecifier && node.flags & 8388608;
|
|
70152
|
-
if (node.parent.kind !==
|
|
70272
|
+
if (node.parent.kind !== 304 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
|
70153
70273
|
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
|
70154
70274
|
}
|
|
70155
70275
|
}
|
|
@@ -70188,7 +70308,7 @@ var ts;
|
|
|
70188
70308
|
return false;
|
|
70189
70309
|
}
|
|
70190
70310
|
function checkGrammarModuleElementContext(node, errorMessage) {
|
|
70191
|
-
var isInAppropriateContext = node.parent.kind ===
|
|
70311
|
+
var isInAppropriateContext = node.parent.kind === 304 || node.parent.kind === 261 || node.parent.kind === 260;
|
|
70192
70312
|
if (!isInAppropriateContext) {
|
|
70193
70313
|
grammarErrorOnFirstToken(node, errorMessage);
|
|
70194
70314
|
}
|
|
@@ -70263,7 +70383,7 @@ var ts;
|
|
|
70263
70383
|
if (checkGrammarModuleElementContext(node, illegalContextMessage)) {
|
|
70264
70384
|
return;
|
|
70265
70385
|
}
|
|
70266
|
-
var container = node.parent.kind ===
|
|
70386
|
+
var container = node.parent.kind === 304 ? node.parent : node.parent.parent;
|
|
70267
70387
|
if (container.kind === 260 && !ts.isAmbientModule(container)) {
|
|
70268
70388
|
if (node.isExportEquals) {
|
|
70269
70389
|
error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
|
|
@@ -70448,40 +70568,40 @@ var ts;
|
|
|
70448
70568
|
return checkImportType(node);
|
|
70449
70569
|
case 196:
|
|
70450
70570
|
return checkNamedTupleMember(node);
|
|
70451
|
-
case 326:
|
|
70452
|
-
return checkJSDocAugmentsTag(node);
|
|
70453
70571
|
case 327:
|
|
70572
|
+
return checkJSDocAugmentsTag(node);
|
|
70573
|
+
case 328:
|
|
70454
70574
|
return checkJSDocImplementsTag(node);
|
|
70455
|
-
case
|
|
70456
|
-
case 336:
|
|
70575
|
+
case 344:
|
|
70457
70576
|
case 337:
|
|
70577
|
+
case 338:
|
|
70458
70578
|
return checkJSDocTypeAliasTag(node);
|
|
70459
|
-
case
|
|
70579
|
+
case 343:
|
|
70460
70580
|
return checkJSDocTemplateTag(node);
|
|
70461
|
-
case
|
|
70581
|
+
case 342:
|
|
70462
70582
|
return checkJSDocTypeTag(node);
|
|
70463
|
-
case
|
|
70583
|
+
case 339:
|
|
70464
70584
|
return checkJSDocParameterTag(node);
|
|
70465
|
-
case
|
|
70585
|
+
case 346:
|
|
70466
70586
|
return checkJSDocPropertyTag(node);
|
|
70467
|
-
case
|
|
70587
|
+
case 316:
|
|
70468
70588
|
checkJSDocFunctionType(node);
|
|
70589
|
+
case 314:
|
|
70469
70590
|
case 313:
|
|
70470
|
-
case 312:
|
|
70471
|
-
case 310:
|
|
70472
70591
|
case 311:
|
|
70473
|
-
case
|
|
70592
|
+
case 312:
|
|
70593
|
+
case 321:
|
|
70474
70594
|
checkJSDocTypeIsInJsFile(node);
|
|
70475
70595
|
ts.forEachChild(node, checkSourceElement);
|
|
70476
70596
|
return;
|
|
70477
|
-
case
|
|
70597
|
+
case 317:
|
|
70478
70598
|
checkJSDocVariadicType(node);
|
|
70479
70599
|
return;
|
|
70480
|
-
case
|
|
70600
|
+
case 308:
|
|
70481
70601
|
return checkSourceElement(node.type);
|
|
70482
|
-
case 331:
|
|
70483
|
-
case 333:
|
|
70484
70602
|
case 332:
|
|
70603
|
+
case 334:
|
|
70604
|
+
case 333:
|
|
70485
70605
|
return checkJSDocAccessibilityModifiers(node);
|
|
70486
70606
|
case 193:
|
|
70487
70607
|
return checkIndexedAccessType(node);
|
|
@@ -70786,7 +70906,7 @@ var ts;
|
|
|
70786
70906
|
copySymbols(location.locals, meaning);
|
|
70787
70907
|
}
|
|
70788
70908
|
switch (location.kind) {
|
|
70789
|
-
case
|
|
70909
|
+
case 304:
|
|
70790
70910
|
if (!ts.isExternalModule(location))
|
|
70791
70911
|
break;
|
|
70792
70912
|
case 260:
|
|
@@ -70858,9 +70978,9 @@ var ts;
|
|
|
70858
70978
|
case 257:
|
|
70859
70979
|
case 258:
|
|
70860
70980
|
case 259:
|
|
70861
|
-
case
|
|
70862
|
-
case 336:
|
|
70981
|
+
case 344:
|
|
70863
70982
|
case 337:
|
|
70983
|
+
case 338:
|
|
70864
70984
|
return true;
|
|
70865
70985
|
case 266:
|
|
70866
70986
|
return node.isTypeOnly;
|
|
@@ -70999,10 +71119,10 @@ var ts;
|
|
|
70999
71119
|
return entityNameSymbol;
|
|
71000
71120
|
}
|
|
71001
71121
|
}
|
|
71002
|
-
if (name.parent.kind ===
|
|
71122
|
+
if (name.parent.kind === 339) {
|
|
71003
71123
|
return ts.getParameterSymbolFromJSDoc(name.parent);
|
|
71004
71124
|
}
|
|
71005
|
-
if (name.parent.kind === 162 && name.parent.parent.kind ===
|
|
71125
|
+
if (name.parent.kind === 162 && name.parent.parent.kind === 343) {
|
|
71006
71126
|
ts.Debug.assert(!ts.isInJSFile(name));
|
|
71007
71127
|
var typeParameter = ts.getTypeParameterFromJsDoc(name.parent);
|
|
71008
71128
|
return typeParameter && typeParameter.symbol;
|
|
@@ -71080,7 +71200,7 @@ var ts;
|
|
|
71080
71200
|
}
|
|
71081
71201
|
}
|
|
71082
71202
|
function getSymbolAtLocation(node, ignoreErrors) {
|
|
71083
|
-
if (node.kind ===
|
|
71203
|
+
if (node.kind === 304) {
|
|
71084
71204
|
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
|
|
71085
71205
|
}
|
|
71086
71206
|
var parent = node.parent;
|
|
@@ -71196,7 +71316,7 @@ var ts;
|
|
|
71196
71316
|
return undefined;
|
|
71197
71317
|
}
|
|
71198
71318
|
function getShorthandAssignmentValueSymbol(location) {
|
|
71199
|
-
if (location && location.kind ===
|
|
71319
|
+
if (location && location.kind === 296) {
|
|
71200
71320
|
return resolveEntityName(location.name, 111551 | 2097152);
|
|
71201
71321
|
}
|
|
71202
71322
|
return undefined;
|
|
@@ -71275,7 +71395,7 @@ var ts;
|
|
|
71275
71395
|
var iteratedType = getTypeOfExpression(expr.parent.right);
|
|
71276
71396
|
return checkDestructuringAssignment(expr, iteratedType || errorType);
|
|
71277
71397
|
}
|
|
71278
|
-
if (expr.parent.kind ===
|
|
71398
|
+
if (expr.parent.kind === 295) {
|
|
71279
71399
|
var node_3 = ts.cast(expr.parent.parent, ts.isObjectLiteralExpression);
|
|
71280
71400
|
var typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node_3) || errorType;
|
|
71281
71401
|
var propertyIndex = ts.indexOfNode(node_3.properties, expr.parent);
|
|
@@ -71410,7 +71530,7 @@ var ts;
|
|
|
71410
71530
|
}
|
|
71411
71531
|
var parentSymbol_1 = getParentOfSymbol(symbol);
|
|
71412
71532
|
if (parentSymbol_1) {
|
|
71413
|
-
if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) ===
|
|
71533
|
+
if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) === 304) {
|
|
71414
71534
|
var symbolFile = parentSymbol_1.valueDeclaration;
|
|
71415
71535
|
var referenceFile = ts.getSourceFileOfNode(node);
|
|
71416
71536
|
var symbolIsUmdExport = symbolFile !== referenceFile;
|
|
@@ -71509,7 +71629,7 @@ var ts;
|
|
|
71509
71629
|
}
|
|
71510
71630
|
function isTopLevelValueImportEqualsWithEntityName(nodeIn) {
|
|
71511
71631
|
var node = ts.getParseTreeNode(nodeIn, ts.isImportEqualsDeclaration);
|
|
71512
|
-
if (node === undefined || node.parent.kind !==
|
|
71632
|
+
if (node === undefined || node.parent.kind !== 304 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
|
|
71513
71633
|
return false;
|
|
71514
71634
|
}
|
|
71515
71635
|
var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
|
|
@@ -71609,7 +71729,7 @@ var ts;
|
|
|
71609
71729
|
}
|
|
71610
71730
|
function canHaveConstantValue(node) {
|
|
71611
71731
|
switch (node.kind) {
|
|
71612
|
-
case
|
|
71732
|
+
case 298:
|
|
71613
71733
|
case 205:
|
|
71614
71734
|
case 206:
|
|
71615
71735
|
return true;
|
|
@@ -71617,7 +71737,7 @@ var ts;
|
|
|
71617
71737
|
return false;
|
|
71618
71738
|
}
|
|
71619
71739
|
function getConstantValue(node) {
|
|
71620
|
-
if (node.kind ===
|
|
71740
|
+
if (node.kind === 298) {
|
|
71621
71741
|
return getEnumMemberValue(node);
|
|
71622
71742
|
}
|
|
71623
71743
|
var symbol = getNodeLinks(node).resolvedSymbol;
|
|
@@ -71900,7 +72020,7 @@ var ts;
|
|
|
71900
72020
|
},
|
|
71901
72021
|
getDeclarationStatementsForSourceFile: function (node, flags, tracker, bundled) {
|
|
71902
72022
|
var n = ts.getParseTreeNode(node);
|
|
71903
|
-
ts.Debug.assert(n && n.kind ===
|
|
72023
|
+
ts.Debug.assert(n && n.kind === 304, "Non-sourcefile node passed into getDeclarationsForSourceFile");
|
|
71904
72024
|
var sym = getSymbolOfNode(node);
|
|
71905
72025
|
if (!sym) {
|
|
71906
72026
|
return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled);
|
|
@@ -71984,7 +72104,7 @@ var ts;
|
|
|
71984
72104
|
break;
|
|
71985
72105
|
}
|
|
71986
72106
|
}
|
|
71987
|
-
if (current.valueDeclaration && current.valueDeclaration.kind ===
|
|
72107
|
+
if (current.valueDeclaration && current.valueDeclaration.kind === 304 && current.flags & 512) {
|
|
71988
72108
|
return false;
|
|
71989
72109
|
}
|
|
71990
72110
|
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
|
|
@@ -72016,7 +72136,7 @@ var ts;
|
|
|
72016
72136
|
if (!moduleSymbol) {
|
|
72017
72137
|
return undefined;
|
|
72018
72138
|
}
|
|
72019
|
-
return ts.getDeclarationOfKind(moduleSymbol,
|
|
72139
|
+
return ts.getDeclarationOfKind(moduleSymbol, 304);
|
|
72020
72140
|
}
|
|
72021
72141
|
function initializeTypeChecker() {
|
|
72022
72142
|
for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
|
|
@@ -72277,7 +72397,7 @@ var ts;
|
|
|
72277
72397
|
else if (flags & 256) {
|
|
72278
72398
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
|
|
72279
72399
|
}
|
|
72280
|
-
else if (node.parent.kind === 261 || node.parent.kind ===
|
|
72400
|
+
else if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72281
72401
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
|
|
72282
72402
|
}
|
|
72283
72403
|
else if (flags & 128) {
|
|
@@ -72303,7 +72423,7 @@ var ts;
|
|
|
72303
72423
|
else if (flags & 256) {
|
|
72304
72424
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
|
|
72305
72425
|
}
|
|
72306
|
-
else if (node.parent.kind === 261 || node.parent.kind ===
|
|
72426
|
+
else if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72307
72427
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
|
|
72308
72428
|
}
|
|
72309
72429
|
else if (node.kind === 163) {
|
|
@@ -72349,7 +72469,7 @@ var ts;
|
|
|
72349
72469
|
flags |= 1;
|
|
72350
72470
|
break;
|
|
72351
72471
|
case 88:
|
|
72352
|
-
var container = node.parent.kind ===
|
|
72472
|
+
var container = node.parent.kind === 304 ? node.parent : node.parent.parent;
|
|
72353
72473
|
if (container.kind === 260 && !ts.isAmbientModule(container)) {
|
|
72354
72474
|
return grammarErrorOnNode(modifier, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
|
|
72355
72475
|
}
|
|
@@ -72487,7 +72607,7 @@ var ts;
|
|
|
72487
72607
|
case 163:
|
|
72488
72608
|
return false;
|
|
72489
72609
|
default:
|
|
72490
|
-
if (node.parent.kind === 261 || node.parent.kind ===
|
|
72610
|
+
if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72491
72611
|
return false;
|
|
72492
72612
|
}
|
|
72493
72613
|
switch (node.kind) {
|
|
@@ -72769,7 +72889,7 @@ var ts;
|
|
|
72769
72889
|
var seen = new ts.Map();
|
|
72770
72890
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
72771
72891
|
var prop = _a[_i];
|
|
72772
|
-
if (prop.kind ===
|
|
72892
|
+
if (prop.kind === 297) {
|
|
72773
72893
|
if (inDestructuring) {
|
|
72774
72894
|
var expression = ts.skipParentheses(prop.expression);
|
|
72775
72895
|
if (ts.isArrayLiteralExpression(expression) || ts.isObjectLiteralExpression(expression)) {
|
|
@@ -72782,7 +72902,7 @@ var ts;
|
|
|
72782
72902
|
if (name.kind === 161) {
|
|
72783
72903
|
checkGrammarComputedPropertyName(name);
|
|
72784
72904
|
}
|
|
72785
|
-
if (prop.kind ===
|
|
72905
|
+
if (prop.kind === 296 && !inDestructuring && prop.objectAssignmentInitializer) {
|
|
72786
72906
|
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);
|
|
72787
72907
|
}
|
|
72788
72908
|
if (name.kind === 80) {
|
|
@@ -72798,9 +72918,9 @@ var ts;
|
|
|
72798
72918
|
}
|
|
72799
72919
|
var currentKind = void 0;
|
|
72800
72920
|
switch (prop.kind) {
|
|
72801
|
-
case
|
|
72921
|
+
case 296:
|
|
72802
72922
|
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
72803
|
-
case
|
|
72923
|
+
case 295:
|
|
72804
72924
|
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
|
|
72805
72925
|
if (name.kind === 8) {
|
|
72806
72926
|
checkGrammarNumericLiteral(name);
|
|
@@ -73445,7 +73565,7 @@ var ts;
|
|
|
73445
73565
|
if (!links.hasReportedStatementInAmbientContext && (ts.isFunctionLike(node.parent) || ts.isAccessor(node.parent))) {
|
|
73446
73566
|
return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
|
|
73447
73567
|
}
|
|
73448
|
-
if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind ===
|
|
73568
|
+
if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind === 304) {
|
|
73449
73569
|
var links_2 = getNodeLinks(node.parent);
|
|
73450
73570
|
if (!links_2.hasReportedStatementInAmbientContext) {
|
|
73451
73571
|
return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
|
|
@@ -73465,7 +73585,7 @@ var ts;
|
|
|
73465
73585
|
else if (ts.isChildOfNodeWithKind(node, 195)) {
|
|
73466
73586
|
diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
|
|
73467
73587
|
}
|
|
73468
|
-
else if (ts.isChildOfNodeWithKind(node,
|
|
73588
|
+
else if (ts.isChildOfNodeWithKind(node, 298)) {
|
|
73469
73589
|
diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
|
|
73470
73590
|
}
|
|
73471
73591
|
if (diagnosticMessage) {
|
|
@@ -73968,7 +74088,10 @@ var ts;
|
|
|
73968
74088
|
return factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
|
|
73969
74089
|
case 199:
|
|
73970
74090
|
ts.Debug.type(node);
|
|
73971
|
-
return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
|
|
74091
|
+
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);
|
|
74092
|
+
case 294:
|
|
74093
|
+
ts.Debug.type(node);
|
|
74094
|
+
return factory.updateImportTypeAssertionContainer(node, nodeVisitor(node.assertClause, visitor, ts.isNode), node.multiLine);
|
|
73972
74095
|
case 196:
|
|
73973
74096
|
ts.Debug.type(node);
|
|
73974
74097
|
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));
|
|
@@ -74267,25 +74390,25 @@ var ts;
|
|
|
74267
74390
|
case 291:
|
|
74268
74391
|
ts.Debug.type(node);
|
|
74269
74392
|
return factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
|
|
74270
|
-
case
|
|
74393
|
+
case 295:
|
|
74271
74394
|
ts.Debug.type(node);
|
|
74272
74395
|
return factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
74273
|
-
case
|
|
74396
|
+
case 296:
|
|
74274
74397
|
ts.Debug.type(node);
|
|
74275
74398
|
return factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
|
|
74276
|
-
case
|
|
74399
|
+
case 297:
|
|
74277
74400
|
ts.Debug.type(node);
|
|
74278
74401
|
return factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
74279
|
-
case
|
|
74402
|
+
case 298:
|
|
74280
74403
|
ts.Debug.type(node);
|
|
74281
74404
|
return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
74282
|
-
case
|
|
74405
|
+
case 304:
|
|
74283
74406
|
ts.Debug.type(node);
|
|
74284
74407
|
return factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context));
|
|
74285
|
-
case
|
|
74408
|
+
case 349:
|
|
74286
74409
|
ts.Debug.type(node);
|
|
74287
74410
|
return factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
74288
|
-
case
|
|
74411
|
+
case 350:
|
|
74289
74412
|
ts.Debug.type(node);
|
|
74290
74413
|
return factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
74291
74414
|
default:
|
|
@@ -74921,7 +75044,7 @@ var ts;
|
|
|
74921
75044
|
function chainBundle(context, transformSourceFile) {
|
|
74922
75045
|
return transformSourceFileOrBundle;
|
|
74923
75046
|
function transformSourceFileOrBundle(node) {
|
|
74924
|
-
return node.kind ===
|
|
75047
|
+
return node.kind === 304 ? transformSourceFile(node) : transformBundle(node);
|
|
74925
75048
|
}
|
|
74926
75049
|
function transformBundle(node) {
|
|
74927
75050
|
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
@@ -75636,14 +75759,14 @@ var ts;
|
|
|
75636
75759
|
var applicableSubstitutions;
|
|
75637
75760
|
return transformSourceFileOrBundle;
|
|
75638
75761
|
function transformSourceFileOrBundle(node) {
|
|
75639
|
-
if (node.kind ===
|
|
75762
|
+
if (node.kind === 305) {
|
|
75640
75763
|
return transformBundle(node);
|
|
75641
75764
|
}
|
|
75642
75765
|
return transformSourceFile(node);
|
|
75643
75766
|
}
|
|
75644
75767
|
function transformBundle(node) {
|
|
75645
75768
|
return factory.createBundle(node.sourceFiles.map(transformSourceFile), ts.mapDefined(node.prepends, function (prepend) {
|
|
75646
|
-
if (prepend.kind ===
|
|
75769
|
+
if (prepend.kind === 307) {
|
|
75647
75770
|
return ts.createUnparsedSourceFile(prepend, "js");
|
|
75648
75771
|
}
|
|
75649
75772
|
return prepend;
|
|
@@ -75676,7 +75799,7 @@ var ts;
|
|
|
75676
75799
|
}
|
|
75677
75800
|
function onBeforeVisitNode(node) {
|
|
75678
75801
|
switch (node.kind) {
|
|
75679
|
-
case
|
|
75802
|
+
case 304:
|
|
75680
75803
|
case 262:
|
|
75681
75804
|
case 261:
|
|
75682
75805
|
case 234:
|
|
@@ -76424,15 +76547,15 @@ var ts;
|
|
|
76424
76547
|
case 191:
|
|
76425
76548
|
case 199:
|
|
76426
76549
|
break;
|
|
76427
|
-
case 310:
|
|
76428
76550
|
case 311:
|
|
76429
|
-
case
|
|
76551
|
+
case 312:
|
|
76430
76552
|
case 316:
|
|
76431
76553
|
case 317:
|
|
76554
|
+
case 318:
|
|
76432
76555
|
break;
|
|
76433
|
-
case 312:
|
|
76434
76556
|
case 313:
|
|
76435
76557
|
case 314:
|
|
76558
|
+
case 315:
|
|
76436
76559
|
return serializeTypeNode(node.type);
|
|
76437
76560
|
default:
|
|
76438
76561
|
return ts.Debug.failBadSyntaxKind(node);
|
|
@@ -76884,7 +77007,7 @@ var ts;
|
|
|
76884
77007
|
function addVarForEnumOrModuleDeclaration(statements, node) {
|
|
76885
77008
|
var statement = factory.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.createVariableDeclarationList([
|
|
76886
77009
|
factory.createVariableDeclaration(factory.getLocalName(node, false, true))
|
|
76887
|
-
], currentLexicalScope.kind ===
|
|
77010
|
+
], currentLexicalScope.kind === 304 ? 0 : 1));
|
|
76888
77011
|
ts.setOriginalNode(statement, node);
|
|
76889
77012
|
recordEmittedDeclarationInScope(node);
|
|
76890
77013
|
if (isFirstEmittedDeclarationInScope(node)) {
|
|
@@ -77161,7 +77284,7 @@ var ts;
|
|
|
77161
77284
|
if ((enabledSubstitutions & 2) === 0) {
|
|
77162
77285
|
enabledSubstitutions |= 2;
|
|
77163
77286
|
context.enableSubstitution(79);
|
|
77164
|
-
context.enableSubstitution(
|
|
77287
|
+
context.enableSubstitution(296);
|
|
77165
77288
|
context.enableEmitNotification(260);
|
|
77166
77289
|
}
|
|
77167
77290
|
}
|
|
@@ -77247,7 +77370,7 @@ var ts;
|
|
|
77247
77370
|
function trySubstituteNamespaceExportedName(node) {
|
|
77248
77371
|
if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
|
|
77249
77372
|
var container = resolver.getReferencedExportContainer(node, false);
|
|
77250
|
-
if (container && container.kind !==
|
|
77373
|
+
if (container && container.kind !== 304) {
|
|
77251
77374
|
var substitute = (applicableSubstitutions & 2 && container.kind === 260) ||
|
|
77252
77375
|
(applicableSubstitutions & 8 && container.kind === 259);
|
|
77253
77376
|
if (substitute) {
|
|
@@ -79223,7 +79346,7 @@ var ts;
|
|
|
79223
79346
|
return visitObjectLiteralExpression(node);
|
|
79224
79347
|
case 220:
|
|
79225
79348
|
return visitBinaryExpression(node, expressionResultIsUnused);
|
|
79226
|
-
case
|
|
79349
|
+
case 350:
|
|
79227
79350
|
return visitCommaListExpression(node, expressionResultIsUnused);
|
|
79228
79351
|
case 291:
|
|
79229
79352
|
return visitCatchClause(node);
|
|
@@ -79319,7 +79442,7 @@ var ts;
|
|
|
79319
79442
|
var objects = [];
|
|
79320
79443
|
for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
|
|
79321
79444
|
var e = elements_4[_i];
|
|
79322
|
-
if (e.kind ===
|
|
79445
|
+
if (e.kind === 297) {
|
|
79323
79446
|
if (chunkObject) {
|
|
79324
79447
|
objects.push(factory.createObjectLiteralExpression(chunkObject));
|
|
79325
79448
|
chunkObject = undefined;
|
|
@@ -79328,7 +79451,7 @@ var ts;
|
|
|
79328
79451
|
objects.push(ts.visitNode(target, visitor, ts.isExpression));
|
|
79329
79452
|
}
|
|
79330
79453
|
else {
|
|
79331
|
-
chunkObject = ts.append(chunkObject, e.kind ===
|
|
79454
|
+
chunkObject = ts.append(chunkObject, e.kind === 295
|
|
79332
79455
|
? factory.createPropertyAssignment(e.name, ts.visitNode(e.initializer, visitor, ts.isExpression))
|
|
79333
79456
|
: ts.visitNode(e, visitor, ts.isObjectLiteralElementLike));
|
|
79334
79457
|
}
|
|
@@ -80973,7 +81096,7 @@ var ts;
|
|
|
80973
81096
|
return visitObjectLiteralExpression(node);
|
|
80974
81097
|
case 291:
|
|
80975
81098
|
return visitCatchClause(node);
|
|
80976
|
-
case
|
|
81099
|
+
case 296:
|
|
80977
81100
|
return visitShorthandPropertyAssignment(node);
|
|
80978
81101
|
case 161:
|
|
80979
81102
|
return visitComputedPropertyName(node);
|
|
@@ -80987,7 +81110,7 @@ var ts;
|
|
|
80987
81110
|
return visitParenthesizedExpression(node, expressionResultIsUnused);
|
|
80988
81111
|
case 220:
|
|
80989
81112
|
return visitBinaryExpression(node, expressionResultIsUnused);
|
|
80990
|
-
case
|
|
81113
|
+
case 350:
|
|
80991
81114
|
return visitCommaListExpression(node, expressionResultIsUnused);
|
|
80992
81115
|
case 14:
|
|
80993
81116
|
case 15:
|
|
@@ -82440,10 +82563,10 @@ var ts;
|
|
|
82440
82563
|
case 168:
|
|
82441
82564
|
expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
|
|
82442
82565
|
break;
|
|
82443
|
-
case
|
|
82566
|
+
case 295:
|
|
82444
82567
|
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
|
|
82445
82568
|
break;
|
|
82446
|
-
case
|
|
82569
|
+
case 296:
|
|
82447
82570
|
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
|
|
82448
82571
|
break;
|
|
82449
82572
|
default:
|
|
@@ -82874,7 +82997,7 @@ var ts;
|
|
|
82874
82997
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
82875
82998
|
context.onSubstituteNode = onSubstituteNode;
|
|
82876
82999
|
context.enableSubstitution(205);
|
|
82877
|
-
context.enableSubstitution(
|
|
83000
|
+
context.enableSubstitution(295);
|
|
82878
83001
|
return ts.chainBundle(context, transformSourceFile);
|
|
82879
83002
|
function transformSourceFile(node) {
|
|
82880
83003
|
return node;
|
|
@@ -83052,7 +83175,7 @@ var ts;
|
|
|
83052
83175
|
switch (node.kind) {
|
|
83053
83176
|
case 220:
|
|
83054
83177
|
return visitBinaryExpression(node);
|
|
83055
|
-
case
|
|
83178
|
+
case 350:
|
|
83056
83179
|
return visitCommaListExpression(node);
|
|
83057
83180
|
case 221:
|
|
83058
83181
|
return visitConditionalExpression(node);
|
|
@@ -84569,8 +84692,8 @@ var ts;
|
|
|
84569
84692
|
context.enableSubstitution(209);
|
|
84570
84693
|
context.enableSubstitution(79);
|
|
84571
84694
|
context.enableSubstitution(220);
|
|
84572
|
-
context.enableSubstitution(
|
|
84573
|
-
context.enableEmitNotification(
|
|
84695
|
+
context.enableSubstitution(296);
|
|
84696
|
+
context.enableEmitNotification(304);
|
|
84574
84697
|
var moduleInfoMap = [];
|
|
84575
84698
|
var deferredExports = [];
|
|
84576
84699
|
var currentSourceFile;
|
|
@@ -84778,9 +84901,9 @@ var ts;
|
|
|
84778
84901
|
return visitFunctionDeclaration(node);
|
|
84779
84902
|
case 256:
|
|
84780
84903
|
return visitClassDeclaration(node);
|
|
84781
|
-
case 350:
|
|
84782
|
-
return visitMergeDeclarationMarker(node);
|
|
84783
84904
|
case 351:
|
|
84905
|
+
return visitMergeDeclarationMarker(node);
|
|
84906
|
+
case 352:
|
|
84784
84907
|
return visitEndOfDeclarationMarker(node);
|
|
84785
84908
|
default:
|
|
84786
84909
|
return visitor(node);
|
|
@@ -84797,7 +84920,7 @@ var ts;
|
|
|
84797
84920
|
return visitExpressionStatement(node);
|
|
84798
84921
|
case 211:
|
|
84799
84922
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
84800
|
-
case
|
|
84923
|
+
case 349:
|
|
84801
84924
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
84802
84925
|
case 207:
|
|
84803
84926
|
if (ts.isImportCall(node) && currentSourceFile.impliedNodeFormat === undefined) {
|
|
@@ -84826,17 +84949,17 @@ var ts;
|
|
|
84826
84949
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
84827
84950
|
var elem = _a[_i];
|
|
84828
84951
|
switch (elem.kind) {
|
|
84829
|
-
case
|
|
84952
|
+
case 295:
|
|
84830
84953
|
if (destructuringNeedsFlattening(elem.initializer)) {
|
|
84831
84954
|
return true;
|
|
84832
84955
|
}
|
|
84833
84956
|
break;
|
|
84834
|
-
case
|
|
84957
|
+
case 296:
|
|
84835
84958
|
if (destructuringNeedsFlattening(elem.name)) {
|
|
84836
84959
|
return true;
|
|
84837
84960
|
}
|
|
84838
84961
|
break;
|
|
84839
|
-
case
|
|
84962
|
+
case 297:
|
|
84840
84963
|
if (destructuringNeedsFlattening(elem.expression)) {
|
|
84841
84964
|
return true;
|
|
84842
84965
|
}
|
|
@@ -85396,7 +85519,7 @@ var ts;
|
|
|
85396
85519
|
return node;
|
|
85397
85520
|
}
|
|
85398
85521
|
function onEmitNode(hint, node, emitCallback) {
|
|
85399
|
-
if (node.kind ===
|
|
85522
|
+
if (node.kind === 304) {
|
|
85400
85523
|
currentSourceFile = node;
|
|
85401
85524
|
currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
|
|
85402
85525
|
previousOnEmitNode(hint, node, emitCallback);
|
|
@@ -85476,7 +85599,7 @@ var ts;
|
|
|
85476
85599
|
}
|
|
85477
85600
|
else if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64)) && !ts.isLocalName(node)) {
|
|
85478
85601
|
var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
|
|
85479
|
-
if (exportContainer && exportContainer.kind ===
|
|
85602
|
+
if (exportContainer && exportContainer.kind === 304) {
|
|
85480
85603
|
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)), node);
|
|
85481
85604
|
}
|
|
85482
85605
|
var importDeclaration = resolver.getReferencedImportDeclaration(node);
|
|
@@ -85541,10 +85664,10 @@ var ts;
|
|
|
85541
85664
|
context.onSubstituteNode = onSubstituteNode;
|
|
85542
85665
|
context.onEmitNode = onEmitNode;
|
|
85543
85666
|
context.enableSubstitution(79);
|
|
85544
|
-
context.enableSubstitution(
|
|
85667
|
+
context.enableSubstitution(296);
|
|
85545
85668
|
context.enableSubstitution(220);
|
|
85546
85669
|
context.enableSubstitution(230);
|
|
85547
|
-
context.enableEmitNotification(
|
|
85670
|
+
context.enableEmitNotification(304);
|
|
85548
85671
|
var moduleInfoMap = [];
|
|
85549
85672
|
var deferredExports = [];
|
|
85550
85673
|
var exportFunctionsMap = [];
|
|
@@ -85881,7 +86004,7 @@ var ts;
|
|
|
85881
86004
|
}
|
|
85882
86005
|
function shouldHoistVariableDeclarationList(node) {
|
|
85883
86006
|
return (ts.getEmitFlags(node) & 2097152) === 0
|
|
85884
|
-
&& (enclosingBlockScopedContainer.kind ===
|
|
86007
|
+
&& (enclosingBlockScopedContainer.kind === 304
|
|
85885
86008
|
|| (ts.getOriginalNode(node).flags & 3) === 0);
|
|
85886
86009
|
}
|
|
85887
86010
|
function transformInitializedVariable(node, isExportedDeclaration) {
|
|
@@ -86079,9 +86202,9 @@ var ts;
|
|
|
86079
86202
|
return visitCatchClause(node);
|
|
86080
86203
|
case 234:
|
|
86081
86204
|
return visitBlock(node);
|
|
86082
|
-
case 350:
|
|
86083
|
-
return visitMergeDeclarationMarker(node);
|
|
86084
86205
|
case 351:
|
|
86206
|
+
return visitMergeDeclarationMarker(node);
|
|
86207
|
+
case 352:
|
|
86085
86208
|
return visitEndOfDeclarationMarker(node);
|
|
86086
86209
|
default:
|
|
86087
86210
|
return visitor(node);
|
|
@@ -86184,7 +86307,7 @@ var ts;
|
|
|
86184
86307
|
return visitExpressionStatement(node);
|
|
86185
86308
|
case 211:
|
|
86186
86309
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
86187
|
-
case
|
|
86310
|
+
case 349:
|
|
86188
86311
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
86189
86312
|
case 220:
|
|
86190
86313
|
if (ts.isDestructuringAssignment(node)) {
|
|
@@ -86250,7 +86373,7 @@ var ts;
|
|
|
86250
86373
|
}
|
|
86251
86374
|
else if (ts.isIdentifier(node)) {
|
|
86252
86375
|
var container = resolver.getReferencedExportContainer(node);
|
|
86253
|
-
return container !== undefined && container.kind ===
|
|
86376
|
+
return container !== undefined && container.kind === 304;
|
|
86254
86377
|
}
|
|
86255
86378
|
else {
|
|
86256
86379
|
return false;
|
|
@@ -86301,7 +86424,7 @@ var ts;
|
|
|
86301
86424
|
return node;
|
|
86302
86425
|
}
|
|
86303
86426
|
function onEmitNode(hint, node, emitCallback) {
|
|
86304
|
-
if (node.kind ===
|
|
86427
|
+
if (node.kind === 304) {
|
|
86305
86428
|
var id = ts.getOriginalNodeId(node);
|
|
86306
86429
|
currentSourceFile = node;
|
|
86307
86430
|
moduleInfo = moduleInfoMap[id];
|
|
@@ -86337,7 +86460,7 @@ var ts;
|
|
|
86337
86460
|
}
|
|
86338
86461
|
function substituteUnspecified(node) {
|
|
86339
86462
|
switch (node.kind) {
|
|
86340
|
-
case
|
|
86463
|
+
case 296:
|
|
86341
86464
|
return substituteShorthandPropertyAssignment(node);
|
|
86342
86465
|
}
|
|
86343
86466
|
return node;
|
|
@@ -86422,7 +86545,7 @@ var ts;
|
|
|
86422
86545
|
|| resolver.getReferencedValueDeclaration(name);
|
|
86423
86546
|
if (valueDeclaration) {
|
|
86424
86547
|
var exportContainer = resolver.getReferencedExportContainer(name, false);
|
|
86425
|
-
if (exportContainer && exportContainer.kind ===
|
|
86548
|
+
if (exportContainer && exportContainer.kind === 304) {
|
|
86426
86549
|
exportedNames = ts.append(exportedNames, factory.getDeclarationName(valueDeclaration));
|
|
86427
86550
|
}
|
|
86428
86551
|
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
|
|
@@ -86454,7 +86577,7 @@ var ts;
|
|
|
86454
86577
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
86455
86578
|
context.onEmitNode = onEmitNode;
|
|
86456
86579
|
context.onSubstituteNode = onSubstituteNode;
|
|
86457
|
-
context.enableEmitNotification(
|
|
86580
|
+
context.enableEmitNotification(304);
|
|
86458
86581
|
context.enableSubstitution(79);
|
|
86459
86582
|
var helperNameSubstitutions;
|
|
86460
86583
|
var currentSourceFile;
|
|
@@ -86605,8 +86728,8 @@ var ts;
|
|
|
86605
86728
|
var cjsOnEmitNode = context.onEmitNode;
|
|
86606
86729
|
context.onSubstituteNode = onSubstituteNode;
|
|
86607
86730
|
context.onEmitNode = onEmitNode;
|
|
86608
|
-
context.enableSubstitution(
|
|
86609
|
-
context.enableEmitNotification(
|
|
86731
|
+
context.enableSubstitution(304);
|
|
86732
|
+
context.enableEmitNotification(304);
|
|
86610
86733
|
var currentSourceFile;
|
|
86611
86734
|
return transformSourceFileOrBundle;
|
|
86612
86735
|
function onSubstituteNode(hint, node) {
|
|
@@ -86650,7 +86773,7 @@ var ts;
|
|
|
86650
86773
|
return result;
|
|
86651
86774
|
}
|
|
86652
86775
|
function transformSourceFileOrBundle(node) {
|
|
86653
|
-
return node.kind ===
|
|
86776
|
+
return node.kind === 304 ? transformSourceFile(node) : transformBundle(node);
|
|
86654
86777
|
}
|
|
86655
86778
|
function transformBundle(node) {
|
|
86656
86779
|
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
@@ -87264,10 +87387,10 @@ var ts;
|
|
|
87264
87387
|
return result;
|
|
87265
87388
|
}
|
|
87266
87389
|
function transformRoot(node) {
|
|
87267
|
-
if (node.kind ===
|
|
87390
|
+
if (node.kind === 304 && node.isDeclarationFile) {
|
|
87268
87391
|
return node;
|
|
87269
87392
|
}
|
|
87270
|
-
if (node.kind ===
|
|
87393
|
+
if (node.kind === 305) {
|
|
87271
87394
|
isBundledEmit = true;
|
|
87272
87395
|
refs = new ts.Map();
|
|
87273
87396
|
libs = new ts.Map();
|
|
@@ -87297,7 +87420,7 @@ var ts;
|
|
|
87297
87420
|
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
87298
87421
|
return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), true, [], [], false, []);
|
|
87299
87422
|
}), ts.mapDefined(node.prepends, function (prepend) {
|
|
87300
|
-
if (prepend.kind ===
|
|
87423
|
+
if (prepend.kind === 307) {
|
|
87301
87424
|
var sourceFile = ts.createUnparsedSourceFile(prepend, "dts", stripInternal);
|
|
87302
87425
|
hasNoDefaultLib_1 = hasNoDefaultLib_1 || !!sourceFile.hasNoDefaultLib;
|
|
87303
87426
|
collectReferences(sourceFile, refs);
|
|
@@ -87645,22 +87768,22 @@ var ts;
|
|
|
87645
87768
|
}
|
|
87646
87769
|
function transformImportDeclaration(decl) {
|
|
87647
87770
|
if (!decl.importClause) {
|
|
87648
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87771
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87649
87772
|
}
|
|
87650
87773
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
87651
87774
|
if (!decl.importClause.namedBindings) {
|
|
87652
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87775
|
+
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);
|
|
87653
87776
|
}
|
|
87654
87777
|
if (decl.importClause.namedBindings.kind === 267) {
|
|
87655
87778
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
87656
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined) : undefined;
|
|
87779
|
+
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;
|
|
87657
87780
|
}
|
|
87658
87781
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
87659
87782
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
87660
|
-
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);
|
|
87783
|
+
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);
|
|
87661
87784
|
}
|
|
87662
87785
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
87663
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87786
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87664
87787
|
}
|
|
87665
87788
|
}
|
|
87666
87789
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
@@ -87830,7 +87953,7 @@ var ts;
|
|
|
87830
87953
|
case 199: {
|
|
87831
87954
|
if (!ts.isLiteralImportTypeNode(input))
|
|
87832
87955
|
return cleanup(input);
|
|
87833
|
-
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));
|
|
87956
|
+
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));
|
|
87834
87957
|
}
|
|
87835
87958
|
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
|
|
87836
87959
|
}
|
|
@@ -87873,7 +87996,7 @@ var ts;
|
|
|
87873
87996
|
resultHasExternalModuleIndicator = true;
|
|
87874
87997
|
}
|
|
87875
87998
|
resultHasScopeMarker = true;
|
|
87876
|
-
return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), undefined);
|
|
87999
|
+
return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), ts.getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined);
|
|
87877
88000
|
}
|
|
87878
88001
|
case 270: {
|
|
87879
88002
|
if (ts.isSourceFile(input.parent)) {
|
|
@@ -88194,7 +88317,7 @@ var ts;
|
|
|
88194
88317
|
function ensureModifierFlags(node) {
|
|
88195
88318
|
var mask = 27647 ^ (4 | 256 | 16384);
|
|
88196
88319
|
var additions = (needsDeclare && !isAlwaysType(node)) ? 2 : 0;
|
|
88197
|
-
var parentIsFile = node.parent.kind ===
|
|
88320
|
+
var parentIsFile = node.parent.kind === 304;
|
|
88198
88321
|
if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
|
|
88199
88322
|
mask ^= 2;
|
|
88200
88323
|
additions = 0;
|
|
@@ -88405,7 +88528,7 @@ var ts;
|
|
|
88405
88528
|
}
|
|
88406
88529
|
ts.noEmitNotification = noEmitNotification;
|
|
88407
88530
|
function transformNodes(resolver, host, factory, options, nodes, transformers, allowDtsFiles) {
|
|
88408
|
-
var enabledSyntaxKindFeatures = new Array(
|
|
88531
|
+
var enabledSyntaxKindFeatures = new Array(354);
|
|
88409
88532
|
var lexicalEnvironmentVariableDeclarations;
|
|
88410
88533
|
var lexicalEnvironmentFunctionDeclarations;
|
|
88411
88534
|
var lexicalEnvironmentStatements;
|
|
@@ -88481,7 +88604,7 @@ var ts;
|
|
|
88481
88604
|
var transformed = [];
|
|
88482
88605
|
for (var _a = 0, nodes_3 = nodes; _a < nodes_3.length; _a++) {
|
|
88483
88606
|
var node = nodes_3[_a];
|
|
88484
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "transformNodes", node.kind ===
|
|
88607
|
+
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 });
|
|
88485
88608
|
transformed.push((allowDtsFiles ? transformation : transformRoot)(node));
|
|
88486
88609
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
88487
88610
|
}
|
|
@@ -88809,7 +88932,7 @@ var ts;
|
|
|
88809
88932
|
ts.getOutputPathsForBundle = getOutputPathsForBundle;
|
|
88810
88933
|
function getOutputPathsFor(sourceFile, host, forceDtsPaths) {
|
|
88811
88934
|
var options = host.getCompilerOptions();
|
|
88812
|
-
if (sourceFile.kind ===
|
|
88935
|
+
if (sourceFile.kind === 305) {
|
|
88813
88936
|
return getOutputPathsForBundle(options, forceDtsPaths);
|
|
88814
88937
|
}
|
|
88815
88938
|
else {
|
|
@@ -89130,7 +89253,7 @@ var ts;
|
|
|
89130
89253
|
mapRoot: compilerOptions.mapRoot,
|
|
89131
89254
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
89132
89255
|
});
|
|
89133
|
-
if (forceDtsEmit && declarationTransform.transformed[0].kind ===
|
|
89256
|
+
if (forceDtsEmit && declarationTransform.transformed[0].kind === 304) {
|
|
89134
89257
|
var sourceFile = declarationTransform.transformed[0];
|
|
89135
89258
|
exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
|
|
89136
89259
|
}
|
|
@@ -89153,8 +89276,8 @@ var ts;
|
|
|
89153
89276
|
ts.forEachChild(node, collectLinkedAliases);
|
|
89154
89277
|
}
|
|
89155
89278
|
function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle, printer, mapOptions) {
|
|
89156
|
-
var bundle = sourceFileOrBundle.kind ===
|
|
89157
|
-
var sourceFile = sourceFileOrBundle.kind ===
|
|
89279
|
+
var bundle = sourceFileOrBundle.kind === 305 ? sourceFileOrBundle : undefined;
|
|
89280
|
+
var sourceFile = sourceFileOrBundle.kind === 304 ? sourceFileOrBundle : undefined;
|
|
89158
89281
|
var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
|
|
89159
89282
|
var sourceMapGenerator;
|
|
89160
89283
|
if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) {
|
|
@@ -89192,7 +89315,7 @@ var ts;
|
|
|
89192
89315
|
}
|
|
89193
89316
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
89194
89317
|
return (mapOptions.sourceMap || mapOptions.inlineSourceMap)
|
|
89195
|
-
&& (sourceFileOrBundle.kind !==
|
|
89318
|
+
&& (sourceFileOrBundle.kind !== 304 || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json"));
|
|
89196
89319
|
}
|
|
89197
89320
|
function getSourceRoot(mapOptions) {
|
|
89198
89321
|
var sourceRoot = ts.normalizeSlashes(mapOptions.sourceRoot || "");
|
|
@@ -89468,9 +89591,9 @@ var ts;
|
|
|
89468
89591
|
break;
|
|
89469
89592
|
}
|
|
89470
89593
|
switch (node.kind) {
|
|
89471
|
-
case
|
|
89472
|
-
case
|
|
89473
|
-
case
|
|
89594
|
+
case 304: return printFile(node);
|
|
89595
|
+
case 305: return printBundle(node);
|
|
89596
|
+
case 306: return printUnparsedSource(node);
|
|
89474
89597
|
}
|
|
89475
89598
|
writeNode(hint, node, sourceFile, beginPrint());
|
|
89476
89599
|
return endPrint();
|
|
@@ -89995,91 +90118,91 @@ var ts;
|
|
|
89995
90118
|
return emitHeritageClause(node);
|
|
89996
90119
|
case 291:
|
|
89997
90120
|
return emitCatchClause(node);
|
|
89998
|
-
case 294:
|
|
89999
|
-
return emitPropertyAssignment(node);
|
|
90000
90121
|
case 295:
|
|
90001
|
-
return
|
|
90122
|
+
return emitPropertyAssignment(node);
|
|
90002
90123
|
case 296:
|
|
90003
|
-
return
|
|
90124
|
+
return emitShorthandPropertyAssignment(node);
|
|
90004
90125
|
case 297:
|
|
90005
|
-
return
|
|
90126
|
+
return emitSpreadAssignment(node);
|
|
90006
90127
|
case 298:
|
|
90007
|
-
return
|
|
90008
|
-
case 305:
|
|
90128
|
+
return emitEnumMember(node);
|
|
90009
90129
|
case 299:
|
|
90010
|
-
return
|
|
90130
|
+
return writeUnparsedNode(node);
|
|
90131
|
+
case 306:
|
|
90011
90132
|
case 300:
|
|
90133
|
+
return emitUnparsedSourceOrPrepend(node);
|
|
90012
90134
|
case 301:
|
|
90013
|
-
return emitUnparsedTextLike(node);
|
|
90014
90135
|
case 302:
|
|
90015
|
-
return
|
|
90136
|
+
return emitUnparsedTextLike(node);
|
|
90016
90137
|
case 303:
|
|
90017
|
-
return
|
|
90138
|
+
return emitUnparsedSyntheticReference(node);
|
|
90018
90139
|
case 304:
|
|
90140
|
+
return emitSourceFile(node);
|
|
90141
|
+
case 305:
|
|
90019
90142
|
return ts.Debug.fail("Bundles should be printed using printBundle");
|
|
90020
|
-
case 306:
|
|
90021
|
-
return ts.Debug.fail("InputFiles should not be printed");
|
|
90022
90143
|
case 307:
|
|
90023
|
-
return
|
|
90144
|
+
return ts.Debug.fail("InputFiles should not be printed");
|
|
90024
90145
|
case 308:
|
|
90146
|
+
return emitJSDocTypeExpression(node);
|
|
90147
|
+
case 309:
|
|
90025
90148
|
return emitJSDocNameReference(node);
|
|
90026
|
-
case 310:
|
|
90027
|
-
return writePunctuation("*");
|
|
90028
90149
|
case 311:
|
|
90029
|
-
return writePunctuation("
|
|
90150
|
+
return writePunctuation("*");
|
|
90030
90151
|
case 312:
|
|
90031
|
-
return
|
|
90152
|
+
return writePunctuation("?");
|
|
90032
90153
|
case 313:
|
|
90033
|
-
return
|
|
90154
|
+
return emitJSDocNullableType(node);
|
|
90034
90155
|
case 314:
|
|
90035
|
-
return
|
|
90156
|
+
return emitJSDocNonNullableType(node);
|
|
90036
90157
|
case 315:
|
|
90158
|
+
return emitJSDocOptionalType(node);
|
|
90159
|
+
case 316:
|
|
90037
90160
|
return emitJSDocFunctionType(node);
|
|
90038
90161
|
case 185:
|
|
90039
|
-
case 316:
|
|
90040
|
-
return emitRestOrJSDocVariadicType(node);
|
|
90041
90162
|
case 317:
|
|
90042
|
-
return;
|
|
90163
|
+
return emitRestOrJSDocVariadicType(node);
|
|
90043
90164
|
case 318:
|
|
90165
|
+
return;
|
|
90166
|
+
case 319:
|
|
90044
90167
|
return emitJSDoc(node);
|
|
90045
|
-
case 320:
|
|
90046
|
-
return emitJSDocTypeLiteral(node);
|
|
90047
90168
|
case 321:
|
|
90169
|
+
return emitJSDocTypeLiteral(node);
|
|
90170
|
+
case 322:
|
|
90048
90171
|
return emitJSDocSignature(node);
|
|
90049
|
-
case 325:
|
|
90050
|
-
case 330:
|
|
90051
|
-
case 335:
|
|
90052
|
-
return emitJSDocSimpleTag(node);
|
|
90053
90172
|
case 326:
|
|
90173
|
+
case 331:
|
|
90174
|
+
case 336:
|
|
90175
|
+
return emitJSDocSimpleTag(node);
|
|
90054
90176
|
case 327:
|
|
90055
|
-
return emitJSDocHeritageTag(node);
|
|
90056
90177
|
case 328:
|
|
90178
|
+
return emitJSDocHeritageTag(node);
|
|
90057
90179
|
case 329:
|
|
90180
|
+
case 330:
|
|
90058
90181
|
return;
|
|
90059
|
-
case 331:
|
|
90060
90182
|
case 332:
|
|
90061
90183
|
case 333:
|
|
90062
90184
|
case 334:
|
|
90185
|
+
case 335:
|
|
90063
90186
|
return;
|
|
90064
|
-
case 336:
|
|
90065
|
-
return emitJSDocCallbackTag(node);
|
|
90066
|
-
case 338:
|
|
90067
|
-
case 345:
|
|
90068
|
-
return emitJSDocPropertyLikeTag(node);
|
|
90069
90187
|
case 337:
|
|
90188
|
+
return emitJSDocCallbackTag(node);
|
|
90070
90189
|
case 339:
|
|
90190
|
+
case 346:
|
|
90191
|
+
return emitJSDocPropertyLikeTag(node);
|
|
90192
|
+
case 338:
|
|
90071
90193
|
case 340:
|
|
90072
90194
|
case 341:
|
|
90073
|
-
return emitJSDocSimpleTypedTag(node);
|
|
90074
90195
|
case 342:
|
|
90075
|
-
return
|
|
90196
|
+
return emitJSDocSimpleTypedTag(node);
|
|
90076
90197
|
case 343:
|
|
90077
|
-
return
|
|
90198
|
+
return emitJSDocTemplateTag(node);
|
|
90078
90199
|
case 344:
|
|
90200
|
+
return emitJSDocTypedefTag(node);
|
|
90201
|
+
case 345:
|
|
90079
90202
|
return emitJSDocSeeTag(node);
|
|
90080
|
-
case
|
|
90203
|
+
case 348:
|
|
90204
|
+
case 352:
|
|
90081
90205
|
case 351:
|
|
90082
|
-
case 350:
|
|
90083
90206
|
return;
|
|
90084
90207
|
}
|
|
90085
90208
|
if (ts.isExpression(node)) {
|
|
@@ -90172,18 +90295,18 @@ var ts;
|
|
|
90172
90295
|
return emitJsxSelfClosingElement(node);
|
|
90173
90296
|
case 281:
|
|
90174
90297
|
return emitJsxFragment(node);
|
|
90175
|
-
case 346:
|
|
90176
|
-
return ts.Debug.fail("SyntaxList should not be printed");
|
|
90177
90298
|
case 347:
|
|
90178
|
-
return;
|
|
90299
|
+
return ts.Debug.fail("SyntaxList should not be printed");
|
|
90179
90300
|
case 348:
|
|
90180
|
-
return
|
|
90301
|
+
return;
|
|
90181
90302
|
case 349:
|
|
90182
|
-
return
|
|
90303
|
+
return emitPartiallyEmittedExpression(node);
|
|
90183
90304
|
case 350:
|
|
90305
|
+
return emitCommaList(node);
|
|
90184
90306
|
case 351:
|
|
90185
|
-
return;
|
|
90186
90307
|
case 352:
|
|
90308
|
+
return;
|
|
90309
|
+
case 353:
|
|
90187
90310
|
return ts.Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
90188
90311
|
}
|
|
90189
90312
|
}
|
|
@@ -90231,7 +90354,7 @@ var ts;
|
|
|
90231
90354
|
}
|
|
90232
90355
|
function emitHelpers(node) {
|
|
90233
90356
|
var helpersEmitted = false;
|
|
90234
|
-
var bundle = node.kind ===
|
|
90357
|
+
var bundle = node.kind === 305 ? node : undefined;
|
|
90235
90358
|
if (bundle && moduleKind === ts.ModuleKind.None) {
|
|
90236
90359
|
return;
|
|
90237
90360
|
}
|
|
@@ -90305,7 +90428,7 @@ var ts;
|
|
|
90305
90428
|
var pos = getTextPosWithWriteLine();
|
|
90306
90429
|
writeUnparsedNode(unparsed);
|
|
90307
90430
|
if (bundleFileInfo) {
|
|
90308
|
-
updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind ===
|
|
90431
|
+
updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 301 ?
|
|
90309
90432
|
"text" :
|
|
90310
90433
|
"internal");
|
|
90311
90434
|
}
|
|
@@ -90388,7 +90511,7 @@ var ts;
|
|
|
90388
90511
|
emit(node.dotDotDotToken);
|
|
90389
90512
|
emitNodeWithWriter(node.name, writeParameter);
|
|
90390
90513
|
emit(node.questionToken);
|
|
90391
|
-
if (node.parent && node.parent.kind ===
|
|
90514
|
+
if (node.parent && node.parent.kind === 316 && !node.name) {
|
|
90392
90515
|
emit(node.type);
|
|
90393
90516
|
}
|
|
90394
90517
|
else {
|
|
@@ -90695,6 +90818,19 @@ var ts;
|
|
|
90695
90818
|
writeKeyword("import");
|
|
90696
90819
|
writePunctuation("(");
|
|
90697
90820
|
emit(node.argument);
|
|
90821
|
+
if (node.assertions) {
|
|
90822
|
+
writePunctuation(",");
|
|
90823
|
+
writeSpace();
|
|
90824
|
+
writePunctuation("{");
|
|
90825
|
+
writeSpace();
|
|
90826
|
+
writeKeyword("assert");
|
|
90827
|
+
writePunctuation(":");
|
|
90828
|
+
writeSpace();
|
|
90829
|
+
var elements = node.assertions.assertClause.elements;
|
|
90830
|
+
emitList(node.assertions.assertClause, elements, 526226);
|
|
90831
|
+
writeSpace();
|
|
90832
|
+
writePunctuation("}");
|
|
90833
|
+
}
|
|
90698
90834
|
writePunctuation(")");
|
|
90699
90835
|
if (node.qualifier) {
|
|
90700
90836
|
writePunctuation(".");
|
|
@@ -91832,7 +91968,7 @@ var ts;
|
|
|
91832
91968
|
}
|
|
91833
91969
|
}
|
|
91834
91970
|
if (node.tags) {
|
|
91835
|
-
if (node.tags.length === 1 && node.tags[0].kind ===
|
|
91971
|
+
if (node.tags.length === 1 && node.tags[0].kind === 342 && !node.comment) {
|
|
91836
91972
|
writeSpace();
|
|
91837
91973
|
emit(node.tags[0]);
|
|
91838
91974
|
}
|
|
@@ -91877,7 +92013,7 @@ var ts;
|
|
|
91877
92013
|
function emitJSDocTypedefTag(tag) {
|
|
91878
92014
|
emitJSDocTagName(tag.tagName);
|
|
91879
92015
|
if (tag.typeExpression) {
|
|
91880
|
-
if (tag.typeExpression.kind ===
|
|
92016
|
+
if (tag.typeExpression.kind === 308) {
|
|
91881
92017
|
emitJSDocTypeExpression(tag.typeExpression);
|
|
91882
92018
|
}
|
|
91883
92019
|
else {
|
|
@@ -91896,7 +92032,7 @@ var ts;
|
|
|
91896
92032
|
emit(tag.fullName);
|
|
91897
92033
|
}
|
|
91898
92034
|
emitJSDocComment(tag.comment);
|
|
91899
|
-
if (tag.typeExpression && tag.typeExpression.kind ===
|
|
92035
|
+
if (tag.typeExpression && tag.typeExpression.kind === 321) {
|
|
91900
92036
|
emitJSDocTypeLiteral(tag.typeExpression);
|
|
91901
92037
|
}
|
|
91902
92038
|
}
|
|
@@ -92864,8 +93000,8 @@ var ts;
|
|
|
92864
93000
|
if (!node)
|
|
92865
93001
|
return;
|
|
92866
93002
|
switch (node.kind) {
|
|
92867
|
-
case 294:
|
|
92868
93003
|
case 295:
|
|
93004
|
+
case 296:
|
|
92869
93005
|
case 166:
|
|
92870
93006
|
case 168:
|
|
92871
93007
|
case 171:
|
|
@@ -93087,7 +93223,7 @@ var ts;
|
|
|
93087
93223
|
var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 11;
|
|
93088
93224
|
if ((pos > 0 || end > 0) && pos !== end) {
|
|
93089
93225
|
if (!skipLeadingComments) {
|
|
93090
|
-
emitLeadingComments(pos, node.kind !==
|
|
93226
|
+
emitLeadingComments(pos, node.kind !== 348);
|
|
93091
93227
|
}
|
|
93092
93228
|
if (!skipLeadingComments || (pos >= 0 && (emitFlags & 512) !== 0)) {
|
|
93093
93229
|
containerPos = pos;
|
|
@@ -93110,7 +93246,7 @@ var ts;
|
|
|
93110
93246
|
containerPos = savedContainerPos;
|
|
93111
93247
|
containerEnd = savedContainerEnd;
|
|
93112
93248
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
93113
|
-
if (!skipTrailingComments && node.kind !==
|
|
93249
|
+
if (!skipTrailingComments && node.kind !== 348) {
|
|
93114
93250
|
emitTrailingComments(end);
|
|
93115
93251
|
}
|
|
93116
93252
|
}
|
|
@@ -93361,7 +93497,7 @@ var ts;
|
|
|
93361
93497
|
}
|
|
93362
93498
|
else {
|
|
93363
93499
|
var source = sourceMapRange.source || sourceMapSource;
|
|
93364
|
-
if (node.kind !==
|
|
93500
|
+
if (node.kind !== 348
|
|
93365
93501
|
&& (emitFlags & 16) === 0
|
|
93366
93502
|
&& sourceMapRange.pos >= 0) {
|
|
93367
93503
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
@@ -93378,7 +93514,7 @@ var ts;
|
|
|
93378
93514
|
if (emitFlags & 64) {
|
|
93379
93515
|
sourceMapsDisabled = false;
|
|
93380
93516
|
}
|
|
93381
|
-
if (node.kind !==
|
|
93517
|
+
if (node.kind !== 348
|
|
93382
93518
|
&& (emitFlags & 32) === 0
|
|
93383
93519
|
&& sourceMapRange.end >= 0) {
|
|
93384
93520
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
@@ -94378,17 +94514,66 @@ var ts;
|
|
|
94378
94514
|
return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
|
|
94379
94515
|
}
|
|
94380
94516
|
ts.getModeForResolutionAtIndex = getModeForResolutionAtIndex;
|
|
94381
|
-
function
|
|
94517
|
+
function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
94382
94518
|
var _a;
|
|
94519
|
+
if (ts.isExportDeclaration(decl)) {
|
|
94520
|
+
return decl.isTypeOnly;
|
|
94521
|
+
}
|
|
94522
|
+
if ((_a = decl.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly) {
|
|
94523
|
+
return true;
|
|
94524
|
+
}
|
|
94525
|
+
return false;
|
|
94526
|
+
}
|
|
94527
|
+
ts.isExclusivelyTypeOnlyImportOrExport = isExclusivelyTypeOnlyImportOrExport;
|
|
94528
|
+
function getModeForUsageLocation(file, usage) {
|
|
94529
|
+
var _a, _b;
|
|
94383
94530
|
if (file.impliedNodeFormat === undefined)
|
|
94384
94531
|
return undefined;
|
|
94532
|
+
if ((ts.isImportDeclaration(usage.parent) || ts.isExportDeclaration(usage.parent))) {
|
|
94533
|
+
var isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
|
|
94534
|
+
if (isTypeOnly) {
|
|
94535
|
+
var override = getResolutionModeOverrideForClause(usage.parent.assertClause);
|
|
94536
|
+
if (override) {
|
|
94537
|
+
return override;
|
|
94538
|
+
}
|
|
94539
|
+
}
|
|
94540
|
+
}
|
|
94541
|
+
if (usage.parent.parent && ts.isImportTypeNode(usage.parent.parent)) {
|
|
94542
|
+
var override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) === null || _a === void 0 ? void 0 : _a.assertClause);
|
|
94543
|
+
if (override) {
|
|
94544
|
+
return override;
|
|
94545
|
+
}
|
|
94546
|
+
}
|
|
94385
94547
|
if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
94386
94548
|
return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
94387
94549
|
}
|
|
94388
|
-
var exprParentParent = (
|
|
94550
|
+
var exprParentParent = (_b = ts.walkUpParenthesizedExpressions(usage.parent)) === null || _b === void 0 ? void 0 : _b.parent;
|
|
94389
94551
|
return exprParentParent && ts.isImportEqualsDeclaration(exprParentParent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
94390
94552
|
}
|
|
94391
94553
|
ts.getModeForUsageLocation = getModeForUsageLocation;
|
|
94554
|
+
function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) {
|
|
94555
|
+
if (!clause)
|
|
94556
|
+
return undefined;
|
|
94557
|
+
if (ts.length(clause.elements) !== 1) {
|
|
94558
|
+
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);
|
|
94559
|
+
return undefined;
|
|
94560
|
+
}
|
|
94561
|
+
var elem = clause.elements[0];
|
|
94562
|
+
if (!ts.isStringLiteralLike(elem.name))
|
|
94563
|
+
return undefined;
|
|
94564
|
+
if (elem.name.text !== "resolution-mode") {
|
|
94565
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.name, ts.Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions);
|
|
94566
|
+
return undefined;
|
|
94567
|
+
}
|
|
94568
|
+
if (!ts.isStringLiteralLike(elem.value))
|
|
94569
|
+
return undefined;
|
|
94570
|
+
if (elem.value.text !== "import" && elem.value.text !== "require") {
|
|
94571
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.value, ts.Diagnostics.resolution_mode_should_be_either_require_or_import);
|
|
94572
|
+
return undefined;
|
|
94573
|
+
}
|
|
94574
|
+
return elem.value.text === "import" ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
94575
|
+
}
|
|
94576
|
+
ts.getResolutionModeOverrideForClause = getResolutionModeOverrideForClause;
|
|
94392
94577
|
function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
|
|
94393
94578
|
if (names.length === 0) {
|
|
94394
94579
|
return [];
|
|
@@ -99227,70 +99412,81 @@ var ts;
|
|
|
99227
99412
|
useCaseSensitiveFileNames: (_a = host.useCaseSensitiveFileNames) === null || _a === void 0 ? void 0 : _a.call(host),
|
|
99228
99413
|
};
|
|
99229
99414
|
}
|
|
99230
|
-
function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier) {
|
|
99231
|
-
|
|
99415
|
+
function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier, options) {
|
|
99416
|
+
if (options === void 0) { options = {}; }
|
|
99417
|
+
var res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {}, options);
|
|
99232
99418
|
if (res === oldImportSpecifier)
|
|
99233
99419
|
return undefined;
|
|
99234
99420
|
return res;
|
|
99235
99421
|
}
|
|
99236
99422
|
moduleSpecifiers_1.updateModuleSpecifier = updateModuleSpecifier;
|
|
99237
|
-
function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host) {
|
|
99238
|
-
|
|
99423
|
+
function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, options) {
|
|
99424
|
+
if (options === void 0) { options = {}; }
|
|
99425
|
+
return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferences(host, {}, compilerOptions, importingSourceFile), {}, options);
|
|
99239
99426
|
}
|
|
99240
99427
|
moduleSpecifiers_1.getModuleSpecifier = getModuleSpecifier;
|
|
99241
|
-
function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences) {
|
|
99428
|
+
function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options) {
|
|
99429
|
+
if (options === void 0) { options = {}; }
|
|
99242
99430
|
var info = getInfo(importingSourceFile.path, host);
|
|
99243
|
-
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences);
|
|
99244
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true); });
|
|
99431
|
+
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
99432
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
99245
99433
|
}
|
|
99246
99434
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
99247
|
-
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences) {
|
|
99435
|
+
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
99436
|
+
if (options === void 0) { options = {}; }
|
|
99248
99437
|
var info = getInfo(importingSourceFileName, host);
|
|
99249
|
-
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences);
|
|
99250
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions); }) ||
|
|
99438
|
+
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
99439
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
99251
99440
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
99252
99441
|
}
|
|
99253
|
-
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences) {
|
|
99254
|
-
|
|
99442
|
+
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
99443
|
+
if (options === void 0) { options = {}; }
|
|
99444
|
+
return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options)[0];
|
|
99255
99445
|
}
|
|
99256
99446
|
moduleSpecifiers_1.tryGetModuleSpecifiersFromCache = tryGetModuleSpecifiersFromCache;
|
|
99257
|
-
function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences) {
|
|
99447
|
+
function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
99258
99448
|
var _a;
|
|
99449
|
+
if (options === void 0) { options = {}; }
|
|
99259
99450
|
var moduleSourceFile = ts.getSourceFileOfModule(moduleSymbol);
|
|
99260
99451
|
if (!moduleSourceFile) {
|
|
99261
99452
|
return ts.emptyArray;
|
|
99262
99453
|
}
|
|
99263
99454
|
var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
99264
|
-
var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences);
|
|
99455
|
+
var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options);
|
|
99265
99456
|
return [cached === null || cached === void 0 ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached === null || cached === void 0 ? void 0 : cached.modulePaths, cache];
|
|
99266
99457
|
}
|
|
99267
|
-
function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99268
|
-
|
|
99458
|
+
function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99459
|
+
if (options === void 0) { options = {}; }
|
|
99460
|
+
return getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options).moduleSpecifiers;
|
|
99269
99461
|
}
|
|
99270
99462
|
moduleSpecifiers_1.getModuleSpecifiers = getModuleSpecifiers;
|
|
99271
|
-
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99463
|
+
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99464
|
+
if (options === void 0) { options = {}; }
|
|
99272
99465
|
var computedWithoutCache = false;
|
|
99273
99466
|
var ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
|
|
99274
99467
|
if (ambient)
|
|
99275
99468
|
return { moduleSpecifiers: [ambient], computedWithoutCache: computedWithoutCache };
|
|
99276
|
-
var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
|
|
99469
|
+
var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
|
|
99277
99470
|
if (specifiers)
|
|
99278
99471
|
return { moduleSpecifiers: specifiers, computedWithoutCache: computedWithoutCache };
|
|
99279
99472
|
if (!moduleSourceFile)
|
|
99280
99473
|
return { moduleSpecifiers: ts.emptyArray, computedWithoutCache: computedWithoutCache };
|
|
99281
99474
|
computedWithoutCache = true;
|
|
99282
99475
|
modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
|
|
99283
|
-
var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences);
|
|
99284
|
-
cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, modulePaths, result);
|
|
99476
|
+
var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
|
|
99477
|
+
cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
|
|
99285
99478
|
return { moduleSpecifiers: result, computedWithoutCache: computedWithoutCache };
|
|
99286
99479
|
}
|
|
99287
99480
|
moduleSpecifiers_1.getModuleSpecifiersWithCacheInfo = getModuleSpecifiersWithCacheInfo;
|
|
99288
|
-
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99481
|
+
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99482
|
+
if (options === void 0) { options = {}; }
|
|
99289
99483
|
var info = getInfo(importingSourceFile.path, host);
|
|
99290
99484
|
var preferences = getPreferences(host, userPreferences, compilerOptions, importingSourceFile);
|
|
99291
99485
|
var existingSpecifier = ts.forEach(modulePaths, function (modulePath) { return ts.forEach(host.getFileIncludeReasons().get(ts.toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), function (reason) {
|
|
99292
99486
|
if (reason.kind !== ts.FileIncludeKind.Import || reason.file !== importingSourceFile.path)
|
|
99293
99487
|
return undefined;
|
|
99488
|
+
if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== ts.getModeForResolutionAtIndex(importingSourceFile, reason.index))
|
|
99489
|
+
return undefined;
|
|
99294
99490
|
var specifier = ts.getModuleNameStringLiteralAt(importingSourceFile, reason.index).text;
|
|
99295
99491
|
return preferences.relativePreference !== 1 || !ts.pathIsRelative(specifier) ?
|
|
99296
99492
|
specifier :
|
|
@@ -99306,7 +99502,7 @@ var ts;
|
|
|
99306
99502
|
var relativeSpecifiers;
|
|
99307
99503
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
99308
99504
|
var modulePath = modulePaths_1[_i];
|
|
99309
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions);
|
|
99505
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
99310
99506
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
99311
99507
|
if (specifier && modulePath.isRedirect) {
|
|
99312
99508
|
return nodeModulesSpecifiers;
|
|
@@ -99445,18 +99641,19 @@ var ts;
|
|
|
99445
99641
|
: undefined);
|
|
99446
99642
|
}
|
|
99447
99643
|
moduleSpecifiers_1.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
99448
|
-
function getAllModulePaths(importingFilePath, importedFileName, host, preferences,
|
|
99644
|
+
function getAllModulePaths(importingFilePath, importedFileName, host, preferences, options) {
|
|
99449
99645
|
var _a;
|
|
99450
|
-
if (
|
|
99646
|
+
if (options === void 0) { options = {}; }
|
|
99647
|
+
var importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host));
|
|
99451
99648
|
var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
99452
99649
|
if (cache) {
|
|
99453
|
-
var cached = cache.get(importingFilePath, importedFilePath, preferences);
|
|
99650
|
+
var cached = cache.get(importingFilePath, importedFilePath, preferences, options);
|
|
99454
99651
|
if (cached === null || cached === void 0 ? void 0 : cached.modulePaths)
|
|
99455
99652
|
return cached.modulePaths;
|
|
99456
99653
|
}
|
|
99457
99654
|
var modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host);
|
|
99458
99655
|
if (cache) {
|
|
99459
|
-
cache.setModulePaths(importingFilePath, importedFilePath, preferences, modulePaths);
|
|
99656
|
+
cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths);
|
|
99460
99657
|
}
|
|
99461
99658
|
return modulePaths;
|
|
99462
99659
|
}
|
|
@@ -99636,7 +99833,7 @@ var ts;
|
|
|
99636
99833
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
99637
99834
|
: ts.removeFileExtension(relativePath);
|
|
99638
99835
|
}
|
|
99639
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly) {
|
|
99836
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
99640
99837
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
99641
99838
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
99642
99839
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -99695,7 +99892,7 @@ var ts;
|
|
|
99695
99892
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
99696
99893
|
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
99697
99894
|
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
99698
|
-
var conditions = ["node", importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99895
|
+
var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99699
99896
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
99700
99897
|
? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
|
|
99701
99898
|
: undefined;
|