typescript 4.7.0-dev.20220302 → 4.7.0-dev.20220305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/de/diagnosticMessages.generated.json +3 -0
- package/lib/fr/diagnosticMessages.generated.json +3 -0
- package/lib/ja/diagnosticMessages.generated.json +3 -0
- package/lib/ko/diagnosticMessages.generated.json +3 -0
- package/lib/lib.es2015.reflect.d.ts +1 -1
- package/lib/lib.es2020.intl.d.ts +1 -1
- package/lib/lib.es5.d.ts +6 -0
- package/lib/pt-br/diagnosticMessages.generated.json +3 -0
- package/lib/ru/diagnosticMessages.generated.json +3 -0
- package/lib/tsc.js +985 -695
- package/lib/tsserver.js +1304 -1006
- package/lib/tsserverlibrary.d.ts +84 -66
- package/lib/tsserverlibrary.js +1304 -1006
- package/lib/typescript.d.ts +84 -66
- package/lib/typescript.js +1292 -994
- package/lib/typescriptServices.d.ts +84 -66
- package/lib/typescriptServices.js +1292 -994
- package/lib/typingsInstaller.js +1117 -821
- package/lib/zh-cn/diagnosticMessages.generated.json +3 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +3 -0
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220305";
|
|
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
|
}
|
|
@@ -25861,7 +25891,7 @@ var ts;
|
|
|
25861
25891
|
return false;
|
|
25862
25892
|
}
|
|
25863
25893
|
function isReusableEnumMember(node) {
|
|
25864
|
-
return node.kind ===
|
|
25894
|
+
return node.kind === 298;
|
|
25865
25895
|
}
|
|
25866
25896
|
function isReusableTypeMember(node) {
|
|
25867
25897
|
if (node) {
|
|
@@ -26619,6 +26649,22 @@ var ts;
|
|
|
26619
26649
|
nextToken();
|
|
26620
26650
|
return token() === 100;
|
|
26621
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
|
+
}
|
|
26622
26668
|
function parseImportType() {
|
|
26623
26669
|
sourceFlags |= 1048576;
|
|
26624
26670
|
var pos = getNodePos();
|
|
@@ -26626,10 +26672,14 @@ var ts;
|
|
|
26626
26672
|
parseExpected(100);
|
|
26627
26673
|
parseExpected(20);
|
|
26628
26674
|
var type = parseType();
|
|
26675
|
+
var assertions;
|
|
26676
|
+
if (parseOptional(27)) {
|
|
26677
|
+
assertions = parseImportTypeAssertions();
|
|
26678
|
+
}
|
|
26629
26679
|
parseExpected(21);
|
|
26630
26680
|
var qualifier = parseOptional(24) ? parseEntityNameOfTypeReference() : undefined;
|
|
26631
26681
|
var typeArguments = parseTypeArgumentsOfTypeReference();
|
|
26632
|
-
return finishNode(factory.createImportTypeNode(type, qualifier, typeArguments, isTypeOf), pos);
|
|
26682
|
+
return finishNode(factory.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos);
|
|
26633
26683
|
}
|
|
26634
26684
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
26635
26685
|
nextToken();
|
|
@@ -29212,9 +29262,11 @@ var ts;
|
|
|
29212
29262
|
var value = parseAssignmentExpressionOrHigher(false);
|
|
29213
29263
|
return finishNode(factory.createAssertEntry(name, value), pos);
|
|
29214
29264
|
}
|
|
29215
|
-
function parseAssertClause() {
|
|
29265
|
+
function parseAssertClause(skipAssertKeyword) {
|
|
29216
29266
|
var pos = getNodePos();
|
|
29217
|
-
|
|
29267
|
+
if (!skipAssertKeyword) {
|
|
29268
|
+
parseExpected(129);
|
|
29269
|
+
}
|
|
29218
29270
|
var openBracePosition = scanner.getTokenPos();
|
|
29219
29271
|
if (parseExpected(18)) {
|
|
29220
29272
|
var multiLine = scanner.hasPrecedingLineBreak();
|
|
@@ -29974,7 +30026,7 @@ var ts;
|
|
|
29974
30026
|
var child = void 0;
|
|
29975
30027
|
var children = void 0;
|
|
29976
30028
|
while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) {
|
|
29977
|
-
if (child.kind ===
|
|
30029
|
+
if (child.kind === 339 || child.kind === 346) {
|
|
29978
30030
|
children = ts.append(children, child);
|
|
29979
30031
|
}
|
|
29980
30032
|
}
|
|
@@ -30097,7 +30149,7 @@ var ts;
|
|
|
30097
30149
|
var hasChildren = false;
|
|
30098
30150
|
while (child = tryParse(function () { return parseChildPropertyTag(indent); })) {
|
|
30099
30151
|
hasChildren = true;
|
|
30100
|
-
if (child.kind ===
|
|
30152
|
+
if (child.kind === 342) {
|
|
30101
30153
|
if (childTypeTag) {
|
|
30102
30154
|
parseErrorAtCurrentToken(ts.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
|
30103
30155
|
var lastError = ts.lastOrUndefined(parseDiagnostics);
|
|
@@ -30165,7 +30217,7 @@ var ts;
|
|
|
30165
30217
|
var returnTag = tryParse(function () {
|
|
30166
30218
|
if (parseOptionalJsdoc(59)) {
|
|
30167
30219
|
var tag = parseTag(indent);
|
|
30168
|
-
if (tag && tag.kind ===
|
|
30220
|
+
if (tag && tag.kind === 340) {
|
|
30169
30221
|
return tag;
|
|
30170
30222
|
}
|
|
30171
30223
|
}
|
|
@@ -30199,7 +30251,7 @@ var ts;
|
|
|
30199
30251
|
case 59:
|
|
30200
30252
|
if (canParseTag) {
|
|
30201
30253
|
var child = tryParseChildTag(target, indent);
|
|
30202
|
-
if (child && (child.kind ===
|
|
30254
|
+
if (child && (child.kind === 339 || child.kind === 346) &&
|
|
30203
30255
|
target !== 4 &&
|
|
30204
30256
|
name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
|
|
30205
30257
|
return false;
|
|
@@ -31781,7 +31833,8 @@ var ts;
|
|
|
31781
31833
|
name: "jsxFragmentFactory",
|
|
31782
31834
|
type: "string",
|
|
31783
31835
|
category: ts.Diagnostics.Language_and_Environment,
|
|
31784
|
-
description: ts.Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment
|
|
31836
|
+
description: ts.Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,
|
|
31837
|
+
defaultValueDescription: "React.Fragment",
|
|
31785
31838
|
},
|
|
31786
31839
|
{
|
|
31787
31840
|
name: "jsxImportSource",
|
|
@@ -32628,7 +32681,7 @@ var ts;
|
|
|
32628
32681
|
function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) {
|
|
32629
32682
|
var result = returnValue ? {} : undefined;
|
|
32630
32683
|
var _loop_4 = function (element) {
|
|
32631
|
-
if (element.kind !==
|
|
32684
|
+
if (element.kind !== 295) {
|
|
32632
32685
|
errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element, ts.Diagnostics.Property_assignment_expected));
|
|
32633
32686
|
return "continue";
|
|
32634
32687
|
}
|
|
@@ -33959,6 +34012,7 @@ var ts;
|
|
|
33959
34012
|
return ts.comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0;
|
|
33960
34013
|
}
|
|
33961
34014
|
function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache, resolutionMode) {
|
|
34015
|
+
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
34016
|
var traceEnabled = isTraceEnabled(options, host);
|
|
33963
34017
|
if (redirectedReference) {
|
|
33964
34018
|
options = redirectedReference.commandLine.options;
|
|
@@ -35787,7 +35841,7 @@ var ts;
|
|
|
35787
35841
|
return "__constructor";
|
|
35788
35842
|
case 178:
|
|
35789
35843
|
case 173:
|
|
35790
|
-
case
|
|
35844
|
+
case 322:
|
|
35791
35845
|
return "__call";
|
|
35792
35846
|
case 179:
|
|
35793
35847
|
case 174:
|
|
@@ -35796,7 +35850,7 @@ var ts;
|
|
|
35796
35850
|
return "__index";
|
|
35797
35851
|
case 271:
|
|
35798
35852
|
return "__export";
|
|
35799
|
-
case
|
|
35853
|
+
case 304:
|
|
35800
35854
|
return "export=";
|
|
35801
35855
|
case 220:
|
|
35802
35856
|
if (ts.getAssignmentDeclarationKind(node) === 2) {
|
|
@@ -35804,10 +35858,10 @@ var ts;
|
|
|
35804
35858
|
}
|
|
35805
35859
|
ts.Debug.fail("Unknown binary declaration kind");
|
|
35806
35860
|
break;
|
|
35807
|
-
case
|
|
35861
|
+
case 316:
|
|
35808
35862
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
35809
35863
|
case 163:
|
|
35810
|
-
ts.Debug.assert(node.parent.kind ===
|
|
35864
|
+
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
35865
|
var functionType = node.parent;
|
|
35812
35866
|
var index = functionType.parameters.indexOf(node);
|
|
35813
35867
|
return "arg" + index;
|
|
@@ -35992,7 +36046,7 @@ var ts;
|
|
|
35992
36046
|
node.flags |= 512;
|
|
35993
36047
|
node.endFlowNode = currentFlow;
|
|
35994
36048
|
}
|
|
35995
|
-
if (node.kind ===
|
|
36049
|
+
if (node.kind === 304) {
|
|
35996
36050
|
node.flags |= emitFlags;
|
|
35997
36051
|
node.endFlowNode = currentFlow;
|
|
35998
36052
|
}
|
|
@@ -36127,12 +36181,12 @@ var ts;
|
|
|
36127
36181
|
case 229:
|
|
36128
36182
|
bindNonNullExpressionFlow(node);
|
|
36129
36183
|
break;
|
|
36130
|
-
case
|
|
36131
|
-
case 336:
|
|
36184
|
+
case 344:
|
|
36132
36185
|
case 337:
|
|
36186
|
+
case 338:
|
|
36133
36187
|
bindJSDocTypeAlias(node);
|
|
36134
36188
|
break;
|
|
36135
|
-
case
|
|
36189
|
+
case 304: {
|
|
36136
36190
|
bindEachFunctionsFirst(node.statements);
|
|
36137
36191
|
bind(node.endOfFileToken);
|
|
36138
36192
|
break;
|
|
@@ -36146,7 +36200,7 @@ var ts;
|
|
|
36146
36200
|
break;
|
|
36147
36201
|
case 204:
|
|
36148
36202
|
case 203:
|
|
36149
|
-
case
|
|
36203
|
+
case 295:
|
|
36150
36204
|
case 224:
|
|
36151
36205
|
inAssignmentPattern = saveInAssignmentPattern;
|
|
36152
36206
|
default:
|
|
@@ -36182,7 +36236,7 @@ var ts;
|
|
|
36182
36236
|
return ts.isDottedName(expr)
|
|
36183
36237
|
|| (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression)
|
|
36184
36238
|
|| ts.isBinaryExpression(expr) && expr.operatorToken.kind === 27 && isNarrowableReference(expr.right)
|
|
36185
|
-
|| ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression)
|
|
36239
|
+
|| ts.isElementAccessExpression(expr) && (ts.isStringOrNumericLiteralLike(expr.argumentExpression) || ts.isEntityNameExpression(expr.argumentExpression)) && isNarrowableReference(expr.expression)
|
|
36186
36240
|
|| ts.isAssignmentExpression(expr) && isNarrowableReference(expr.left);
|
|
36187
36241
|
}
|
|
36188
36242
|
function containsNarrowableReference(expr) {
|
|
@@ -36635,13 +36689,13 @@ var ts;
|
|
|
36635
36689
|
else if (node.kind === 204) {
|
|
36636
36690
|
for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
|
|
36637
36691
|
var p = _c[_b];
|
|
36638
|
-
if (p.kind ===
|
|
36692
|
+
if (p.kind === 295) {
|
|
36639
36693
|
bindDestructuringTargetFlow(p.initializer);
|
|
36640
36694
|
}
|
|
36641
|
-
else if (p.kind ===
|
|
36695
|
+
else if (p.kind === 296) {
|
|
36642
36696
|
bindAssignmentTargetFlow(p.name);
|
|
36643
36697
|
}
|
|
36644
|
-
else if (p.kind ===
|
|
36698
|
+
else if (p.kind === 297) {
|
|
36645
36699
|
bindAssignmentTargetFlow(p.expression);
|
|
36646
36700
|
}
|
|
36647
36701
|
}
|
|
@@ -36853,7 +36907,7 @@ var ts;
|
|
|
36853
36907
|
}
|
|
36854
36908
|
function bindJSDocTypeAlias(node) {
|
|
36855
36909
|
bind(node.tagName);
|
|
36856
|
-
if (node.kind !==
|
|
36910
|
+
if (node.kind !== 338 && node.fullName) {
|
|
36857
36911
|
ts.setParent(node.fullName, node);
|
|
36858
36912
|
ts.setParentRecursive(node.fullName, false);
|
|
36859
36913
|
}
|
|
@@ -36962,7 +37016,7 @@ var ts;
|
|
|
36962
37016
|
case 259:
|
|
36963
37017
|
case 204:
|
|
36964
37018
|
case 181:
|
|
36965
|
-
case
|
|
37019
|
+
case 321:
|
|
36966
37020
|
case 285:
|
|
36967
37021
|
return 1;
|
|
36968
37022
|
case 257:
|
|
@@ -36971,7 +37025,7 @@ var ts;
|
|
|
36971
37025
|
case 258:
|
|
36972
37026
|
case 194:
|
|
36973
37027
|
return 1 | 32;
|
|
36974
|
-
case
|
|
37028
|
+
case 304:
|
|
36975
37029
|
return 1 | 4 | 32;
|
|
36976
37030
|
case 171:
|
|
36977
37031
|
case 172:
|
|
@@ -36983,8 +37037,8 @@ var ts;
|
|
|
36983
37037
|
case 255:
|
|
36984
37038
|
case 167:
|
|
36985
37039
|
case 173:
|
|
36986
|
-
case
|
|
36987
|
-
case
|
|
37040
|
+
case 322:
|
|
37041
|
+
case 316:
|
|
36988
37042
|
case 178:
|
|
36989
37043
|
case 174:
|
|
36990
37044
|
case 175:
|
|
@@ -37019,7 +37073,7 @@ var ts;
|
|
|
37019
37073
|
switch (container.kind) {
|
|
37020
37074
|
case 260:
|
|
37021
37075
|
return declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37022
|
-
case
|
|
37076
|
+
case 304:
|
|
37023
37077
|
return declareSourceFileMember(node, symbolFlags, symbolExcludes);
|
|
37024
37078
|
case 225:
|
|
37025
37079
|
case 256:
|
|
@@ -37027,7 +37081,7 @@ var ts;
|
|
|
37027
37081
|
case 259:
|
|
37028
37082
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
37029
37083
|
case 181:
|
|
37030
|
-
case
|
|
37084
|
+
case 321:
|
|
37031
37085
|
case 204:
|
|
37032
37086
|
case 257:
|
|
37033
37087
|
case 285:
|
|
@@ -37036,7 +37090,7 @@ var ts;
|
|
|
37036
37090
|
case 179:
|
|
37037
37091
|
case 173:
|
|
37038
37092
|
case 174:
|
|
37039
|
-
case
|
|
37093
|
+
case 322:
|
|
37040
37094
|
case 175:
|
|
37041
37095
|
case 168:
|
|
37042
37096
|
case 167:
|
|
@@ -37046,9 +37100,9 @@ var ts;
|
|
|
37046
37100
|
case 255:
|
|
37047
37101
|
case 212:
|
|
37048
37102
|
case 213:
|
|
37049
|
-
case
|
|
37050
|
-
case
|
|
37051
|
-
case
|
|
37103
|
+
case 316:
|
|
37104
|
+
case 344:
|
|
37105
|
+
case 337:
|
|
37052
37106
|
case 169:
|
|
37053
37107
|
case 258:
|
|
37054
37108
|
case 194:
|
|
@@ -37128,11 +37182,11 @@ var ts;
|
|
|
37128
37182
|
var seen = new ts.Map();
|
|
37129
37183
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
37130
37184
|
var prop = _a[_i];
|
|
37131
|
-
if (prop.kind ===
|
|
37185
|
+
if (prop.kind === 297 || prop.name.kind !== 79) {
|
|
37132
37186
|
continue;
|
|
37133
37187
|
}
|
|
37134
37188
|
var identifier = prop.name;
|
|
37135
|
-
var currentKind = prop.kind ===
|
|
37189
|
+
var currentKind = prop.kind === 295 || prop.kind === 296 || prop.kind === 168
|
|
37136
37190
|
? 1
|
|
37137
37191
|
: 2;
|
|
37138
37192
|
var existingKind = seen.get(identifier.escapedText);
|
|
@@ -37163,7 +37217,7 @@ var ts;
|
|
|
37163
37217
|
case 260:
|
|
37164
37218
|
declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37165
37219
|
break;
|
|
37166
|
-
case
|
|
37220
|
+
case 304:
|
|
37167
37221
|
if (ts.isExternalOrCommonJsModule(container)) {
|
|
37168
37222
|
declareModuleMember(node, symbolFlags, symbolExcludes);
|
|
37169
37223
|
break;
|
|
@@ -37335,7 +37389,7 @@ var ts;
|
|
|
37335
37389
|
}
|
|
37336
37390
|
function checkStrictModeFunctionDeclaration(node) {
|
|
37337
37391
|
if (languageVersion < 2) {
|
|
37338
|
-
if (blockScopeContainer.kind !==
|
|
37392
|
+
if (blockScopeContainer.kind !== 304 &&
|
|
37339
37393
|
blockScopeContainer.kind !== 260 &&
|
|
37340
37394
|
!ts.isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) {
|
|
37341
37395
|
var errorSpan = ts.getErrorSpanForNode(file, node);
|
|
@@ -37468,7 +37522,7 @@ var ts;
|
|
|
37468
37522
|
break;
|
|
37469
37523
|
}
|
|
37470
37524
|
case 108:
|
|
37471
|
-
if (currentFlow && (ts.isExpression(node) || parent.kind ===
|
|
37525
|
+
if (currentFlow && (ts.isExpression(node) || parent.kind === 296)) {
|
|
37472
37526
|
node.flowNode = currentFlow;
|
|
37473
37527
|
}
|
|
37474
37528
|
return checkContextualIdentifier(node);
|
|
@@ -37565,10 +37619,10 @@ var ts;
|
|
|
37565
37619
|
case 166:
|
|
37566
37620
|
case 165:
|
|
37567
37621
|
return bindPropertyWorker(node);
|
|
37568
|
-
case 294:
|
|
37569
37622
|
case 295:
|
|
37623
|
+
case 296:
|
|
37570
37624
|
return bindPropertyOrMethodOrAccessor(node, 4, 0);
|
|
37571
|
-
case
|
|
37625
|
+
case 298:
|
|
37572
37626
|
return bindPropertyOrMethodOrAccessor(node, 8, 900095);
|
|
37573
37627
|
case 173:
|
|
37574
37628
|
case 174:
|
|
@@ -37586,15 +37640,15 @@ var ts;
|
|
|
37586
37640
|
case 172:
|
|
37587
37641
|
return bindPropertyOrMethodOrAccessor(node, 65536, 78783);
|
|
37588
37642
|
case 178:
|
|
37589
|
-
case
|
|
37590
|
-
case
|
|
37643
|
+
case 316:
|
|
37644
|
+
case 322:
|
|
37591
37645
|
case 179:
|
|
37592
37646
|
return bindFunctionOrConstructorType(node);
|
|
37593
37647
|
case 181:
|
|
37594
|
-
case
|
|
37648
|
+
case 321:
|
|
37595
37649
|
case 194:
|
|
37596
37650
|
return bindAnonymousTypeWorker(node);
|
|
37597
|
-
case
|
|
37651
|
+
case 331:
|
|
37598
37652
|
return bindJSDocClassTag(node);
|
|
37599
37653
|
case 204:
|
|
37600
37654
|
return bindObjectLiteralExpression(node);
|
|
@@ -37648,7 +37702,7 @@ var ts;
|
|
|
37648
37702
|
return bindExportDeclaration(node);
|
|
37649
37703
|
case 270:
|
|
37650
37704
|
return bindExportAssignment(node);
|
|
37651
|
-
case
|
|
37705
|
+
case 304:
|
|
37652
37706
|
updateStrictModeStatementList(node.statements);
|
|
37653
37707
|
return bindSourceFileIfExternalModule();
|
|
37654
37708
|
case 234:
|
|
@@ -37657,22 +37711,22 @@ var ts;
|
|
|
37657
37711
|
}
|
|
37658
37712
|
case 261:
|
|
37659
37713
|
return updateStrictModeStatementList(node.statements);
|
|
37660
|
-
case
|
|
37661
|
-
if (node.parent.kind ===
|
|
37714
|
+
case 339:
|
|
37715
|
+
if (node.parent.kind === 322) {
|
|
37662
37716
|
return bindParameter(node);
|
|
37663
37717
|
}
|
|
37664
|
-
if (node.parent.kind !==
|
|
37718
|
+
if (node.parent.kind !== 321) {
|
|
37665
37719
|
break;
|
|
37666
37720
|
}
|
|
37667
|
-
case
|
|
37721
|
+
case 346:
|
|
37668
37722
|
var propTag = node;
|
|
37669
|
-
var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind ===
|
|
37723
|
+
var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 315 ?
|
|
37670
37724
|
4 | 16777216 :
|
|
37671
37725
|
4;
|
|
37672
37726
|
return declareSymbolAndAddToSymbolTable(propTag, flags, 0);
|
|
37673
|
-
case
|
|
37674
|
-
case 336:
|
|
37727
|
+
case 344:
|
|
37675
37728
|
case 337:
|
|
37729
|
+
case 338:
|
|
37676
37730
|
return (delayedTypeAliases || (delayedTypeAliases = [])).push(node);
|
|
37677
37731
|
}
|
|
37678
37732
|
}
|
|
@@ -37851,7 +37905,7 @@ var ts;
|
|
|
37851
37905
|
declareSymbol(symbolTable, containingClass.symbol, node, 4 | 67108864, 0, true);
|
|
37852
37906
|
}
|
|
37853
37907
|
break;
|
|
37854
|
-
case
|
|
37908
|
+
case 304:
|
|
37855
37909
|
if (ts.hasDynamicName(node)) {
|
|
37856
37910
|
break;
|
|
37857
37911
|
}
|
|
@@ -37879,7 +37933,7 @@ var ts;
|
|
|
37879
37933
|
if (node.expression.kind === 108) {
|
|
37880
37934
|
bindThisPropertyAssignment(node);
|
|
37881
37935
|
}
|
|
37882
|
-
else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind ===
|
|
37936
|
+
else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 304) {
|
|
37883
37937
|
if (ts.isPrototypeAccess(node.expression)) {
|
|
37884
37938
|
bindPrototypePropertyAssignment(node, node.parent);
|
|
37885
37939
|
}
|
|
@@ -37910,7 +37964,7 @@ var ts;
|
|
|
37910
37964
|
}
|
|
37911
37965
|
function bindObjectDefinePropertyAssignment(node) {
|
|
37912
37966
|
var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]);
|
|
37913
|
-
var isToplevel = node.parent.parent.kind ===
|
|
37967
|
+
var isToplevel = node.parent.parent.kind === 304;
|
|
37914
37968
|
namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false);
|
|
37915
37969
|
bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false);
|
|
37916
37970
|
}
|
|
@@ -38004,8 +38058,8 @@ var ts;
|
|
|
38004
38058
|
}
|
|
38005
38059
|
function isTopLevelNamespaceAssignment(propertyAccess) {
|
|
38006
38060
|
return ts.isBinaryExpression(propertyAccess.parent)
|
|
38007
|
-
? getParentOfBinaryExpression(propertyAccess.parent).parent.kind ===
|
|
38008
|
-
: propertyAccess.parent.parent.kind ===
|
|
38061
|
+
? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 304
|
|
38062
|
+
: propertyAccess.parent.parent.kind === 304;
|
|
38009
38063
|
}
|
|
38010
38064
|
function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
|
|
38011
38065
|
var namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
|
|
@@ -38118,7 +38172,7 @@ var ts;
|
|
|
38118
38172
|
}
|
|
38119
38173
|
}
|
|
38120
38174
|
function bindParameter(node) {
|
|
38121
|
-
if (node.kind ===
|
|
38175
|
+
if (node.kind === 339 && container.kind !== 322) {
|
|
38122
38176
|
return;
|
|
38123
38177
|
}
|
|
38124
38178
|
if (inStrictMode && !(node.flags & 8388608)) {
|
|
@@ -39553,7 +39607,7 @@ var ts;
|
|
|
39553
39607
|
return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
|
|
39554
39608
|
}
|
|
39555
39609
|
function isGlobalSourceFile(node) {
|
|
39556
|
-
return node.kind ===
|
|
39610
|
+
return node.kind === 304 && !ts.isExternalOrCommonJsModule(node);
|
|
39557
39611
|
}
|
|
39558
39612
|
function getSymbol(symbols, name, meaning) {
|
|
39559
39613
|
if (meaning) {
|
|
@@ -39764,7 +39818,7 @@ var ts;
|
|
|
39764
39818
|
case 168:
|
|
39765
39819
|
case 171:
|
|
39766
39820
|
case 172:
|
|
39767
|
-
case
|
|
39821
|
+
case 295:
|
|
39768
39822
|
return requiresScopeChangeWorker(node.name);
|
|
39769
39823
|
case 166:
|
|
39770
39824
|
if (ts.hasStaticModifier(node)) {
|
|
@@ -39806,12 +39860,12 @@ var ts;
|
|
|
39806
39860
|
if (result = lookup(location.locals, name, meaning)) {
|
|
39807
39861
|
var useResult = true;
|
|
39808
39862
|
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
|
|
39809
|
-
if (meaning & result.flags & 788968 && lastLocation.kind !==
|
|
39863
|
+
if (meaning & result.flags & 788968 && lastLocation.kind !== 319) {
|
|
39810
39864
|
useResult = result.flags & 262144
|
|
39811
39865
|
? lastLocation === location.type ||
|
|
39812
39866
|
lastLocation.kind === 163 ||
|
|
39813
|
-
lastLocation.kind === 338 ||
|
|
39814
39867
|
lastLocation.kind === 339 ||
|
|
39868
|
+
lastLocation.kind === 340 ||
|
|
39815
39869
|
lastLocation.kind === 162
|
|
39816
39870
|
: false;
|
|
39817
39871
|
}
|
|
@@ -39840,13 +39894,13 @@ var ts;
|
|
|
39840
39894
|
}
|
|
39841
39895
|
withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation);
|
|
39842
39896
|
switch (location.kind) {
|
|
39843
|
-
case
|
|
39897
|
+
case 304:
|
|
39844
39898
|
if (!ts.isExternalOrCommonJsModule(location))
|
|
39845
39899
|
break;
|
|
39846
39900
|
isInExternalModule = true;
|
|
39847
39901
|
case 260:
|
|
39848
39902
|
var moduleExports = ((_a = getSymbolOfNode(location)) === null || _a === void 0 ? void 0 : _a.exports) || emptySymbols;
|
|
39849
|
-
if (location.kind ===
|
|
39903
|
+
if (location.kind === 304 || (ts.isModuleDeclaration(location) && location.flags & 8388608 && !ts.isGlobalScopeAugmentation(location))) {
|
|
39850
39904
|
if (result = moduleExports.get("default")) {
|
|
39851
39905
|
var localSymbol = ts.getLocalSymbolForExportDefault(result);
|
|
39852
39906
|
if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) {
|
|
@@ -39962,9 +40016,9 @@ var ts;
|
|
|
39962
40016
|
location = location.parent;
|
|
39963
40017
|
}
|
|
39964
40018
|
break;
|
|
39965
|
-
case
|
|
39966
|
-
case 336:
|
|
40019
|
+
case 344:
|
|
39967
40020
|
case 337:
|
|
40021
|
+
case 338:
|
|
39968
40022
|
var root = ts.getJSDocRoot(location);
|
|
39969
40023
|
if (root) {
|
|
39970
40024
|
location = root.parent;
|
|
@@ -40009,7 +40063,7 @@ var ts;
|
|
|
40009
40063
|
}
|
|
40010
40064
|
if (!result) {
|
|
40011
40065
|
if (lastLocation) {
|
|
40012
|
-
ts.Debug.assert(lastLocation.kind ===
|
|
40066
|
+
ts.Debug.assert(lastLocation.kind === 304);
|
|
40013
40067
|
if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) {
|
|
40014
40068
|
return lastLocation.symbol;
|
|
40015
40069
|
}
|
|
@@ -40383,8 +40437,8 @@ var ts;
|
|
|
40383
40437
|
&& node.parent.left === node
|
|
40384
40438
|
&& node.parent.operatorToken.kind === 63
|
|
40385
40439
|
&& isAliasableOrJsExpression(node.parent.right)
|
|
40386
|
-
|| node.kind ===
|
|
40387
|
-
|| node.kind ===
|
|
40440
|
+
|| node.kind === 296
|
|
40441
|
+
|| node.kind === 295 && isAliasableOrJsExpression(node.initializer)
|
|
40388
40442
|
|| ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
|
|
40389
40443
|
}
|
|
40390
40444
|
function isAliasableOrJsExpression(e) {
|
|
@@ -40755,9 +40809,9 @@ var ts;
|
|
|
40755
40809
|
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
|
|
40756
40810
|
case 263:
|
|
40757
40811
|
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
|
|
40758
|
-
case
|
|
40812
|
+
case 296:
|
|
40759
40813
|
return resolveEntityName(node.name, 111551 | 788968 | 1920, true, dontRecursivelyResolve);
|
|
40760
|
-
case
|
|
40814
|
+
case 295:
|
|
40761
40815
|
return getTargetOfPropertyAssignment(node, dontRecursivelyResolve);
|
|
40762
40816
|
case 206:
|
|
40763
40817
|
case 205:
|
|
@@ -41057,7 +41111,7 @@ var ts;
|
|
|
41057
41111
|
: undefined;
|
|
41058
41112
|
}
|
|
41059
41113
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation) {
|
|
41060
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
41114
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41061
41115
|
if (isForAugmentation === void 0) { isForAugmentation = false; }
|
|
41062
41116
|
if (ts.startsWith(moduleReference, "@types/")) {
|
|
41063
41117
|
var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
@@ -41093,7 +41147,9 @@ var ts;
|
|
|
41093
41147
|
}
|
|
41094
41148
|
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
41095
41149
|
var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
|
|
41096
|
-
|
|
41150
|
+
var overrideClauseHost = ts.findAncestor(location, function (l) { return ts.isImportTypeNode(l) || ts.isExportDeclaration(l) || ts.isImportDeclaration(l); });
|
|
41151
|
+
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;
|
|
41152
|
+
if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext && !ts.getResolutionModeOverrideForClause(overrideClause)) {
|
|
41097
41153
|
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
41154
|
}
|
|
41099
41155
|
if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
|
|
@@ -41161,10 +41217,10 @@ var ts;
|
|
|
41161
41217
|
}
|
|
41162
41218
|
else if (mode === ts.ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) {
|
|
41163
41219
|
var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
|
|
41164
|
-
var suggestedExt = (
|
|
41220
|
+
var suggestedExt = (_h = suggestedExtensions.find(function (_a) {
|
|
41165
41221
|
var actualExt = _a[0], _importExt = _a[1];
|
|
41166
41222
|
return host.fileExists(absoluteRef_1 + actualExt);
|
|
41167
|
-
})) === null ||
|
|
41223
|
+
})) === null || _h === void 0 ? void 0 : _h[1];
|
|
41168
41224
|
if (suggestedExt) {
|
|
41169
41225
|
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
41226
|
}
|
|
@@ -41226,9 +41282,10 @@ var ts;
|
|
|
41226
41282
|
return links.cjsExportMerged = merged;
|
|
41227
41283
|
}
|
|
41228
41284
|
function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {
|
|
41285
|
+
var _a;
|
|
41229
41286
|
var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
|
|
41230
41287
|
if (!dontResolveAlias && symbol) {
|
|
41231
|
-
if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol,
|
|
41288
|
+
if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol, 304)) {
|
|
41232
41289
|
var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015
|
|
41233
41290
|
? "allowSyntheticDefaultImports"
|
|
41234
41291
|
: "esModuleInterop";
|
|
@@ -41244,12 +41301,16 @@ var ts;
|
|
|
41244
41301
|
if (defaultOnlyType) {
|
|
41245
41302
|
return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);
|
|
41246
41303
|
}
|
|
41247
|
-
|
|
41304
|
+
var targetFile = (_a = moduleSymbol === null || moduleSymbol === void 0 ? void 0 : moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
|
|
41305
|
+
var isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat);
|
|
41306
|
+
if (ts.getESModuleInterop(compilerOptions) || isEsmCjsRef) {
|
|
41248
41307
|
var sigs = getSignaturesOfStructuredType(type, 0);
|
|
41249
41308
|
if (!sigs || !sigs.length) {
|
|
41250
41309
|
sigs = getSignaturesOfStructuredType(type, 1);
|
|
41251
41310
|
}
|
|
41252
|
-
if ((sigs && sigs.length) ||
|
|
41311
|
+
if ((sigs && sigs.length) ||
|
|
41312
|
+
getPropertyOfType(type, "default", true) ||
|
|
41313
|
+
isEsmCjsRef) {
|
|
41253
41314
|
var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
|
|
41254
41315
|
return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
|
|
41255
41316
|
}
|
|
@@ -41660,7 +41721,7 @@ var ts;
|
|
|
41660
41721
|
}
|
|
41661
41722
|
}
|
|
41662
41723
|
switch (location.kind) {
|
|
41663
|
-
case
|
|
41724
|
+
case 304:
|
|
41664
41725
|
if (!ts.isExternalOrCommonJsModule(location)) {
|
|
41665
41726
|
break;
|
|
41666
41727
|
}
|
|
@@ -41896,10 +41957,10 @@ var ts;
|
|
|
41896
41957
|
return node && getSymbolOfNode(node);
|
|
41897
41958
|
}
|
|
41898
41959
|
function hasExternalModuleSymbol(declaration) {
|
|
41899
|
-
return ts.isAmbientModule(declaration) || (declaration.kind ===
|
|
41960
|
+
return ts.isAmbientModule(declaration) || (declaration.kind === 304 && ts.isExternalOrCommonJsModule(declaration));
|
|
41900
41961
|
}
|
|
41901
41962
|
function hasNonGlobalAugmentationExternalModuleSymbol(declaration) {
|
|
41902
|
-
return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind ===
|
|
41963
|
+
return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 304 && ts.isExternalOrCommonJsModule(declaration));
|
|
41903
41964
|
}
|
|
41904
41965
|
function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
|
|
41905
41966
|
var aliasesToMakeVisible;
|
|
@@ -41990,7 +42051,7 @@ var ts;
|
|
|
41990
42051
|
return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
|
|
41991
42052
|
function symbolToStringWorker(writer) {
|
|
41992
42053
|
var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
41993
|
-
var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) ===
|
|
42054
|
+
var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 304 ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
|
|
41994
42055
|
var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
|
|
41995
42056
|
printer.writeNode(4, entity, sourceFile, writer);
|
|
41996
42057
|
return writer;
|
|
@@ -42448,7 +42509,7 @@ var ts;
|
|
|
42448
42509
|
var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
|
|
42449
42510
|
(symbol.parent ||
|
|
42450
42511
|
ts.forEach(symbol.declarations, function (declaration) {
|
|
42451
|
-
return declaration.parent.kind ===
|
|
42512
|
+
return declaration.parent.kind === 304 || declaration.parent.kind === 261;
|
|
42452
42513
|
}));
|
|
42453
42514
|
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
|
|
42454
42515
|
return (!!(context.flags & 4096) || ((_a = context.visitedTypes) === null || _a === void 0 ? void 0 : _a.has(typeId))) &&
|
|
@@ -42812,8 +42873,8 @@ var ts;
|
|
|
42812
42873
|
}
|
|
42813
42874
|
function preserveCommentsOn(node) {
|
|
42814
42875
|
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 ===
|
|
42876
|
+
if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 346; })) {
|
|
42877
|
+
var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 346; });
|
|
42817
42878
|
var commentText = ts.getTextOfJSDocComment(d.comment);
|
|
42818
42879
|
if (commentText) {
|
|
42819
42880
|
ts.setSyntheticLeadingComments(node, [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
@@ -42955,7 +43016,7 @@ var ts;
|
|
|
42955
43016
|
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
43017
|
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
43018
|
kind === 175 ? ts.factory.createIndexSignature(undefined, modifiers, parameters, returnTypeNode) :
|
|
42958
|
-
kind ===
|
|
43019
|
+
kind === 316 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
|
|
42959
43020
|
kind === 178 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
42960
43021
|
kind === 179 ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
|
|
42961
43022
|
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 +43056,7 @@ var ts;
|
|
|
42995
43056
|
function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
|
|
42996
43057
|
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 163);
|
|
42997
43058
|
if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) {
|
|
42998
|
-
parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol,
|
|
43059
|
+
parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 339);
|
|
42999
43060
|
}
|
|
43000
43061
|
var parameterType = getTypeOfSymbol(parameterSymbol);
|
|
43001
43062
|
if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
|
|
@@ -43154,13 +43215,13 @@ var ts;
|
|
|
43154
43215
|
}
|
|
43155
43216
|
return top;
|
|
43156
43217
|
}
|
|
43157
|
-
function getSpecifierForModuleSymbol(symbol, context) {
|
|
43218
|
+
function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) {
|
|
43158
43219
|
var _a;
|
|
43159
|
-
var file = ts.getDeclarationOfKind(symbol,
|
|
43220
|
+
var file = ts.getDeclarationOfKind(symbol, 304);
|
|
43160
43221
|
if (!file) {
|
|
43161
43222
|
var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); });
|
|
43162
43223
|
if (equivalentFileSymbol) {
|
|
43163
|
-
file = ts.getDeclarationOfKind(equivalentFileSymbol,
|
|
43224
|
+
file = ts.getDeclarationOfKind(equivalentFileSymbol, 304);
|
|
43164
43225
|
}
|
|
43165
43226
|
}
|
|
43166
43227
|
if (file && file.moduleName !== undefined) {
|
|
@@ -43187,17 +43248,27 @@ var ts;
|
|
|
43187
43248
|
return ts.getSourceFileOfNode(ts.getNonAugmentationDeclaration(symbol)).fileName;
|
|
43188
43249
|
}
|
|
43189
43250
|
var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
|
|
43251
|
+
var resolutionMode = overrideImportMode || (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat);
|
|
43252
|
+
var cacheKey = getSpecifierCacheKey(contextFile.path, resolutionMode);
|
|
43190
43253
|
var links = getSymbolLinks(symbol);
|
|
43191
|
-
var specifier = links.specifierCache && links.specifierCache.get(
|
|
43254
|
+
var specifier = links.specifierCache && links.specifierCache.get(cacheKey);
|
|
43192
43255
|
if (!specifier) {
|
|
43193
43256
|
var isBundle_1 = !!ts.outFile(compilerOptions);
|
|
43194
43257
|
var moduleResolverHost = context.tracker.moduleResolverHost;
|
|
43195
43258
|
var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions;
|
|
43196
|
-
specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
43259
|
+
specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
|
|
43260
|
+
importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "project-relative",
|
|
43261
|
+
importModuleSpecifierEnding: isBundle_1 ? "minimal"
|
|
43262
|
+
: resolutionMode === ts.ModuleKind.ESNext ? "js"
|
|
43263
|
+
: undefined,
|
|
43264
|
+
}, { overrideImportMode: overrideImportMode }));
|
|
43197
43265
|
(_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map());
|
|
43198
|
-
links.specifierCache.set(
|
|
43266
|
+
links.specifierCache.set(cacheKey, specifier);
|
|
43199
43267
|
}
|
|
43200
43268
|
return specifier;
|
|
43269
|
+
function getSpecifierCacheKey(path, mode) {
|
|
43270
|
+
return mode === undefined ? path : mode + "|" + path;
|
|
43271
|
+
}
|
|
43201
43272
|
}
|
|
43202
43273
|
function symbolToEntityNameNode(symbol) {
|
|
43203
43274
|
var identifier = ts.factory.createIdentifier(ts.unescapeLeadingUnderscores(symbol.escapedName));
|
|
@@ -43209,11 +43280,40 @@ var ts;
|
|
|
43209
43280
|
if (ts.some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
43210
43281
|
var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined;
|
|
43211
43282
|
var typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);
|
|
43212
|
-
var
|
|
43283
|
+
var contextFile = ts.getSourceFileOfNode(ts.getOriginalNode(context.enclosingDeclaration));
|
|
43284
|
+
var targetFile = ts.getSourceFileOfModule(chain[0]);
|
|
43285
|
+
var specifier = void 0;
|
|
43286
|
+
var assertion = void 0;
|
|
43287
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43288
|
+
if ((targetFile === null || targetFile === void 0 ? void 0 : targetFile.impliedNodeFormat) === ts.ModuleKind.ESNext && targetFile.impliedNodeFormat !== (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat)) {
|
|
43289
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context, ts.ModuleKind.ESNext);
|
|
43290
|
+
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
43291
|
+
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral("import"))
|
|
43292
|
+
])));
|
|
43293
|
+
}
|
|
43294
|
+
}
|
|
43295
|
+
if (!specifier) {
|
|
43296
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context);
|
|
43297
|
+
}
|
|
43213
43298
|
if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
|
|
43214
|
-
|
|
43215
|
-
if (
|
|
43216
|
-
|
|
43299
|
+
var oldSpecifier = specifier;
|
|
43300
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
|
|
43301
|
+
var swappedMode = (contextFile === null || contextFile === void 0 ? void 0 : contextFile.impliedNodeFormat) === ts.ModuleKind.ESNext ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
43302
|
+
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
|
|
43303
|
+
if (specifier.indexOf("/node_modules/") >= 0) {
|
|
43304
|
+
specifier = oldSpecifier;
|
|
43305
|
+
}
|
|
43306
|
+
else {
|
|
43307
|
+
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
43308
|
+
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral(swappedMode === ts.ModuleKind.ESNext ? "import" : "require"))
|
|
43309
|
+
])));
|
|
43310
|
+
}
|
|
43311
|
+
}
|
|
43312
|
+
if (!assertion) {
|
|
43313
|
+
context.encounteredError = true;
|
|
43314
|
+
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
43315
|
+
context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
|
|
43316
|
+
}
|
|
43217
43317
|
}
|
|
43218
43318
|
}
|
|
43219
43319
|
var lit = ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(specifier));
|
|
@@ -43225,12 +43325,12 @@ var ts;
|
|
|
43225
43325
|
var lastId = ts.isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
43226
43326
|
lastId.typeArguments = undefined;
|
|
43227
43327
|
}
|
|
43228
|
-
return ts.factory.createImportTypeNode(lit, nonRootParts, typeParameterNodes, isTypeOf);
|
|
43328
|
+
return ts.factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
43229
43329
|
}
|
|
43230
43330
|
else {
|
|
43231
43331
|
var splitNode = getTopmostIndexedAccessType(nonRootParts);
|
|
43232
43332
|
var qualifier = splitNode.objectType.typeName;
|
|
43233
|
-
return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
43333
|
+
return ts.factory.createIndexedAccessTypeNode(ts.factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
43234
43334
|
}
|
|
43235
43335
|
}
|
|
43236
43336
|
var entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
|
|
@@ -43268,7 +43368,15 @@ var ts;
|
|
|
43268
43368
|
});
|
|
43269
43369
|
}
|
|
43270
43370
|
}
|
|
43271
|
-
if (
|
|
43371
|
+
if (symbolName === undefined) {
|
|
43372
|
+
var name = ts.firstDefined(symbol.declarations, ts.getNameOfDeclaration);
|
|
43373
|
+
if (name && ts.isComputedPropertyName(name) && ts.isEntityName(name.expression)) {
|
|
43374
|
+
var LHS = createAccessFromSymbolChain(chain, index - 1, stopper);
|
|
43375
|
+
if (ts.isEntityName(LHS)) {
|
|
43376
|
+
return ts.factory.createIndexedAccessTypeNode(ts.factory.createParenthesizedType(ts.factory.createTypeQueryNode(LHS)), ts.factory.createTypeQueryNode(name.expression));
|
|
43377
|
+
}
|
|
43378
|
+
return LHS;
|
|
43379
|
+
}
|
|
43272
43380
|
symbolName = getNameOfSymbolAsWritten(symbol, context);
|
|
43273
43381
|
}
|
|
43274
43382
|
context.approximateLength += symbolName.length + 1;
|
|
@@ -43534,7 +43642,7 @@ var ts;
|
|
|
43534
43642
|
}
|
|
43535
43643
|
return transformed === existing ? ts.setTextRange(ts.factory.cloneNode(existing), existing) : transformed;
|
|
43536
43644
|
function visitExistingNodeTreeSymbols(node) {
|
|
43537
|
-
if (ts.isJSDocAllType(node) || node.kind ===
|
|
43645
|
+
if (ts.isJSDocAllType(node) || node.kind === 318) {
|
|
43538
43646
|
return ts.factory.createKeywordTypeNode(130);
|
|
43539
43647
|
}
|
|
43540
43648
|
if (ts.isJSDocUnknownType(node)) {
|
|
@@ -44222,7 +44330,7 @@ var ts;
|
|
|
44222
44330
|
}
|
|
44223
44331
|
ts.Debug.failBadSyntaxKind(((_c = node.parent) === null || _c === void 0 ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization");
|
|
44224
44332
|
break;
|
|
44225
|
-
case
|
|
44333
|
+
case 296:
|
|
44226
44334
|
if (((_e = (_d = node.parent) === null || _d === void 0 ? void 0 : _d.parent) === null || _e === void 0 ? void 0 : _e.kind) === 220) {
|
|
44227
44335
|
serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), targetName);
|
|
44228
44336
|
}
|
|
@@ -44627,7 +44735,7 @@ var ts;
|
|
|
44627
44735
|
ts.isExternalModuleAugmentation(node.parent.parent);
|
|
44628
44736
|
}
|
|
44629
44737
|
function isDefaultBindingContext(location) {
|
|
44630
|
-
return location.kind ===
|
|
44738
|
+
return location.kind === 304 || ts.isAmbientModule(location);
|
|
44631
44739
|
}
|
|
44632
44740
|
function getNameOfSymbolFromNameType(symbol, context) {
|
|
44633
44741
|
var nameType = getSymbolLinks(symbol).nameType;
|
|
@@ -44702,9 +44810,9 @@ var ts;
|
|
|
44702
44810
|
return false;
|
|
44703
44811
|
function determineIfDeclarationIsVisible() {
|
|
44704
44812
|
switch (node.kind) {
|
|
44705
|
-
case 336:
|
|
44706
|
-
case 343:
|
|
44707
44813
|
case 337:
|
|
44814
|
+
case 344:
|
|
44815
|
+
case 338:
|
|
44708
44816
|
return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent));
|
|
44709
44817
|
case 202:
|
|
44710
44818
|
return isDeclarationVisible(node.parent.parent);
|
|
@@ -44725,7 +44833,7 @@ var ts;
|
|
|
44725
44833
|
}
|
|
44726
44834
|
var parent = getDeclarationContainer(node);
|
|
44727
44835
|
if (!(ts.getCombinedModifierFlags(node) & 1) &&
|
|
44728
|
-
!(node.kind !== 264 && parent.kind !==
|
|
44836
|
+
!(node.kind !== 264 && parent.kind !== 304 && parent.flags & 8388608)) {
|
|
44729
44837
|
return isGlobalSourceFile(parent);
|
|
44730
44838
|
}
|
|
44731
44839
|
return isDeclarationVisible(parent);
|
|
@@ -44760,7 +44868,7 @@ var ts;
|
|
|
44760
44868
|
case 269:
|
|
44761
44869
|
return false;
|
|
44762
44870
|
case 162:
|
|
44763
|
-
case
|
|
44871
|
+
case 304:
|
|
44764
44872
|
case 263:
|
|
44765
44873
|
return true;
|
|
44766
44874
|
case 270:
|
|
@@ -44978,7 +45086,7 @@ var ts;
|
|
|
44978
45086
|
var ancestor = node.parent.parent;
|
|
44979
45087
|
switch (ancestor.kind) {
|
|
44980
45088
|
case 202:
|
|
44981
|
-
case
|
|
45089
|
+
case 295:
|
|
44982
45090
|
return getSyntheticElementAccess(ancestor);
|
|
44983
45091
|
case 203:
|
|
44984
45092
|
return getSyntheticElementAccess(node.parent);
|
|
@@ -44993,7 +45101,7 @@ var ts;
|
|
|
44993
45101
|
if (node.kind === 202 && parent.kind === 200) {
|
|
44994
45102
|
return getLiteralPropertyNameText(node.propertyName || node.name);
|
|
44995
45103
|
}
|
|
44996
|
-
if (node.kind ===
|
|
45104
|
+
if (node.kind === 295 || node.kind === 296) {
|
|
44997
45105
|
return getLiteralPropertyNameText(node.name);
|
|
44998
45106
|
}
|
|
44999
45107
|
return "" + parent.elements.indexOf(node);
|
|
@@ -46032,16 +46140,16 @@ var ts;
|
|
|
46032
46140
|
case 167:
|
|
46033
46141
|
case 178:
|
|
46034
46142
|
case 179:
|
|
46035
|
-
case
|
|
46143
|
+
case 316:
|
|
46036
46144
|
case 255:
|
|
46037
46145
|
case 168:
|
|
46038
46146
|
case 212:
|
|
46039
46147
|
case 213:
|
|
46040
46148
|
case 258:
|
|
46041
|
-
case 342:
|
|
46042
46149
|
case 343:
|
|
46150
|
+
case 344:
|
|
46151
|
+
case 338:
|
|
46043
46152
|
case 337:
|
|
46044
|
-
case 336:
|
|
46045
46153
|
case 194:
|
|
46046
46154
|
case 188: {
|
|
46047
46155
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
@@ -46057,13 +46165,13 @@ var ts;
|
|
|
46057
46165
|
getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
|
|
46058
46166
|
return thisType ? ts.append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters;
|
|
46059
46167
|
}
|
|
46060
|
-
case
|
|
46168
|
+
case 339:
|
|
46061
46169
|
var paramSymbol = ts.getParameterSymbolFromJSDoc(node);
|
|
46062
46170
|
if (paramSymbol) {
|
|
46063
46171
|
node = paramSymbol.valueDeclaration;
|
|
46064
46172
|
}
|
|
46065
46173
|
break;
|
|
46066
|
-
case
|
|
46174
|
+
case 319: {
|
|
46067
46175
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
46068
46176
|
return node.tags
|
|
46069
46177
|
? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
|
|
@@ -46406,7 +46514,7 @@ var ts;
|
|
|
46406
46514
|
}
|
|
46407
46515
|
else {
|
|
46408
46516
|
type = errorType;
|
|
46409
|
-
if (declaration.kind ===
|
|
46517
|
+
if (declaration.kind === 338) {
|
|
46410
46518
|
error(declaration.typeExpression.type, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
|
|
46411
46519
|
}
|
|
46412
46520
|
else {
|
|
@@ -48223,10 +48331,10 @@ var ts;
|
|
|
48223
48331
|
return result;
|
|
48224
48332
|
}
|
|
48225
48333
|
function isJSDocOptionalParameter(node) {
|
|
48226
|
-
return ts.isInJSFile(node) && (node.type && node.type.kind ===
|
|
48334
|
+
return ts.isInJSFile(node) && (node.type && node.type.kind === 315
|
|
48227
48335
|
|| ts.getJSDocParameterTags(node).some(function (_a) {
|
|
48228
48336
|
var isBracketed = _a.isBracketed, typeExpression = _a.typeExpression;
|
|
48229
|
-
return isBracketed || !!typeExpression && typeExpression.type.kind ===
|
|
48337
|
+
return isBracketed || !!typeExpression && typeExpression.type.kind === 315;
|
|
48230
48338
|
}));
|
|
48231
48339
|
}
|
|
48232
48340
|
function tryFindAmbientModule(moduleName, withAugmentations) {
|
|
@@ -48262,7 +48370,7 @@ var ts;
|
|
|
48262
48370
|
return false;
|
|
48263
48371
|
}
|
|
48264
48372
|
var isBracketed = node.isBracketed, typeExpression = node.typeExpression;
|
|
48265
|
-
return isBracketed || !!typeExpression && typeExpression.type.kind ===
|
|
48373
|
+
return isBracketed || !!typeExpression && typeExpression.type.kind === 315;
|
|
48266
48374
|
}
|
|
48267
48375
|
function createTypePredicate(kind, parameterName, parameterIndex, type) {
|
|
48268
48376
|
return { kind: kind, parameterName: parameterName, parameterIndex: parameterIndex, type: type };
|
|
@@ -48430,7 +48538,7 @@ var ts;
|
|
|
48430
48538
|
case 205:
|
|
48431
48539
|
case 206:
|
|
48432
48540
|
return traverse(node.expression);
|
|
48433
|
-
case
|
|
48541
|
+
case 295:
|
|
48434
48542
|
return traverse(node.initializer);
|
|
48435
48543
|
default:
|
|
48436
48544
|
return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && !!ts.forEachChild(node, traverse);
|
|
@@ -49064,7 +49172,7 @@ var ts;
|
|
|
49064
49172
|
function getConditionalFlowTypeOfType(type, node) {
|
|
49065
49173
|
var constraints;
|
|
49066
49174
|
var covariant = true;
|
|
49067
|
-
while (node && !ts.isStatement(node) && node.kind !==
|
|
49175
|
+
while (node && !ts.isStatement(node) && node.kind !== 319) {
|
|
49068
49176
|
var parent = node.parent;
|
|
49069
49177
|
if (parent.kind === 163) {
|
|
49070
49178
|
covariant = !covariant;
|
|
@@ -49405,10 +49513,10 @@ var ts;
|
|
|
49405
49513
|
case 190:
|
|
49406
49514
|
case 184:
|
|
49407
49515
|
case 196:
|
|
49408
|
-
case
|
|
49409
|
-
case 312:
|
|
49516
|
+
case 315:
|
|
49410
49517
|
case 313:
|
|
49411
|
-
case
|
|
49518
|
+
case 314:
|
|
49519
|
+
case 308:
|
|
49412
49520
|
return mayResolveTypeAlias(node.type);
|
|
49413
49521
|
case 185:
|
|
49414
49522
|
return node.type.kind !== 182 || mayResolveTypeAlias(node.type.elementType);
|
|
@@ -51378,8 +51486,8 @@ var ts;
|
|
|
51378
51486
|
function getTypeFromTypeNodeWorker(node) {
|
|
51379
51487
|
switch (node.kind) {
|
|
51380
51488
|
case 130:
|
|
51381
|
-
case 310:
|
|
51382
51489
|
case 311:
|
|
51490
|
+
case 312:
|
|
51383
51491
|
return anyType;
|
|
51384
51492
|
case 154:
|
|
51385
51493
|
return unknownType;
|
|
@@ -51427,26 +51535,26 @@ var ts;
|
|
|
51427
51535
|
return getTypeFromUnionTypeNode(node);
|
|
51428
51536
|
case 187:
|
|
51429
51537
|
return getTypeFromIntersectionTypeNode(node);
|
|
51430
|
-
case
|
|
51538
|
+
case 313:
|
|
51431
51539
|
return getTypeFromJSDocNullableTypeNode(node);
|
|
51432
|
-
case
|
|
51540
|
+
case 315:
|
|
51433
51541
|
return addOptionality(getTypeFromTypeNode(node.type));
|
|
51434
51542
|
case 196:
|
|
51435
51543
|
return getTypeFromNamedTupleTypeNode(node);
|
|
51436
51544
|
case 190:
|
|
51437
|
-
case
|
|
51438
|
-
case
|
|
51545
|
+
case 314:
|
|
51546
|
+
case 308:
|
|
51439
51547
|
return getTypeFromTypeNode(node.type);
|
|
51440
51548
|
case 185:
|
|
51441
51549
|
return getTypeFromRestTypeNode(node);
|
|
51442
|
-
case
|
|
51550
|
+
case 317:
|
|
51443
51551
|
return getTypeFromJSDocVariadicType(node);
|
|
51444
51552
|
case 178:
|
|
51445
51553
|
case 179:
|
|
51446
51554
|
case 181:
|
|
51447
|
-
case 320:
|
|
51448
|
-
case 315:
|
|
51449
51555
|
case 321:
|
|
51556
|
+
case 316:
|
|
51557
|
+
case 322:
|
|
51450
51558
|
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
|
|
51451
51559
|
case 192:
|
|
51452
51560
|
return getTypeFromTypeOperatorNode(node);
|
|
@@ -51929,7 +52037,7 @@ var ts;
|
|
|
51929
52037
|
case 220:
|
|
51930
52038
|
return (node.operatorToken.kind === 56 || node.operatorToken.kind === 60) &&
|
|
51931
52039
|
(isContextSensitive(node.left) || isContextSensitive(node.right));
|
|
51932
|
-
case
|
|
52040
|
+
case 295:
|
|
51933
52041
|
return isContextSensitive(node.initializer);
|
|
51934
52042
|
case 211:
|
|
51935
52043
|
return isContextSensitive(node.expression);
|
|
@@ -52398,8 +52506,8 @@ var ts;
|
|
|
52398
52506
|
case 172: return [3, 2];
|
|
52399
52507
|
case 171: return [3, 2];
|
|
52400
52508
|
case 168: return [3, 2];
|
|
52401
|
-
case
|
|
52402
|
-
case
|
|
52509
|
+
case 296: return [3, 2];
|
|
52510
|
+
case 295: return [3, 4];
|
|
52403
52511
|
}
|
|
52404
52512
|
return [3, 6];
|
|
52405
52513
|
case 2: return [4, { errorNode: prop.name, innerExpression: undefined, nameType: type }];
|
|
@@ -54292,7 +54400,7 @@ var ts;
|
|
|
54292
54400
|
var requireOptionalProperties = (relation === subtypeRelation || relation === strictSubtypeRelation) && !isObjectLiteralType(source) && !isEmptyArrayLiteralType(source) && !isTupleType(source);
|
|
54293
54401
|
var unmatchedProperty = getUnmatchedProperty(source, target, requireOptionalProperties, false);
|
|
54294
54402
|
if (unmatchedProperty) {
|
|
54295
|
-
if (reportErrors) {
|
|
54403
|
+
if (reportErrors && shouldReportUnmatchedPropertyError(source, target)) {
|
|
54296
54404
|
reportUnmatchedProperty(source, target, unmatchedProperty, requireOptionalProperties);
|
|
54297
54405
|
}
|
|
54298
54406
|
return 0;
|
|
@@ -54432,6 +54540,19 @@ var ts;
|
|
|
54432
54540
|
}
|
|
54433
54541
|
return result;
|
|
54434
54542
|
}
|
|
54543
|
+
function shouldReportUnmatchedPropertyError(source, target) {
|
|
54544
|
+
var typeCallSignatures = getSignaturesOfStructuredType(source, 0);
|
|
54545
|
+
var typeConstructSignatures = getSignaturesOfStructuredType(source, 1);
|
|
54546
|
+
var typeProperties = getPropertiesOfObjectType(source);
|
|
54547
|
+
if ((typeCallSignatures.length || typeConstructSignatures.length) && !typeProperties.length) {
|
|
54548
|
+
if ((getSignaturesOfType(target, 0).length && typeCallSignatures.length) ||
|
|
54549
|
+
(getSignaturesOfType(target, 1).length && typeConstructSignatures.length)) {
|
|
54550
|
+
return true;
|
|
54551
|
+
}
|
|
54552
|
+
return false;
|
|
54553
|
+
}
|
|
54554
|
+
return true;
|
|
54555
|
+
}
|
|
54435
54556
|
function reportIncompatibleCallSignatureReturn(siga, sigb) {
|
|
54436
54557
|
if (siga.parameters.length === 0 && sigb.parameters.length === 0) {
|
|
54437
54558
|
return function (source, target) { return reportIncompatibleError(ts.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source), typeToString(target)); };
|
|
@@ -55495,7 +55616,7 @@ var ts;
|
|
|
55495
55616
|
return;
|
|
55496
55617
|
}
|
|
55497
55618
|
break;
|
|
55498
|
-
case
|
|
55619
|
+
case 316:
|
|
55499
55620
|
error(declaration, ts.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
|
|
55500
55621
|
return;
|
|
55501
55622
|
case 255:
|
|
@@ -55657,7 +55778,7 @@ var ts;
|
|
|
55657
55778
|
function isNonGenericTopLevelType(type) {
|
|
55658
55779
|
if (type.aliasSymbol && !type.aliasTypeArguments) {
|
|
55659
55780
|
var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 258);
|
|
55660
|
-
return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind ===
|
|
55781
|
+
return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 304 ? true : n.kind === 260 ? false : "quit"; }));
|
|
55661
55782
|
}
|
|
55662
55783
|
return false;
|
|
55663
55784
|
}
|
|
@@ -56584,7 +56705,7 @@ var ts;
|
|
|
56584
56705
|
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
56585
56706
|
}
|
|
56586
56707
|
default:
|
|
56587
|
-
if (node.parent.kind ===
|
|
56708
|
+
if (node.parent.kind === 296) {
|
|
56588
56709
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
56589
56710
|
}
|
|
56590
56711
|
else {
|
|
@@ -56658,8 +56779,9 @@ var ts;
|
|
|
56658
56779
|
return isMatchingReference(source.expression, target);
|
|
56659
56780
|
case 205:
|
|
56660
56781
|
case 206:
|
|
56661
|
-
|
|
56662
|
-
|
|
56782
|
+
var sourcePropertyName = getAccessedPropertyName(source);
|
|
56783
|
+
var targetPropertyName = ts.isAccessExpression(target) ? getAccessedPropertyName(target) : undefined;
|
|
56784
|
+
return sourcePropertyName !== undefined && targetPropertyName !== undefined && targetPropertyName === sourcePropertyName &&
|
|
56663
56785
|
isMatchingReference(source.expression, target.expression);
|
|
56664
56786
|
case 160:
|
|
56665
56787
|
return ts.isAccessExpression(target) &&
|
|
@@ -56671,12 +56793,49 @@ var ts;
|
|
|
56671
56793
|
return false;
|
|
56672
56794
|
}
|
|
56673
56795
|
function getAccessedPropertyName(access) {
|
|
56674
|
-
|
|
56675
|
-
|
|
56676
|
-
|
|
56677
|
-
|
|
56678
|
-
|
|
56679
|
-
|
|
56796
|
+
if (ts.isPropertyAccessExpression(access)) {
|
|
56797
|
+
return access.name.escapedText;
|
|
56798
|
+
}
|
|
56799
|
+
if (ts.isElementAccessExpression(access)) {
|
|
56800
|
+
return tryGetElementAccessExpressionName(access);
|
|
56801
|
+
}
|
|
56802
|
+
if (ts.isBindingElement(access)) {
|
|
56803
|
+
var name = getDestructuringPropertyName(access);
|
|
56804
|
+
return name ? ts.escapeLeadingUnderscores(name) : undefined;
|
|
56805
|
+
}
|
|
56806
|
+
if (ts.isParameter(access)) {
|
|
56807
|
+
return ("" + access.parent.parameters.indexOf(access));
|
|
56808
|
+
}
|
|
56809
|
+
return undefined;
|
|
56810
|
+
}
|
|
56811
|
+
function tryGetNameFromType(type) {
|
|
56812
|
+
return type.flags & 8192 ? type.escapedName :
|
|
56813
|
+
type.flags & 384 ? ts.escapeLeadingUnderscores("" + type.value) : undefined;
|
|
56814
|
+
}
|
|
56815
|
+
function tryGetElementAccessExpressionName(node) {
|
|
56816
|
+
if (ts.isStringOrNumericLiteralLike(node.argumentExpression)) {
|
|
56817
|
+
return ts.escapeLeadingUnderscores(node.argumentExpression.text);
|
|
56818
|
+
}
|
|
56819
|
+
if (ts.isEntityNameExpression(node.argumentExpression)) {
|
|
56820
|
+
var symbol = resolveEntityName(node.argumentExpression, 111551, true);
|
|
56821
|
+
if (!symbol || !isConstVariable(symbol))
|
|
56822
|
+
return undefined;
|
|
56823
|
+
var declaration = symbol.valueDeclaration;
|
|
56824
|
+
if (declaration === undefined)
|
|
56825
|
+
return undefined;
|
|
56826
|
+
var type = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
56827
|
+
if (type) {
|
|
56828
|
+
var name = tryGetNameFromType(type);
|
|
56829
|
+
if (name !== undefined) {
|
|
56830
|
+
return name;
|
|
56831
|
+
}
|
|
56832
|
+
}
|
|
56833
|
+
if (ts.hasOnlyExpressionInitializer(declaration)) {
|
|
56834
|
+
var initializer = ts.getEffectiveInitializer(declaration);
|
|
56835
|
+
return initializer && tryGetNameFromType(getTypeOfExpression(initializer));
|
|
56836
|
+
}
|
|
56837
|
+
}
|
|
56838
|
+
return undefined;
|
|
56680
56839
|
}
|
|
56681
56840
|
function containsMatchingReference(source, target) {
|
|
56682
56841
|
while (ts.isAccessExpression(source)) {
|
|
@@ -56789,7 +56948,7 @@ var ts;
|
|
|
56789
56948
|
}
|
|
56790
56949
|
function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
|
|
56791
56950
|
var keyPropertyName = getKeyPropertyName(unionType);
|
|
56792
|
-
var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind ===
|
|
56951
|
+
var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 295 &&
|
|
56793
56952
|
p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer); });
|
|
56794
56953
|
var propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
|
|
56795
56954
|
return propType && getConstituentTypeForKeyType(unionType, propType);
|
|
@@ -56971,7 +57130,7 @@ var ts;
|
|
|
56971
57130
|
}
|
|
56972
57131
|
function getAssignedTypeOfBinaryExpression(node) {
|
|
56973
57132
|
var isDestructuringDefaultAssignment = node.parent.kind === 203 && isDestructuringAssignmentTarget(node.parent) ||
|
|
56974
|
-
node.parent.kind ===
|
|
57133
|
+
node.parent.kind === 295 && isDestructuringAssignmentTarget(node.parent.parent);
|
|
56975
57134
|
return isDestructuringDefaultAssignment ?
|
|
56976
57135
|
getTypeWithDefault(getAssignedType(node), node.right) :
|
|
56977
57136
|
getTypeOfExpression(node.right);
|
|
@@ -57007,9 +57166,9 @@ var ts;
|
|
|
57007
57166
|
return getAssignedTypeOfArrayLiteralElement(parent, node);
|
|
57008
57167
|
case 224:
|
|
57009
57168
|
return getAssignedTypeOfSpreadExpression(parent);
|
|
57010
|
-
case 294:
|
|
57011
|
-
return getAssignedTypeOfPropertyAssignment(parent);
|
|
57012
57169
|
case 295:
|
|
57170
|
+
return getAssignedTypeOfPropertyAssignment(parent);
|
|
57171
|
+
case 296:
|
|
57013
57172
|
return getAssignedTypeOfShorthandPropertyAssignment(parent);
|
|
57014
57173
|
}
|
|
57015
57174
|
return errorType;
|
|
@@ -58466,7 +58625,7 @@ var ts;
|
|
|
58466
58625
|
return ts.findAncestor(node.parent, function (node) {
|
|
58467
58626
|
return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
|
|
58468
58627
|
node.kind === 261 ||
|
|
58469
|
-
node.kind ===
|
|
58628
|
+
node.kind === 304 ||
|
|
58470
58629
|
node.kind === 166;
|
|
58471
58630
|
});
|
|
58472
58631
|
}
|
|
@@ -58665,7 +58824,7 @@ var ts;
|
|
|
58665
58824
|
}
|
|
58666
58825
|
else if (declaration.kind === 225) {
|
|
58667
58826
|
var container = ts.getThisContainer(node, false);
|
|
58668
|
-
while (container.kind !==
|
|
58827
|
+
while (container.kind !== 304) {
|
|
58669
58828
|
if (container.parent === declaration) {
|
|
58670
58829
|
if (ts.isPropertyDeclaration(container) && ts.isStatic(container) || ts.isClassStaticBlockDeclaration(container)) {
|
|
58671
58830
|
getNodeLinks(declaration).flags |= 16777216;
|
|
@@ -58986,7 +59145,7 @@ var ts;
|
|
|
58986
59145
|
return container.parent.parent.left.expression;
|
|
58987
59146
|
}
|
|
58988
59147
|
else if (container.kind === 212 &&
|
|
58989
|
-
container.parent.kind ===
|
|
59148
|
+
container.parent.kind === 295 &&
|
|
58990
59149
|
container.parent.parent.kind === 204 &&
|
|
58991
59150
|
ts.isBinaryExpression(container.parent.parent.parent) &&
|
|
58992
59151
|
ts.getAssignmentDeclarationKind(container.parent.parent.parent) === 6) {
|
|
@@ -59014,7 +59173,7 @@ var ts;
|
|
|
59014
59173
|
}
|
|
59015
59174
|
function getTypeForThisExpressionFromJSDoc(node) {
|
|
59016
59175
|
var jsdocType = ts.getJSDocType(node);
|
|
59017
|
-
if (jsdocType && jsdocType.kind ===
|
|
59176
|
+
if (jsdocType && jsdocType.kind === 316) {
|
|
59018
59177
|
var jsDocFunctionType = jsdocType;
|
|
59019
59178
|
if (jsDocFunctionType.parameters.length > 0 &&
|
|
59020
59179
|
jsDocFunctionType.parameters[0].name &&
|
|
@@ -59150,7 +59309,7 @@ var ts;
|
|
|
59150
59309
|
return (func.kind === 168 ||
|
|
59151
59310
|
func.kind === 171 ||
|
|
59152
59311
|
func.kind === 172) && func.parent.kind === 204 ? func.parent :
|
|
59153
|
-
func.kind === 212 && func.parent.kind ===
|
|
59312
|
+
func.kind === 212 && func.parent.kind === 295 ? func.parent.parent :
|
|
59154
59313
|
undefined;
|
|
59155
59314
|
}
|
|
59156
59315
|
function getThisTypeArgument(type) {
|
|
@@ -59186,7 +59345,7 @@ var ts;
|
|
|
59186
59345
|
if (thisType) {
|
|
59187
59346
|
return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral)));
|
|
59188
59347
|
}
|
|
59189
|
-
if (literal.parent.kind !==
|
|
59348
|
+
if (literal.parent.kind !== 295) {
|
|
59190
59349
|
break;
|
|
59191
59350
|
}
|
|
59192
59351
|
literal = literal.parent.parent;
|
|
@@ -59659,11 +59818,21 @@ var ts;
|
|
|
59659
59818
|
}
|
|
59660
59819
|
return false;
|
|
59661
59820
|
}
|
|
59821
|
+
function uniqueStrings(strings) {
|
|
59822
|
+
var unique = new ts.Set(strings);
|
|
59823
|
+
var result = [];
|
|
59824
|
+
unique.forEach(function (str) { return result.push(str); });
|
|
59825
|
+
return result;
|
|
59826
|
+
}
|
|
59662
59827
|
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 ===
|
|
59828
|
+
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(uniqueStrings(ts.flatMap(contextualType.types, function (memberType) {
|
|
59829
|
+
return ts.map(ts.filter(getPropertiesOfType(memberType), 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 s.escapedName; });
|
|
59830
|
+
})), function (name) { return [function () { return undefinedType; }, name]; })), isTypeAssignableTo, contextualType);
|
|
59664
59831
|
}
|
|
59665
59832
|
function discriminateContextualTypeByJSXAttributes(node, contextualType) {
|
|
59666
|
-
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.
|
|
59833
|
+
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(uniqueStrings(ts.flatMap(contextualType.types, function (memberType) {
|
|
59834
|
+
return ts.map(ts.filter(getPropertiesOfType(memberType), 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 s.escapedName; });
|
|
59835
|
+
})), function (name) { return [function () { return undefinedType; }, name]; })), isTypeAssignableTo, contextualType);
|
|
59667
59836
|
}
|
|
59668
59837
|
function getApparentTypeOfContextualType(node, contextFlags) {
|
|
59669
59838
|
var contextualType = ts.isObjectLiteralMethod(node) ?
|
|
@@ -59733,10 +59902,10 @@ var ts;
|
|
|
59733
59902
|
return ts.isConstTypeReference(parent.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(parent.type);
|
|
59734
59903
|
case 220:
|
|
59735
59904
|
return getContextualTypeForBinaryOperand(node, contextFlags);
|
|
59736
|
-
case 294:
|
|
59737
59905
|
case 295:
|
|
59738
|
-
return getContextualTypeForObjectLiteralElement(parent, contextFlags);
|
|
59739
59906
|
case 296:
|
|
59907
|
+
return getContextualTypeForObjectLiteralElement(parent, contextFlags);
|
|
59908
|
+
case 297:
|
|
59740
59909
|
return getContextualType(parent.parent, contextFlags);
|
|
59741
59910
|
case 203: {
|
|
59742
59911
|
var arrayLiteral = parent;
|
|
@@ -60207,11 +60376,11 @@ var ts;
|
|
|
60207
60376
|
var member = getSymbolOfNode(memberDecl);
|
|
60208
60377
|
var computedNameType = memberDecl.name && memberDecl.name.kind === 161 ?
|
|
60209
60378
|
checkComputedPropertyName(memberDecl.name) : undefined;
|
|
60210
|
-
if (memberDecl.kind ===
|
|
60211
|
-
memberDecl.kind ===
|
|
60379
|
+
if (memberDecl.kind === 295 ||
|
|
60380
|
+
memberDecl.kind === 296 ||
|
|
60212
60381
|
ts.isObjectLiteralMethod(memberDecl)) {
|
|
60213
|
-
var type = memberDecl.kind ===
|
|
60214
|
-
memberDecl.kind ===
|
|
60382
|
+
var type = memberDecl.kind === 295 ? checkPropertyAssignment(memberDecl, checkMode) :
|
|
60383
|
+
memberDecl.kind === 296 ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
|
|
60215
60384
|
checkObjectLiteralMethod(memberDecl, checkMode);
|
|
60216
60385
|
if (isInJavascript) {
|
|
60217
60386
|
var jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl);
|
|
@@ -60232,8 +60401,8 @@ var ts;
|
|
|
60232
60401
|
prop.nameType = nameType;
|
|
60233
60402
|
}
|
|
60234
60403
|
if (inDestructuringPattern) {
|
|
60235
|
-
var isOptional = (memberDecl.kind ===
|
|
60236
|
-
(memberDecl.kind ===
|
|
60404
|
+
var isOptional = (memberDecl.kind === 295 && hasDefaultValue(memberDecl.initializer)) ||
|
|
60405
|
+
(memberDecl.kind === 296 && memberDecl.objectAssignmentInitializer);
|
|
60237
60406
|
if (isOptional) {
|
|
60238
60407
|
prop.flags |= 16777216;
|
|
60239
60408
|
}
|
|
@@ -60257,7 +60426,7 @@ var ts;
|
|
|
60257
60426
|
member = prop;
|
|
60258
60427
|
allPropertiesTable === null || allPropertiesTable === void 0 ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
|
|
60259
60428
|
}
|
|
60260
|
-
else if (memberDecl.kind ===
|
|
60429
|
+
else if (memberDecl.kind === 297) {
|
|
60261
60430
|
if (languageVersion < 2) {
|
|
60262
60431
|
checkExternalEmitHelpers(memberDecl, 2);
|
|
60263
60432
|
}
|
|
@@ -60312,7 +60481,7 @@ var ts;
|
|
|
60312
60481
|
}
|
|
60313
60482
|
propertiesArray.push(member);
|
|
60314
60483
|
}
|
|
60315
|
-
if (contextualTypeHasPattern && node.parent.kind !==
|
|
60484
|
+
if (contextualTypeHasPattern && node.parent.kind !== 297) {
|
|
60316
60485
|
for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
|
|
60317
60486
|
var prop = _e[_d];
|
|
60318
60487
|
if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
|
|
@@ -60903,18 +61072,17 @@ var ts;
|
|
|
60903
61072
|
}
|
|
60904
61073
|
var enclosingClass = forEachEnclosingClass(location, function (enclosingDeclaration) {
|
|
60905
61074
|
var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
|
|
60906
|
-
return isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing)
|
|
61075
|
+
return isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);
|
|
60907
61076
|
});
|
|
60908
61077
|
if (!enclosingClass) {
|
|
60909
|
-
|
|
60910
|
-
|
|
61078
|
+
enclosingClass = getEnclosingClassFromThisParameter(location);
|
|
61079
|
+
enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);
|
|
61080
|
+
if (flags & 32 || !enclosingClass) {
|
|
60911
61081
|
if (errorNode) {
|
|
60912
61082
|
error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType));
|
|
60913
61083
|
}
|
|
60914
61084
|
return false;
|
|
60915
61085
|
}
|
|
60916
|
-
var thisType = getTypeFromTypeNode(thisParameter.type);
|
|
60917
|
-
enclosingClass = ((thisType.flags & 262144) ? getConstraintOfTypeParameter(thisType) : thisType).target;
|
|
60918
61086
|
}
|
|
60919
61087
|
if (flags & 32) {
|
|
60920
61088
|
return true;
|
|
@@ -60930,6 +61098,17 @@ var ts;
|
|
|
60930
61098
|
}
|
|
60931
61099
|
return true;
|
|
60932
61100
|
}
|
|
61101
|
+
function getEnclosingClassFromThisParameter(node) {
|
|
61102
|
+
var thisParameter = getThisParameterFromNodeContext(node);
|
|
61103
|
+
var thisType = (thisParameter === null || thisParameter === void 0 ? void 0 : thisParameter.type) && getTypeFromTypeNode(thisParameter.type);
|
|
61104
|
+
if (thisType && thisType.flags & 262144) {
|
|
61105
|
+
thisType = getConstraintOfTypeParameter(thisType);
|
|
61106
|
+
}
|
|
61107
|
+
if (thisType && ts.getObjectFlags(thisType) & (3 | 4)) {
|
|
61108
|
+
return getTargetType(thisType);
|
|
61109
|
+
}
|
|
61110
|
+
return undefined;
|
|
61111
|
+
}
|
|
60933
61112
|
function getThisParameterFromNodeContext(node) {
|
|
60934
61113
|
var thisContainer = ts.getThisContainer(node, false);
|
|
60935
61114
|
return thisContainer && ts.isFunctionLike(thisContainer) ? ts.getThisParameter(thisContainer) : undefined;
|
|
@@ -61265,11 +61444,11 @@ var ts;
|
|
|
61265
61444
|
switch (node.kind) {
|
|
61266
61445
|
case 166:
|
|
61267
61446
|
return true;
|
|
61268
|
-
case
|
|
61447
|
+
case 295:
|
|
61269
61448
|
case 168:
|
|
61270
61449
|
case 171:
|
|
61271
61450
|
case 172:
|
|
61272
|
-
case
|
|
61451
|
+
case 297:
|
|
61273
61452
|
case 161:
|
|
61274
61453
|
case 232:
|
|
61275
61454
|
case 287:
|
|
@@ -62717,7 +62896,7 @@ var ts;
|
|
|
62717
62896
|
if (!isConstructorAccessible(node, constructSignatures[0])) {
|
|
62718
62897
|
return resolveErrorCall(node);
|
|
62719
62898
|
}
|
|
62720
|
-
if (constructSignatures
|
|
62899
|
+
if (someSignature(constructSignatures, function (signature) { return !!(signature.flags & 4); })) {
|
|
62721
62900
|
error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class);
|
|
62722
62901
|
return resolveErrorCall(node);
|
|
62723
62902
|
}
|
|
@@ -62744,6 +62923,12 @@ var ts;
|
|
|
62744
62923
|
invocationError(node.expression, expressionType, 1);
|
|
62745
62924
|
return resolveErrorCall(node);
|
|
62746
62925
|
}
|
|
62926
|
+
function someSignature(signatures, f) {
|
|
62927
|
+
if (ts.isArray(signatures)) {
|
|
62928
|
+
return ts.some(signatures, function (signature) { return someSignature(signature, f); });
|
|
62929
|
+
}
|
|
62930
|
+
return signatures.compositeKind === 1048576 ? ts.some(signatures.compositeSignatures, f) : f(signatures);
|
|
62931
|
+
}
|
|
62747
62932
|
function typeHasProtectedAccessibleBase(target, type) {
|
|
62748
62933
|
var baseTypes = getBaseTypes(type);
|
|
62749
62934
|
if (!ts.length(baseTypes)) {
|
|
@@ -63546,7 +63731,7 @@ var ts;
|
|
|
63546
63731
|
}
|
|
63547
63732
|
function getParameterIdentifierNameAtPosition(signature, pos) {
|
|
63548
63733
|
var _a;
|
|
63549
|
-
if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) ===
|
|
63734
|
+
if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 316) {
|
|
63550
63735
|
return undefined;
|
|
63551
63736
|
}
|
|
63552
63737
|
var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
|
|
@@ -64400,7 +64585,7 @@ var ts;
|
|
|
64400
64585
|
case 40:
|
|
64401
64586
|
case 54:
|
|
64402
64587
|
checkNonNullType(operandType, node.operand);
|
|
64403
|
-
if (
|
|
64588
|
+
if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288)) {
|
|
64404
64589
|
error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
|
|
64405
64590
|
}
|
|
64406
64591
|
if (node.operator === 39) {
|
|
@@ -64445,6 +64630,13 @@ var ts;
|
|
|
64445
64630
|
}
|
|
64446
64631
|
return numberType;
|
|
64447
64632
|
}
|
|
64633
|
+
function maybeTypeOfKindConsideringBaseConstraint(type, kind) {
|
|
64634
|
+
if (maybeTypeOfKind(type, kind)) {
|
|
64635
|
+
return true;
|
|
64636
|
+
}
|
|
64637
|
+
var baseConstraint = getBaseConstraintOrType(type);
|
|
64638
|
+
return !!baseConstraint && maybeTypeOfKind(baseConstraint, kind);
|
|
64639
|
+
}
|
|
64448
64640
|
function maybeTypeOfKind(type, kind) {
|
|
64449
64641
|
if (type.flags & kind) {
|
|
64450
64642
|
return true;
|
|
@@ -64545,7 +64737,7 @@ var ts;
|
|
|
64545
64737
|
if (rightIsThis === void 0) { rightIsThis = false; }
|
|
64546
64738
|
var properties = node.properties;
|
|
64547
64739
|
var property = properties[propertyIndex];
|
|
64548
|
-
if (property.kind ===
|
|
64740
|
+
if (property.kind === 295 || property.kind === 296) {
|
|
64549
64741
|
var name = property.name;
|
|
64550
64742
|
var exprType = getLiteralTypeFromPropertyName(name);
|
|
64551
64743
|
if (isTypeUsableAsPropertyName(exprType)) {
|
|
@@ -64558,9 +64750,9 @@ var ts;
|
|
|
64558
64750
|
}
|
|
64559
64751
|
var elementType = getIndexedAccessType(objectLiteralType, exprType, 32, name);
|
|
64560
64752
|
var type = getFlowTypeOfDestructuring(property, elementType);
|
|
64561
|
-
return checkDestructuringAssignment(property.kind ===
|
|
64753
|
+
return checkDestructuringAssignment(property.kind === 296 ? property : property.initializer, type);
|
|
64562
64754
|
}
|
|
64563
|
-
else if (property.kind ===
|
|
64755
|
+
else if (property.kind === 297) {
|
|
64564
64756
|
if (propertyIndex < properties.length - 1) {
|
|
64565
64757
|
error(property, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
|
|
64566
64758
|
}
|
|
@@ -64638,7 +64830,7 @@ var ts;
|
|
|
64638
64830
|
}
|
|
64639
64831
|
function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) {
|
|
64640
64832
|
var target;
|
|
64641
|
-
if (exprOrAssignment.kind ===
|
|
64833
|
+
if (exprOrAssignment.kind === 296) {
|
|
64642
64834
|
var prop = exprOrAssignment;
|
|
64643
64835
|
if (prop.objectAssignmentInitializer) {
|
|
64644
64836
|
if (strictNullChecks &&
|
|
@@ -64666,10 +64858,10 @@ var ts;
|
|
|
64666
64858
|
}
|
|
64667
64859
|
function checkReferenceAssignment(target, sourceType, checkMode) {
|
|
64668
64860
|
var targetType = checkExpression(target, checkMode);
|
|
64669
|
-
var error = target.parent.kind ===
|
|
64861
|
+
var error = target.parent.kind === 297 ?
|
|
64670
64862
|
ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
|
|
64671
64863
|
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
|
|
64672
|
-
var optionalError = target.parent.kind ===
|
|
64864
|
+
var optionalError = target.parent.kind === 297 ?
|
|
64673
64865
|
ts.Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access :
|
|
64674
64866
|
ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;
|
|
64675
64867
|
if (checkReferenceExpression(target, error, optionalError)) {
|
|
@@ -65078,8 +65270,8 @@ var ts;
|
|
|
65078
65270
|
return node.kind === 79 && node.escapedText === "eval";
|
|
65079
65271
|
}
|
|
65080
65272
|
function checkForDisallowedESSymbolOperand(operator) {
|
|
65081
|
-
var offendingSymbolOperand =
|
|
65082
|
-
|
|
65273
|
+
var offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288) ? left :
|
|
65274
|
+
maybeTypeOfKindConsideringBaseConstraint(rightType, 12288) ? right :
|
|
65083
65275
|
undefined;
|
|
65084
65276
|
if (offendingSymbolOperand) {
|
|
65085
65277
|
error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator));
|
|
@@ -65265,7 +65457,7 @@ var ts;
|
|
|
65265
65457
|
for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
|
|
65266
65458
|
var span = _a[_i];
|
|
65267
65459
|
var type = checkExpression(span.expression);
|
|
65268
|
-
if (
|
|
65460
|
+
if (maybeTypeOfKindConsideringBaseConstraint(type, 12288)) {
|
|
65269
65461
|
error(span.expression, ts.Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String);
|
|
65270
65462
|
}
|
|
65271
65463
|
texts.push(span.literal.text);
|
|
@@ -65934,7 +66126,7 @@ var ts;
|
|
|
65934
66126
|
checkAsyncFunctionReturnType(node, returnTypeNode);
|
|
65935
66127
|
}
|
|
65936
66128
|
}
|
|
65937
|
-
if (node.kind !== 175 && node.kind !==
|
|
66129
|
+
if (node.kind !== 175 && node.kind !== 316) {
|
|
65938
66130
|
registerForUnusedIdentifiersCheck(node);
|
|
65939
66131
|
}
|
|
65940
66132
|
}
|
|
@@ -66483,6 +66675,14 @@ var ts;
|
|
|
66483
66675
|
}
|
|
66484
66676
|
function checkImportType(node) {
|
|
66485
66677
|
checkSourceElement(node.argument);
|
|
66678
|
+
if (node.assertions) {
|
|
66679
|
+
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
66680
|
+
if (override) {
|
|
66681
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
66682
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
|
|
66683
|
+
}
|
|
66684
|
+
}
|
|
66685
|
+
}
|
|
66486
66686
|
getTypeFromTypeNode(node);
|
|
66487
66687
|
}
|
|
66488
66688
|
function checkNamedTupleMember(node) {
|
|
@@ -66763,9 +66963,9 @@ var ts;
|
|
|
66763
66963
|
switch (d.kind) {
|
|
66764
66964
|
case 257:
|
|
66765
66965
|
case 258:
|
|
66766
|
-
case
|
|
66767
|
-
case 336:
|
|
66966
|
+
case 344:
|
|
66768
66967
|
case 337:
|
|
66968
|
+
case 338:
|
|
66769
66969
|
return 2;
|
|
66770
66970
|
case 260:
|
|
66771
66971
|
return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
|
|
@@ -66773,9 +66973,9 @@ var ts;
|
|
|
66773
66973
|
: 4;
|
|
66774
66974
|
case 256:
|
|
66775
66975
|
case 259:
|
|
66776
|
-
case
|
|
66976
|
+
case 298:
|
|
66777
66977
|
return 2 | 1;
|
|
66778
|
-
case
|
|
66978
|
+
case 304:
|
|
66779
66979
|
return 2 | 1 | 4;
|
|
66780
66980
|
case 270:
|
|
66781
66981
|
case 220:
|
|
@@ -67286,7 +67486,7 @@ var ts;
|
|
|
67286
67486
|
checkUnusedClassMembers(node, addDiagnostic);
|
|
67287
67487
|
checkUnusedTypeParameters(node, addDiagnostic);
|
|
67288
67488
|
break;
|
|
67289
|
-
case
|
|
67489
|
+
case 304:
|
|
67290
67490
|
case 260:
|
|
67291
67491
|
case 234:
|
|
67292
67492
|
case 262:
|
|
@@ -67581,7 +67781,7 @@ var ts;
|
|
|
67581
67781
|
node.kind === 167 ||
|
|
67582
67782
|
node.kind === 171 ||
|
|
67583
67783
|
node.kind === 172 ||
|
|
67584
|
-
node.kind ===
|
|
67784
|
+
node.kind === 295) {
|
|
67585
67785
|
return false;
|
|
67586
67786
|
}
|
|
67587
67787
|
if (node.flags & 8388608) {
|
|
@@ -67639,7 +67839,7 @@ var ts;
|
|
|
67639
67839
|
return;
|
|
67640
67840
|
}
|
|
67641
67841
|
var parent = getDeclarationContainer(node);
|
|
67642
|
-
if (parent.kind ===
|
|
67842
|
+
if (parent.kind === 304 && ts.isExternalOrCommonJsModule(parent)) {
|
|
67643
67843
|
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));
|
|
67644
67844
|
}
|
|
67645
67845
|
}
|
|
@@ -67651,7 +67851,7 @@ var ts;
|
|
|
67651
67851
|
return;
|
|
67652
67852
|
}
|
|
67653
67853
|
var parent = getDeclarationContainer(node);
|
|
67654
|
-
if (parent.kind ===
|
|
67854
|
+
if (parent.kind === 304 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048) {
|
|
67655
67855
|
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));
|
|
67656
67856
|
}
|
|
67657
67857
|
}
|
|
@@ -67742,7 +67942,7 @@ var ts;
|
|
|
67742
67942
|
(container.kind === 234 && ts.isFunctionLike(container.parent) ||
|
|
67743
67943
|
container.kind === 261 ||
|
|
67744
67944
|
container.kind === 260 ||
|
|
67745
|
-
container.kind ===
|
|
67945
|
+
container.kind === 304);
|
|
67746
67946
|
if (!namesShareScope) {
|
|
67747
67947
|
var name = symbolToString(localDeclarationSymbol);
|
|
67748
67948
|
error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
|
|
@@ -69449,7 +69649,7 @@ var ts;
|
|
|
69449
69649
|
}
|
|
69450
69650
|
if (!ts.isStatic(member) && isPropertyWithoutInitializer(member)) {
|
|
69451
69651
|
var propName = member.name;
|
|
69452
|
-
if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName)) {
|
|
69652
|
+
if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName) || ts.isComputedPropertyName(propName)) {
|
|
69453
69653
|
var type = getTypeOfSymbol(getSymbolOfNode(member));
|
|
69454
69654
|
if (!(type.flags & 3 || getFalsyFlags(type) & 32768)) {
|
|
69455
69655
|
if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) {
|
|
@@ -69483,7 +69683,9 @@ var ts;
|
|
|
69483
69683
|
return false;
|
|
69484
69684
|
}
|
|
69485
69685
|
function isPropertyInitializedInConstructor(propName, propType, constructor) {
|
|
69486
|
-
var reference = ts.
|
|
69686
|
+
var reference = ts.isComputedPropertyName(propName)
|
|
69687
|
+
? ts.factory.createElementAccessExpression(ts.factory.createThis(), propName.expression)
|
|
69688
|
+
: ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propName);
|
|
69487
69689
|
ts.setParent(reference.expression, reference);
|
|
69488
69690
|
ts.setParent(reference, constructor);
|
|
69489
69691
|
reference.flowNode = constructor.returnFlowNode;
|
|
@@ -69930,7 +70132,7 @@ var ts;
|
|
|
69930
70132
|
return false;
|
|
69931
70133
|
}
|
|
69932
70134
|
var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
|
|
69933
|
-
if (node.parent.kind !==
|
|
70135
|
+
if (node.parent.kind !== 304 && !inAmbientExternalModule) {
|
|
69934
70136
|
error(moduleName, node.kind === 271 ?
|
|
69935
70137
|
ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
|
|
69936
70138
|
ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
|
|
@@ -70058,6 +70260,14 @@ var ts;
|
|
|
70058
70260
|
function checkAssertClause(declaration) {
|
|
70059
70261
|
var _a;
|
|
70060
70262
|
if (declaration.assertClause) {
|
|
70263
|
+
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
70264
|
+
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
70265
|
+
if (validForTypeAssertions && override) {
|
|
70266
|
+
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
70267
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node12_or_nodenext);
|
|
70268
|
+
}
|
|
70269
|
+
return;
|
|
70270
|
+
}
|
|
70061
70271
|
var mode = (moduleKind === ts.ModuleKind.NodeNext) && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
70062
70272
|
if (mode !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.ESNext) {
|
|
70063
70273
|
return grammarErrorOnNode(declaration.assertClause, moduleKind === ts.ModuleKind.NodeNext
|
|
@@ -70067,6 +70277,9 @@ var ts;
|
|
|
70067
70277
|
if (ts.isImportDeclaration(declaration) ? (_a = declaration.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
70068
70278
|
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
|
|
70069
70279
|
}
|
|
70280
|
+
if (override) {
|
|
70281
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
|
|
70282
|
+
}
|
|
70070
70283
|
}
|
|
70071
70284
|
}
|
|
70072
70285
|
function checkImportDeclaration(node) {
|
|
@@ -70151,7 +70364,7 @@ var ts;
|
|
|
70151
70364
|
var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
|
|
70152
70365
|
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 261 &&
|
|
70153
70366
|
!node.moduleSpecifier && node.flags & 8388608;
|
|
70154
|
-
if (node.parent.kind !==
|
|
70367
|
+
if (node.parent.kind !== 304 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
|
70155
70368
|
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
|
70156
70369
|
}
|
|
70157
70370
|
}
|
|
@@ -70190,7 +70403,7 @@ var ts;
|
|
|
70190
70403
|
return false;
|
|
70191
70404
|
}
|
|
70192
70405
|
function checkGrammarModuleElementContext(node, errorMessage) {
|
|
70193
|
-
var isInAppropriateContext = node.parent.kind ===
|
|
70406
|
+
var isInAppropriateContext = node.parent.kind === 304 || node.parent.kind === 261 || node.parent.kind === 260;
|
|
70194
70407
|
if (!isInAppropriateContext) {
|
|
70195
70408
|
grammarErrorOnFirstToken(node, errorMessage);
|
|
70196
70409
|
}
|
|
@@ -70265,7 +70478,7 @@ var ts;
|
|
|
70265
70478
|
if (checkGrammarModuleElementContext(node, illegalContextMessage)) {
|
|
70266
70479
|
return;
|
|
70267
70480
|
}
|
|
70268
|
-
var container = node.parent.kind ===
|
|
70481
|
+
var container = node.parent.kind === 304 ? node.parent : node.parent.parent;
|
|
70269
70482
|
if (container.kind === 260 && !ts.isAmbientModule(container)) {
|
|
70270
70483
|
if (node.isExportEquals) {
|
|
70271
70484
|
error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
|
|
@@ -70450,40 +70663,40 @@ var ts;
|
|
|
70450
70663
|
return checkImportType(node);
|
|
70451
70664
|
case 196:
|
|
70452
70665
|
return checkNamedTupleMember(node);
|
|
70453
|
-
case 326:
|
|
70454
|
-
return checkJSDocAugmentsTag(node);
|
|
70455
70666
|
case 327:
|
|
70667
|
+
return checkJSDocAugmentsTag(node);
|
|
70668
|
+
case 328:
|
|
70456
70669
|
return checkJSDocImplementsTag(node);
|
|
70457
|
-
case
|
|
70458
|
-
case 336:
|
|
70670
|
+
case 344:
|
|
70459
70671
|
case 337:
|
|
70672
|
+
case 338:
|
|
70460
70673
|
return checkJSDocTypeAliasTag(node);
|
|
70461
|
-
case
|
|
70674
|
+
case 343:
|
|
70462
70675
|
return checkJSDocTemplateTag(node);
|
|
70463
|
-
case
|
|
70676
|
+
case 342:
|
|
70464
70677
|
return checkJSDocTypeTag(node);
|
|
70465
|
-
case
|
|
70678
|
+
case 339:
|
|
70466
70679
|
return checkJSDocParameterTag(node);
|
|
70467
|
-
case
|
|
70680
|
+
case 346:
|
|
70468
70681
|
return checkJSDocPropertyTag(node);
|
|
70469
|
-
case
|
|
70682
|
+
case 316:
|
|
70470
70683
|
checkJSDocFunctionType(node);
|
|
70684
|
+
case 314:
|
|
70471
70685
|
case 313:
|
|
70472
|
-
case 312:
|
|
70473
|
-
case 310:
|
|
70474
70686
|
case 311:
|
|
70475
|
-
case
|
|
70687
|
+
case 312:
|
|
70688
|
+
case 321:
|
|
70476
70689
|
checkJSDocTypeIsInJsFile(node);
|
|
70477
70690
|
ts.forEachChild(node, checkSourceElement);
|
|
70478
70691
|
return;
|
|
70479
|
-
case
|
|
70692
|
+
case 317:
|
|
70480
70693
|
checkJSDocVariadicType(node);
|
|
70481
70694
|
return;
|
|
70482
|
-
case
|
|
70695
|
+
case 308:
|
|
70483
70696
|
return checkSourceElement(node.type);
|
|
70484
|
-
case 331:
|
|
70485
|
-
case 333:
|
|
70486
70697
|
case 332:
|
|
70698
|
+
case 334:
|
|
70699
|
+
case 333:
|
|
70487
70700
|
return checkJSDocAccessibilityModifiers(node);
|
|
70488
70701
|
case 193:
|
|
70489
70702
|
return checkIndexedAccessType(node);
|
|
@@ -70788,7 +71001,7 @@ var ts;
|
|
|
70788
71001
|
copySymbols(location.locals, meaning);
|
|
70789
71002
|
}
|
|
70790
71003
|
switch (location.kind) {
|
|
70791
|
-
case
|
|
71004
|
+
case 304:
|
|
70792
71005
|
if (!ts.isExternalModule(location))
|
|
70793
71006
|
break;
|
|
70794
71007
|
case 260:
|
|
@@ -70860,9 +71073,9 @@ var ts;
|
|
|
70860
71073
|
case 257:
|
|
70861
71074
|
case 258:
|
|
70862
71075
|
case 259:
|
|
70863
|
-
case
|
|
70864
|
-
case 336:
|
|
71076
|
+
case 344:
|
|
70865
71077
|
case 337:
|
|
71078
|
+
case 338:
|
|
70866
71079
|
return true;
|
|
70867
71080
|
case 266:
|
|
70868
71081
|
return node.isTypeOnly;
|
|
@@ -71001,10 +71214,10 @@ var ts;
|
|
|
71001
71214
|
return entityNameSymbol;
|
|
71002
71215
|
}
|
|
71003
71216
|
}
|
|
71004
|
-
if (name.parent.kind ===
|
|
71217
|
+
if (name.parent.kind === 339) {
|
|
71005
71218
|
return ts.getParameterSymbolFromJSDoc(name.parent);
|
|
71006
71219
|
}
|
|
71007
|
-
if (name.parent.kind === 162 && name.parent.parent.kind ===
|
|
71220
|
+
if (name.parent.kind === 162 && name.parent.parent.kind === 343) {
|
|
71008
71221
|
ts.Debug.assert(!ts.isInJSFile(name));
|
|
71009
71222
|
var typeParameter = ts.getTypeParameterFromJsDoc(name.parent);
|
|
71010
71223
|
return typeParameter && typeParameter.symbol;
|
|
@@ -71082,7 +71295,7 @@ var ts;
|
|
|
71082
71295
|
}
|
|
71083
71296
|
}
|
|
71084
71297
|
function getSymbolAtLocation(node, ignoreErrors) {
|
|
71085
|
-
if (node.kind ===
|
|
71298
|
+
if (node.kind === 304) {
|
|
71086
71299
|
return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
|
|
71087
71300
|
}
|
|
71088
71301
|
var parent = node.parent;
|
|
@@ -71198,7 +71411,7 @@ var ts;
|
|
|
71198
71411
|
return undefined;
|
|
71199
71412
|
}
|
|
71200
71413
|
function getShorthandAssignmentValueSymbol(location) {
|
|
71201
|
-
if (location && location.kind ===
|
|
71414
|
+
if (location && location.kind === 296) {
|
|
71202
71415
|
return resolveEntityName(location.name, 111551 | 2097152);
|
|
71203
71416
|
}
|
|
71204
71417
|
return undefined;
|
|
@@ -71277,7 +71490,7 @@ var ts;
|
|
|
71277
71490
|
var iteratedType = getTypeOfExpression(expr.parent.right);
|
|
71278
71491
|
return checkDestructuringAssignment(expr, iteratedType || errorType);
|
|
71279
71492
|
}
|
|
71280
|
-
if (expr.parent.kind ===
|
|
71493
|
+
if (expr.parent.kind === 295) {
|
|
71281
71494
|
var node_3 = ts.cast(expr.parent.parent, ts.isObjectLiteralExpression);
|
|
71282
71495
|
var typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node_3) || errorType;
|
|
71283
71496
|
var propertyIndex = ts.indexOfNode(node_3.properties, expr.parent);
|
|
@@ -71412,7 +71625,7 @@ var ts;
|
|
|
71412
71625
|
}
|
|
71413
71626
|
var parentSymbol_1 = getParentOfSymbol(symbol);
|
|
71414
71627
|
if (parentSymbol_1) {
|
|
71415
|
-
if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) ===
|
|
71628
|
+
if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) === 304) {
|
|
71416
71629
|
var symbolFile = parentSymbol_1.valueDeclaration;
|
|
71417
71630
|
var referenceFile = ts.getSourceFileOfNode(node);
|
|
71418
71631
|
var symbolIsUmdExport = symbolFile !== referenceFile;
|
|
@@ -71511,7 +71724,7 @@ var ts;
|
|
|
71511
71724
|
}
|
|
71512
71725
|
function isTopLevelValueImportEqualsWithEntityName(nodeIn) {
|
|
71513
71726
|
var node = ts.getParseTreeNode(nodeIn, ts.isImportEqualsDeclaration);
|
|
71514
|
-
if (node === undefined || node.parent.kind !==
|
|
71727
|
+
if (node === undefined || node.parent.kind !== 304 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
|
|
71515
71728
|
return false;
|
|
71516
71729
|
}
|
|
71517
71730
|
var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
|
|
@@ -71611,7 +71824,7 @@ var ts;
|
|
|
71611
71824
|
}
|
|
71612
71825
|
function canHaveConstantValue(node) {
|
|
71613
71826
|
switch (node.kind) {
|
|
71614
|
-
case
|
|
71827
|
+
case 298:
|
|
71615
71828
|
case 205:
|
|
71616
71829
|
case 206:
|
|
71617
71830
|
return true;
|
|
@@ -71619,7 +71832,7 @@ var ts;
|
|
|
71619
71832
|
return false;
|
|
71620
71833
|
}
|
|
71621
71834
|
function getConstantValue(node) {
|
|
71622
|
-
if (node.kind ===
|
|
71835
|
+
if (node.kind === 298) {
|
|
71623
71836
|
return getEnumMemberValue(node);
|
|
71624
71837
|
}
|
|
71625
71838
|
var symbol = getNodeLinks(node).resolvedSymbol;
|
|
@@ -71902,7 +72115,7 @@ var ts;
|
|
|
71902
72115
|
},
|
|
71903
72116
|
getDeclarationStatementsForSourceFile: function (node, flags, tracker, bundled) {
|
|
71904
72117
|
var n = ts.getParseTreeNode(node);
|
|
71905
|
-
ts.Debug.assert(n && n.kind ===
|
|
72118
|
+
ts.Debug.assert(n && n.kind === 304, "Non-sourcefile node passed into getDeclarationsForSourceFile");
|
|
71906
72119
|
var sym = getSymbolOfNode(node);
|
|
71907
72120
|
if (!sym) {
|
|
71908
72121
|
return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled);
|
|
@@ -71986,7 +72199,7 @@ var ts;
|
|
|
71986
72199
|
break;
|
|
71987
72200
|
}
|
|
71988
72201
|
}
|
|
71989
|
-
if (current.valueDeclaration && current.valueDeclaration.kind ===
|
|
72202
|
+
if (current.valueDeclaration && current.valueDeclaration.kind === 304 && current.flags & 512) {
|
|
71990
72203
|
return false;
|
|
71991
72204
|
}
|
|
71992
72205
|
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
|
|
@@ -72018,7 +72231,7 @@ var ts;
|
|
|
72018
72231
|
if (!moduleSymbol) {
|
|
72019
72232
|
return undefined;
|
|
72020
72233
|
}
|
|
72021
|
-
return ts.getDeclarationOfKind(moduleSymbol,
|
|
72234
|
+
return ts.getDeclarationOfKind(moduleSymbol, 304);
|
|
72022
72235
|
}
|
|
72023
72236
|
function initializeTypeChecker() {
|
|
72024
72237
|
for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
|
|
@@ -72279,7 +72492,7 @@ var ts;
|
|
|
72279
72492
|
else if (flags & 256) {
|
|
72280
72493
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
|
|
72281
72494
|
}
|
|
72282
|
-
else if (node.parent.kind === 261 || node.parent.kind ===
|
|
72495
|
+
else if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72283
72496
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
|
|
72284
72497
|
}
|
|
72285
72498
|
else if (flags & 128) {
|
|
@@ -72305,7 +72518,7 @@ var ts;
|
|
|
72305
72518
|
else if (flags & 256) {
|
|
72306
72519
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
|
|
72307
72520
|
}
|
|
72308
|
-
else if (node.parent.kind === 261 || node.parent.kind ===
|
|
72521
|
+
else if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72309
72522
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
|
|
72310
72523
|
}
|
|
72311
72524
|
else if (node.kind === 163) {
|
|
@@ -72351,7 +72564,7 @@ var ts;
|
|
|
72351
72564
|
flags |= 1;
|
|
72352
72565
|
break;
|
|
72353
72566
|
case 88:
|
|
72354
|
-
var container = node.parent.kind ===
|
|
72567
|
+
var container = node.parent.kind === 304 ? node.parent : node.parent.parent;
|
|
72355
72568
|
if (container.kind === 260 && !ts.isAmbientModule(container)) {
|
|
72356
72569
|
return grammarErrorOnNode(modifier, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
|
|
72357
72570
|
}
|
|
@@ -72489,7 +72702,7 @@ var ts;
|
|
|
72489
72702
|
case 163:
|
|
72490
72703
|
return false;
|
|
72491
72704
|
default:
|
|
72492
|
-
if (node.parent.kind === 261 || node.parent.kind ===
|
|
72705
|
+
if (node.parent.kind === 261 || node.parent.kind === 304) {
|
|
72493
72706
|
return false;
|
|
72494
72707
|
}
|
|
72495
72708
|
switch (node.kind) {
|
|
@@ -72771,7 +72984,7 @@ var ts;
|
|
|
72771
72984
|
var seen = new ts.Map();
|
|
72772
72985
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
72773
72986
|
var prop = _a[_i];
|
|
72774
|
-
if (prop.kind ===
|
|
72987
|
+
if (prop.kind === 297) {
|
|
72775
72988
|
if (inDestructuring) {
|
|
72776
72989
|
var expression = ts.skipParentheses(prop.expression);
|
|
72777
72990
|
if (ts.isArrayLiteralExpression(expression) || ts.isObjectLiteralExpression(expression)) {
|
|
@@ -72784,7 +72997,7 @@ var ts;
|
|
|
72784
72997
|
if (name.kind === 161) {
|
|
72785
72998
|
checkGrammarComputedPropertyName(name);
|
|
72786
72999
|
}
|
|
72787
|
-
if (prop.kind ===
|
|
73000
|
+
if (prop.kind === 296 && !inDestructuring && prop.objectAssignmentInitializer) {
|
|
72788
73001
|
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);
|
|
72789
73002
|
}
|
|
72790
73003
|
if (name.kind === 80) {
|
|
@@ -72800,9 +73013,9 @@ var ts;
|
|
|
72800
73013
|
}
|
|
72801
73014
|
var currentKind = void 0;
|
|
72802
73015
|
switch (prop.kind) {
|
|
72803
|
-
case
|
|
73016
|
+
case 296:
|
|
72804
73017
|
checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
|
|
72805
|
-
case
|
|
73018
|
+
case 295:
|
|
72806
73019
|
checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
|
|
72807
73020
|
if (name.kind === 8) {
|
|
72808
73021
|
checkGrammarNumericLiteral(name);
|
|
@@ -73447,7 +73660,7 @@ var ts;
|
|
|
73447
73660
|
if (!links.hasReportedStatementInAmbientContext && (ts.isFunctionLike(node.parent) || ts.isAccessor(node.parent))) {
|
|
73448
73661
|
return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
|
|
73449
73662
|
}
|
|
73450
|
-
if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind ===
|
|
73663
|
+
if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind === 304) {
|
|
73451
73664
|
var links_2 = getNodeLinks(node.parent);
|
|
73452
73665
|
if (!links_2.hasReportedStatementInAmbientContext) {
|
|
73453
73666
|
return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
|
|
@@ -73467,7 +73680,7 @@ var ts;
|
|
|
73467
73680
|
else if (ts.isChildOfNodeWithKind(node, 195)) {
|
|
73468
73681
|
diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
|
|
73469
73682
|
}
|
|
73470
|
-
else if (ts.isChildOfNodeWithKind(node,
|
|
73683
|
+
else if (ts.isChildOfNodeWithKind(node, 298)) {
|
|
73471
73684
|
diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
|
|
73472
73685
|
}
|
|
73473
73686
|
if (diagnosticMessage) {
|
|
@@ -73970,7 +74183,10 @@ var ts;
|
|
|
73970
74183
|
return factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
|
|
73971
74184
|
case 199:
|
|
73972
74185
|
ts.Debug.type(node);
|
|
73973
|
-
return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
|
|
74186
|
+
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);
|
|
74187
|
+
case 294:
|
|
74188
|
+
ts.Debug.type(node);
|
|
74189
|
+
return factory.updateImportTypeAssertionContainer(node, nodeVisitor(node.assertClause, visitor, ts.isNode), node.multiLine);
|
|
73974
74190
|
case 196:
|
|
73975
74191
|
ts.Debug.type(node);
|
|
73976
74192
|
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));
|
|
@@ -74269,25 +74485,25 @@ var ts;
|
|
|
74269
74485
|
case 291:
|
|
74270
74486
|
ts.Debug.type(node);
|
|
74271
74487
|
return factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
|
|
74272
|
-
case
|
|
74488
|
+
case 295:
|
|
74273
74489
|
ts.Debug.type(node);
|
|
74274
74490
|
return factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
74275
|
-
case
|
|
74491
|
+
case 296:
|
|
74276
74492
|
ts.Debug.type(node);
|
|
74277
74493
|
return factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
|
|
74278
|
-
case
|
|
74494
|
+
case 297:
|
|
74279
74495
|
ts.Debug.type(node);
|
|
74280
74496
|
return factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
74281
|
-
case
|
|
74497
|
+
case 298:
|
|
74282
74498
|
ts.Debug.type(node);
|
|
74283
74499
|
return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
74284
|
-
case
|
|
74500
|
+
case 304:
|
|
74285
74501
|
ts.Debug.type(node);
|
|
74286
74502
|
return factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context));
|
|
74287
|
-
case
|
|
74503
|
+
case 349:
|
|
74288
74504
|
ts.Debug.type(node);
|
|
74289
74505
|
return factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
74290
|
-
case
|
|
74506
|
+
case 350:
|
|
74291
74507
|
ts.Debug.type(node);
|
|
74292
74508
|
return factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
|
|
74293
74509
|
default:
|
|
@@ -74923,7 +75139,7 @@ var ts;
|
|
|
74923
75139
|
function chainBundle(context, transformSourceFile) {
|
|
74924
75140
|
return transformSourceFileOrBundle;
|
|
74925
75141
|
function transformSourceFileOrBundle(node) {
|
|
74926
|
-
return node.kind ===
|
|
75142
|
+
return node.kind === 304 ? transformSourceFile(node) : transformBundle(node);
|
|
74927
75143
|
}
|
|
74928
75144
|
function transformBundle(node) {
|
|
74929
75145
|
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
@@ -75638,14 +75854,14 @@ var ts;
|
|
|
75638
75854
|
var applicableSubstitutions;
|
|
75639
75855
|
return transformSourceFileOrBundle;
|
|
75640
75856
|
function transformSourceFileOrBundle(node) {
|
|
75641
|
-
if (node.kind ===
|
|
75857
|
+
if (node.kind === 305) {
|
|
75642
75858
|
return transformBundle(node);
|
|
75643
75859
|
}
|
|
75644
75860
|
return transformSourceFile(node);
|
|
75645
75861
|
}
|
|
75646
75862
|
function transformBundle(node) {
|
|
75647
75863
|
return factory.createBundle(node.sourceFiles.map(transformSourceFile), ts.mapDefined(node.prepends, function (prepend) {
|
|
75648
|
-
if (prepend.kind ===
|
|
75864
|
+
if (prepend.kind === 307) {
|
|
75649
75865
|
return ts.createUnparsedSourceFile(prepend, "js");
|
|
75650
75866
|
}
|
|
75651
75867
|
return prepend;
|
|
@@ -75678,7 +75894,7 @@ var ts;
|
|
|
75678
75894
|
}
|
|
75679
75895
|
function onBeforeVisitNode(node) {
|
|
75680
75896
|
switch (node.kind) {
|
|
75681
|
-
case
|
|
75897
|
+
case 304:
|
|
75682
75898
|
case 262:
|
|
75683
75899
|
case 261:
|
|
75684
75900
|
case 234:
|
|
@@ -76426,15 +76642,15 @@ var ts;
|
|
|
76426
76642
|
case 191:
|
|
76427
76643
|
case 199:
|
|
76428
76644
|
break;
|
|
76429
|
-
case 310:
|
|
76430
76645
|
case 311:
|
|
76431
|
-
case
|
|
76646
|
+
case 312:
|
|
76432
76647
|
case 316:
|
|
76433
76648
|
case 317:
|
|
76649
|
+
case 318:
|
|
76434
76650
|
break;
|
|
76435
|
-
case 312:
|
|
76436
76651
|
case 313:
|
|
76437
76652
|
case 314:
|
|
76653
|
+
case 315:
|
|
76438
76654
|
return serializeTypeNode(node.type);
|
|
76439
76655
|
default:
|
|
76440
76656
|
return ts.Debug.failBadSyntaxKind(node);
|
|
@@ -76886,7 +77102,7 @@ var ts;
|
|
|
76886
77102
|
function addVarForEnumOrModuleDeclaration(statements, node) {
|
|
76887
77103
|
var statement = factory.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.createVariableDeclarationList([
|
|
76888
77104
|
factory.createVariableDeclaration(factory.getLocalName(node, false, true))
|
|
76889
|
-
], currentLexicalScope.kind ===
|
|
77105
|
+
], currentLexicalScope.kind === 304 ? 0 : 1));
|
|
76890
77106
|
ts.setOriginalNode(statement, node);
|
|
76891
77107
|
recordEmittedDeclarationInScope(node);
|
|
76892
77108
|
if (isFirstEmittedDeclarationInScope(node)) {
|
|
@@ -77163,7 +77379,7 @@ var ts;
|
|
|
77163
77379
|
if ((enabledSubstitutions & 2) === 0) {
|
|
77164
77380
|
enabledSubstitutions |= 2;
|
|
77165
77381
|
context.enableSubstitution(79);
|
|
77166
|
-
context.enableSubstitution(
|
|
77382
|
+
context.enableSubstitution(296);
|
|
77167
77383
|
context.enableEmitNotification(260);
|
|
77168
77384
|
}
|
|
77169
77385
|
}
|
|
@@ -77249,7 +77465,7 @@ var ts;
|
|
|
77249
77465
|
function trySubstituteNamespaceExportedName(node) {
|
|
77250
77466
|
if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
|
|
77251
77467
|
var container = resolver.getReferencedExportContainer(node, false);
|
|
77252
|
-
if (container && container.kind !==
|
|
77468
|
+
if (container && container.kind !== 304) {
|
|
77253
77469
|
var substitute = (applicableSubstitutions & 2 && container.kind === 260) ||
|
|
77254
77470
|
(applicableSubstitutions & 8 && container.kind === 259);
|
|
77255
77471
|
if (substitute) {
|
|
@@ -77265,6 +77481,9 @@ var ts;
|
|
|
77265
77481
|
function substituteElementAccessExpression(node) {
|
|
77266
77482
|
return substituteConstantValue(node);
|
|
77267
77483
|
}
|
|
77484
|
+
function safeMultiLineComment(value) {
|
|
77485
|
+
return value.replace(/\*\//g, "*_/");
|
|
77486
|
+
}
|
|
77268
77487
|
function substituteConstantValue(node) {
|
|
77269
77488
|
var constantValue = tryGetConstEnumValue(node);
|
|
77270
77489
|
if (constantValue !== undefined) {
|
|
@@ -77272,10 +77491,7 @@ var ts;
|
|
|
77272
77491
|
var substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue);
|
|
77273
77492
|
if (!compilerOptions.removeComments) {
|
|
77274
77493
|
var originalNode = ts.getOriginalNode(node, ts.isAccessExpression);
|
|
77275
|
-
|
|
77276
|
-
? ts.declarationNameToString(originalNode.name)
|
|
77277
|
-
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
77278
|
-
ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
|
|
77494
|
+
ts.addSyntheticTrailingComment(substitute, 3, " " + safeMultiLineComment(ts.getTextOfNode(originalNode)) + " ");
|
|
77279
77495
|
}
|
|
77280
77496
|
return substitute;
|
|
77281
77497
|
}
|
|
@@ -79225,7 +79441,7 @@ var ts;
|
|
|
79225
79441
|
return visitObjectLiteralExpression(node);
|
|
79226
79442
|
case 220:
|
|
79227
79443
|
return visitBinaryExpression(node, expressionResultIsUnused);
|
|
79228
|
-
case
|
|
79444
|
+
case 350:
|
|
79229
79445
|
return visitCommaListExpression(node, expressionResultIsUnused);
|
|
79230
79446
|
case 291:
|
|
79231
79447
|
return visitCatchClause(node);
|
|
@@ -79321,7 +79537,7 @@ var ts;
|
|
|
79321
79537
|
var objects = [];
|
|
79322
79538
|
for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
|
|
79323
79539
|
var e = elements_4[_i];
|
|
79324
|
-
if (e.kind ===
|
|
79540
|
+
if (e.kind === 297) {
|
|
79325
79541
|
if (chunkObject) {
|
|
79326
79542
|
objects.push(factory.createObjectLiteralExpression(chunkObject));
|
|
79327
79543
|
chunkObject = undefined;
|
|
@@ -79330,7 +79546,7 @@ var ts;
|
|
|
79330
79546
|
objects.push(ts.visitNode(target, visitor, ts.isExpression));
|
|
79331
79547
|
}
|
|
79332
79548
|
else {
|
|
79333
|
-
chunkObject = ts.append(chunkObject, e.kind ===
|
|
79549
|
+
chunkObject = ts.append(chunkObject, e.kind === 295
|
|
79334
79550
|
? factory.createPropertyAssignment(e.name, ts.visitNode(e.initializer, visitor, ts.isExpression))
|
|
79335
79551
|
: ts.visitNode(e, visitor, ts.isObjectLiteralElementLike));
|
|
79336
79552
|
}
|
|
@@ -80975,7 +81191,7 @@ var ts;
|
|
|
80975
81191
|
return visitObjectLiteralExpression(node);
|
|
80976
81192
|
case 291:
|
|
80977
81193
|
return visitCatchClause(node);
|
|
80978
|
-
case
|
|
81194
|
+
case 296:
|
|
80979
81195
|
return visitShorthandPropertyAssignment(node);
|
|
80980
81196
|
case 161:
|
|
80981
81197
|
return visitComputedPropertyName(node);
|
|
@@ -80989,7 +81205,7 @@ var ts;
|
|
|
80989
81205
|
return visitParenthesizedExpression(node, expressionResultIsUnused);
|
|
80990
81206
|
case 220:
|
|
80991
81207
|
return visitBinaryExpression(node, expressionResultIsUnused);
|
|
80992
|
-
case
|
|
81208
|
+
case 350:
|
|
80993
81209
|
return visitCommaListExpression(node, expressionResultIsUnused);
|
|
80994
81210
|
case 14:
|
|
80995
81211
|
case 15:
|
|
@@ -82442,10 +82658,10 @@ var ts;
|
|
|
82442
82658
|
case 168:
|
|
82443
82659
|
expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
|
|
82444
82660
|
break;
|
|
82445
|
-
case
|
|
82661
|
+
case 295:
|
|
82446
82662
|
expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
|
|
82447
82663
|
break;
|
|
82448
|
-
case
|
|
82664
|
+
case 296:
|
|
82449
82665
|
expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
|
|
82450
82666
|
break;
|
|
82451
82667
|
default:
|
|
@@ -82876,7 +83092,7 @@ var ts;
|
|
|
82876
83092
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
82877
83093
|
context.onSubstituteNode = onSubstituteNode;
|
|
82878
83094
|
context.enableSubstitution(205);
|
|
82879
|
-
context.enableSubstitution(
|
|
83095
|
+
context.enableSubstitution(295);
|
|
82880
83096
|
return ts.chainBundle(context, transformSourceFile);
|
|
82881
83097
|
function transformSourceFile(node) {
|
|
82882
83098
|
return node;
|
|
@@ -83054,7 +83270,7 @@ var ts;
|
|
|
83054
83270
|
switch (node.kind) {
|
|
83055
83271
|
case 220:
|
|
83056
83272
|
return visitBinaryExpression(node);
|
|
83057
|
-
case
|
|
83273
|
+
case 350:
|
|
83058
83274
|
return visitCommaListExpression(node);
|
|
83059
83275
|
case 221:
|
|
83060
83276
|
return visitConditionalExpression(node);
|
|
@@ -84571,8 +84787,8 @@ var ts;
|
|
|
84571
84787
|
context.enableSubstitution(209);
|
|
84572
84788
|
context.enableSubstitution(79);
|
|
84573
84789
|
context.enableSubstitution(220);
|
|
84574
|
-
context.enableSubstitution(
|
|
84575
|
-
context.enableEmitNotification(
|
|
84790
|
+
context.enableSubstitution(296);
|
|
84791
|
+
context.enableEmitNotification(304);
|
|
84576
84792
|
var moduleInfoMap = [];
|
|
84577
84793
|
var deferredExports = [];
|
|
84578
84794
|
var currentSourceFile;
|
|
@@ -84780,9 +84996,9 @@ var ts;
|
|
|
84780
84996
|
return visitFunctionDeclaration(node);
|
|
84781
84997
|
case 256:
|
|
84782
84998
|
return visitClassDeclaration(node);
|
|
84783
|
-
case 350:
|
|
84784
|
-
return visitMergeDeclarationMarker(node);
|
|
84785
84999
|
case 351:
|
|
85000
|
+
return visitMergeDeclarationMarker(node);
|
|
85001
|
+
case 352:
|
|
84786
85002
|
return visitEndOfDeclarationMarker(node);
|
|
84787
85003
|
default:
|
|
84788
85004
|
return visitor(node);
|
|
@@ -84799,7 +85015,7 @@ var ts;
|
|
|
84799
85015
|
return visitExpressionStatement(node);
|
|
84800
85016
|
case 211:
|
|
84801
85017
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
84802
|
-
case
|
|
85018
|
+
case 349:
|
|
84803
85019
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
84804
85020
|
case 207:
|
|
84805
85021
|
if (ts.isImportCall(node) && currentSourceFile.impliedNodeFormat === undefined) {
|
|
@@ -84828,17 +85044,17 @@ var ts;
|
|
|
84828
85044
|
for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
|
|
84829
85045
|
var elem = _a[_i];
|
|
84830
85046
|
switch (elem.kind) {
|
|
84831
|
-
case
|
|
85047
|
+
case 295:
|
|
84832
85048
|
if (destructuringNeedsFlattening(elem.initializer)) {
|
|
84833
85049
|
return true;
|
|
84834
85050
|
}
|
|
84835
85051
|
break;
|
|
84836
|
-
case
|
|
85052
|
+
case 296:
|
|
84837
85053
|
if (destructuringNeedsFlattening(elem.name)) {
|
|
84838
85054
|
return true;
|
|
84839
85055
|
}
|
|
84840
85056
|
break;
|
|
84841
|
-
case
|
|
85057
|
+
case 297:
|
|
84842
85058
|
if (destructuringNeedsFlattening(elem.expression)) {
|
|
84843
85059
|
return true;
|
|
84844
85060
|
}
|
|
@@ -85398,7 +85614,7 @@ var ts;
|
|
|
85398
85614
|
return node;
|
|
85399
85615
|
}
|
|
85400
85616
|
function onEmitNode(hint, node, emitCallback) {
|
|
85401
|
-
if (node.kind ===
|
|
85617
|
+
if (node.kind === 304) {
|
|
85402
85618
|
currentSourceFile = node;
|
|
85403
85619
|
currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
|
|
85404
85620
|
previousOnEmitNode(hint, node, emitCallback);
|
|
@@ -85478,7 +85694,7 @@ var ts;
|
|
|
85478
85694
|
}
|
|
85479
85695
|
else if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64)) && !ts.isLocalName(node)) {
|
|
85480
85696
|
var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
|
|
85481
|
-
if (exportContainer && exportContainer.kind ===
|
|
85697
|
+
if (exportContainer && exportContainer.kind === 304) {
|
|
85482
85698
|
return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)), node);
|
|
85483
85699
|
}
|
|
85484
85700
|
var importDeclaration = resolver.getReferencedImportDeclaration(node);
|
|
@@ -85543,10 +85759,10 @@ var ts;
|
|
|
85543
85759
|
context.onSubstituteNode = onSubstituteNode;
|
|
85544
85760
|
context.onEmitNode = onEmitNode;
|
|
85545
85761
|
context.enableSubstitution(79);
|
|
85546
|
-
context.enableSubstitution(
|
|
85762
|
+
context.enableSubstitution(296);
|
|
85547
85763
|
context.enableSubstitution(220);
|
|
85548
85764
|
context.enableSubstitution(230);
|
|
85549
|
-
context.enableEmitNotification(
|
|
85765
|
+
context.enableEmitNotification(304);
|
|
85550
85766
|
var moduleInfoMap = [];
|
|
85551
85767
|
var deferredExports = [];
|
|
85552
85768
|
var exportFunctionsMap = [];
|
|
@@ -85883,7 +86099,7 @@ var ts;
|
|
|
85883
86099
|
}
|
|
85884
86100
|
function shouldHoistVariableDeclarationList(node) {
|
|
85885
86101
|
return (ts.getEmitFlags(node) & 2097152) === 0
|
|
85886
|
-
&& (enclosingBlockScopedContainer.kind ===
|
|
86102
|
+
&& (enclosingBlockScopedContainer.kind === 304
|
|
85887
86103
|
|| (ts.getOriginalNode(node).flags & 3) === 0);
|
|
85888
86104
|
}
|
|
85889
86105
|
function transformInitializedVariable(node, isExportedDeclaration) {
|
|
@@ -86081,9 +86297,9 @@ var ts;
|
|
|
86081
86297
|
return visitCatchClause(node);
|
|
86082
86298
|
case 234:
|
|
86083
86299
|
return visitBlock(node);
|
|
86084
|
-
case 350:
|
|
86085
|
-
return visitMergeDeclarationMarker(node);
|
|
86086
86300
|
case 351:
|
|
86301
|
+
return visitMergeDeclarationMarker(node);
|
|
86302
|
+
case 352:
|
|
86087
86303
|
return visitEndOfDeclarationMarker(node);
|
|
86088
86304
|
default:
|
|
86089
86305
|
return visitor(node);
|
|
@@ -86186,7 +86402,7 @@ var ts;
|
|
|
86186
86402
|
return visitExpressionStatement(node);
|
|
86187
86403
|
case 211:
|
|
86188
86404
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
86189
|
-
case
|
|
86405
|
+
case 349:
|
|
86190
86406
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
86191
86407
|
case 220:
|
|
86192
86408
|
if (ts.isDestructuringAssignment(node)) {
|
|
@@ -86252,7 +86468,7 @@ var ts;
|
|
|
86252
86468
|
}
|
|
86253
86469
|
else if (ts.isIdentifier(node)) {
|
|
86254
86470
|
var container = resolver.getReferencedExportContainer(node);
|
|
86255
|
-
return container !== undefined && container.kind ===
|
|
86471
|
+
return container !== undefined && container.kind === 304;
|
|
86256
86472
|
}
|
|
86257
86473
|
else {
|
|
86258
86474
|
return false;
|
|
@@ -86303,7 +86519,7 @@ var ts;
|
|
|
86303
86519
|
return node;
|
|
86304
86520
|
}
|
|
86305
86521
|
function onEmitNode(hint, node, emitCallback) {
|
|
86306
|
-
if (node.kind ===
|
|
86522
|
+
if (node.kind === 304) {
|
|
86307
86523
|
var id = ts.getOriginalNodeId(node);
|
|
86308
86524
|
currentSourceFile = node;
|
|
86309
86525
|
moduleInfo = moduleInfoMap[id];
|
|
@@ -86339,7 +86555,7 @@ var ts;
|
|
|
86339
86555
|
}
|
|
86340
86556
|
function substituteUnspecified(node) {
|
|
86341
86557
|
switch (node.kind) {
|
|
86342
|
-
case
|
|
86558
|
+
case 296:
|
|
86343
86559
|
return substituteShorthandPropertyAssignment(node);
|
|
86344
86560
|
}
|
|
86345
86561
|
return node;
|
|
@@ -86424,7 +86640,7 @@ var ts;
|
|
|
86424
86640
|
|| resolver.getReferencedValueDeclaration(name);
|
|
86425
86641
|
if (valueDeclaration) {
|
|
86426
86642
|
var exportContainer = resolver.getReferencedExportContainer(name, false);
|
|
86427
|
-
if (exportContainer && exportContainer.kind ===
|
|
86643
|
+
if (exportContainer && exportContainer.kind === 304) {
|
|
86428
86644
|
exportedNames = ts.append(exportedNames, factory.getDeclarationName(valueDeclaration));
|
|
86429
86645
|
}
|
|
86430
86646
|
exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
|
|
@@ -86456,7 +86672,7 @@ var ts;
|
|
|
86456
86672
|
var previousOnSubstituteNode = context.onSubstituteNode;
|
|
86457
86673
|
context.onEmitNode = onEmitNode;
|
|
86458
86674
|
context.onSubstituteNode = onSubstituteNode;
|
|
86459
|
-
context.enableEmitNotification(
|
|
86675
|
+
context.enableEmitNotification(304);
|
|
86460
86676
|
context.enableSubstitution(79);
|
|
86461
86677
|
var helperNameSubstitutions;
|
|
86462
86678
|
var currentSourceFile;
|
|
@@ -86607,8 +86823,8 @@ var ts;
|
|
|
86607
86823
|
var cjsOnEmitNode = context.onEmitNode;
|
|
86608
86824
|
context.onSubstituteNode = onSubstituteNode;
|
|
86609
86825
|
context.onEmitNode = onEmitNode;
|
|
86610
|
-
context.enableSubstitution(
|
|
86611
|
-
context.enableEmitNotification(
|
|
86826
|
+
context.enableSubstitution(304);
|
|
86827
|
+
context.enableEmitNotification(304);
|
|
86612
86828
|
var currentSourceFile;
|
|
86613
86829
|
return transformSourceFileOrBundle;
|
|
86614
86830
|
function onSubstituteNode(hint, node) {
|
|
@@ -86652,7 +86868,7 @@ var ts;
|
|
|
86652
86868
|
return result;
|
|
86653
86869
|
}
|
|
86654
86870
|
function transformSourceFileOrBundle(node) {
|
|
86655
|
-
return node.kind ===
|
|
86871
|
+
return node.kind === 304 ? transformSourceFile(node) : transformBundle(node);
|
|
86656
86872
|
}
|
|
86657
86873
|
function transformBundle(node) {
|
|
86658
86874
|
return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
|
|
@@ -87266,10 +87482,10 @@ var ts;
|
|
|
87266
87482
|
return result;
|
|
87267
87483
|
}
|
|
87268
87484
|
function transformRoot(node) {
|
|
87269
|
-
if (node.kind ===
|
|
87485
|
+
if (node.kind === 304 && node.isDeclarationFile) {
|
|
87270
87486
|
return node;
|
|
87271
87487
|
}
|
|
87272
|
-
if (node.kind ===
|
|
87488
|
+
if (node.kind === 305) {
|
|
87273
87489
|
isBundledEmit = true;
|
|
87274
87490
|
refs = new ts.Map();
|
|
87275
87491
|
libs = new ts.Map();
|
|
@@ -87299,7 +87515,7 @@ var ts;
|
|
|
87299
87515
|
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
87300
87516
|
return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), true, [], [], false, []);
|
|
87301
87517
|
}), ts.mapDefined(node.prepends, function (prepend) {
|
|
87302
|
-
if (prepend.kind ===
|
|
87518
|
+
if (prepend.kind === 307) {
|
|
87303
87519
|
var sourceFile = ts.createUnparsedSourceFile(prepend, "dts", stripInternal);
|
|
87304
87520
|
hasNoDefaultLib_1 = hasNoDefaultLib_1 || !!sourceFile.hasNoDefaultLib;
|
|
87305
87521
|
collectReferences(sourceFile, refs);
|
|
@@ -87647,22 +87863,22 @@ var ts;
|
|
|
87647
87863
|
}
|
|
87648
87864
|
function transformImportDeclaration(decl) {
|
|
87649
87865
|
if (!decl.importClause) {
|
|
87650
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87866
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87651
87867
|
}
|
|
87652
87868
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
87653
87869
|
if (!decl.importClause.namedBindings) {
|
|
87654
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87870
|
+
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);
|
|
87655
87871
|
}
|
|
87656
87872
|
if (decl.importClause.namedBindings.kind === 267) {
|
|
87657
87873
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
87658
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined) : undefined;
|
|
87874
|
+
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;
|
|
87659
87875
|
}
|
|
87660
87876
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
87661
87877
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
87662
|
-
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);
|
|
87878
|
+
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);
|
|
87663
87879
|
}
|
|
87664
87880
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
87665
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
|
|
87881
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), ts.getResolutionModeOverrideForClause(decl.assertClause) ? decl.assertClause : undefined);
|
|
87666
87882
|
}
|
|
87667
87883
|
}
|
|
87668
87884
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
@@ -87832,7 +88048,7 @@ var ts;
|
|
|
87832
88048
|
case 199: {
|
|
87833
88049
|
if (!ts.isLiteralImportTypeNode(input))
|
|
87834
88050
|
return cleanup(input);
|
|
87835
|
-
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));
|
|
88051
|
+
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));
|
|
87836
88052
|
}
|
|
87837
88053
|
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
|
|
87838
88054
|
}
|
|
@@ -87875,7 +88091,7 @@ var ts;
|
|
|
87875
88091
|
resultHasExternalModuleIndicator = true;
|
|
87876
88092
|
}
|
|
87877
88093
|
resultHasScopeMarker = true;
|
|
87878
|
-
return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), undefined);
|
|
88094
|
+
return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), ts.getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined);
|
|
87879
88095
|
}
|
|
87880
88096
|
case 270: {
|
|
87881
88097
|
if (ts.isSourceFile(input.parent)) {
|
|
@@ -88196,7 +88412,7 @@ var ts;
|
|
|
88196
88412
|
function ensureModifierFlags(node) {
|
|
88197
88413
|
var mask = 27647 ^ (4 | 256 | 16384);
|
|
88198
88414
|
var additions = (needsDeclare && !isAlwaysType(node)) ? 2 : 0;
|
|
88199
|
-
var parentIsFile = node.parent.kind ===
|
|
88415
|
+
var parentIsFile = node.parent.kind === 304;
|
|
88200
88416
|
if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
|
|
88201
88417
|
mask ^= 2;
|
|
88202
88418
|
additions = 0;
|
|
@@ -88407,7 +88623,7 @@ var ts;
|
|
|
88407
88623
|
}
|
|
88408
88624
|
ts.noEmitNotification = noEmitNotification;
|
|
88409
88625
|
function transformNodes(resolver, host, factory, options, nodes, transformers, allowDtsFiles) {
|
|
88410
|
-
var enabledSyntaxKindFeatures = new Array(
|
|
88626
|
+
var enabledSyntaxKindFeatures = new Array(354);
|
|
88411
88627
|
var lexicalEnvironmentVariableDeclarations;
|
|
88412
88628
|
var lexicalEnvironmentFunctionDeclarations;
|
|
88413
88629
|
var lexicalEnvironmentStatements;
|
|
@@ -88483,7 +88699,7 @@ var ts;
|
|
|
88483
88699
|
var transformed = [];
|
|
88484
88700
|
for (var _a = 0, nodes_3 = nodes; _a < nodes_3.length; _a++) {
|
|
88485
88701
|
var node = nodes_3[_a];
|
|
88486
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "transformNodes", node.kind ===
|
|
88702
|
+
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 });
|
|
88487
88703
|
transformed.push((allowDtsFiles ? transformation : transformRoot)(node));
|
|
88488
88704
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
88489
88705
|
}
|
|
@@ -88811,7 +89027,7 @@ var ts;
|
|
|
88811
89027
|
ts.getOutputPathsForBundle = getOutputPathsForBundle;
|
|
88812
89028
|
function getOutputPathsFor(sourceFile, host, forceDtsPaths) {
|
|
88813
89029
|
var options = host.getCompilerOptions();
|
|
88814
|
-
if (sourceFile.kind ===
|
|
89030
|
+
if (sourceFile.kind === 305) {
|
|
88815
89031
|
return getOutputPathsForBundle(options, forceDtsPaths);
|
|
88816
89032
|
}
|
|
88817
89033
|
else {
|
|
@@ -89132,7 +89348,7 @@ var ts;
|
|
|
89132
89348
|
mapRoot: compilerOptions.mapRoot,
|
|
89133
89349
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
89134
89350
|
});
|
|
89135
|
-
if (forceDtsEmit && declarationTransform.transformed[0].kind ===
|
|
89351
|
+
if (forceDtsEmit && declarationTransform.transformed[0].kind === 304) {
|
|
89136
89352
|
var sourceFile = declarationTransform.transformed[0];
|
|
89137
89353
|
exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
|
|
89138
89354
|
}
|
|
@@ -89155,8 +89371,8 @@ var ts;
|
|
|
89155
89371
|
ts.forEachChild(node, collectLinkedAliases);
|
|
89156
89372
|
}
|
|
89157
89373
|
function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle, printer, mapOptions) {
|
|
89158
|
-
var bundle = sourceFileOrBundle.kind ===
|
|
89159
|
-
var sourceFile = sourceFileOrBundle.kind ===
|
|
89374
|
+
var bundle = sourceFileOrBundle.kind === 305 ? sourceFileOrBundle : undefined;
|
|
89375
|
+
var sourceFile = sourceFileOrBundle.kind === 304 ? sourceFileOrBundle : undefined;
|
|
89160
89376
|
var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
|
|
89161
89377
|
var sourceMapGenerator;
|
|
89162
89378
|
if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) {
|
|
@@ -89194,7 +89410,7 @@ var ts;
|
|
|
89194
89410
|
}
|
|
89195
89411
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
89196
89412
|
return (mapOptions.sourceMap || mapOptions.inlineSourceMap)
|
|
89197
|
-
&& (sourceFileOrBundle.kind !==
|
|
89413
|
+
&& (sourceFileOrBundle.kind !== 304 || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json"));
|
|
89198
89414
|
}
|
|
89199
89415
|
function getSourceRoot(mapOptions) {
|
|
89200
89416
|
var sourceRoot = ts.normalizeSlashes(mapOptions.sourceRoot || "");
|
|
@@ -89470,9 +89686,9 @@ var ts;
|
|
|
89470
89686
|
break;
|
|
89471
89687
|
}
|
|
89472
89688
|
switch (node.kind) {
|
|
89473
|
-
case
|
|
89474
|
-
case
|
|
89475
|
-
case
|
|
89689
|
+
case 304: return printFile(node);
|
|
89690
|
+
case 305: return printBundle(node);
|
|
89691
|
+
case 306: return printUnparsedSource(node);
|
|
89476
89692
|
}
|
|
89477
89693
|
writeNode(hint, node, sourceFile, beginPrint());
|
|
89478
89694
|
return endPrint();
|
|
@@ -89997,91 +90213,91 @@ var ts;
|
|
|
89997
90213
|
return emitHeritageClause(node);
|
|
89998
90214
|
case 291:
|
|
89999
90215
|
return emitCatchClause(node);
|
|
90000
|
-
case 294:
|
|
90001
|
-
return emitPropertyAssignment(node);
|
|
90002
90216
|
case 295:
|
|
90003
|
-
return
|
|
90217
|
+
return emitPropertyAssignment(node);
|
|
90004
90218
|
case 296:
|
|
90005
|
-
return
|
|
90219
|
+
return emitShorthandPropertyAssignment(node);
|
|
90006
90220
|
case 297:
|
|
90007
|
-
return
|
|
90221
|
+
return emitSpreadAssignment(node);
|
|
90008
90222
|
case 298:
|
|
90009
|
-
return
|
|
90010
|
-
case 305:
|
|
90223
|
+
return emitEnumMember(node);
|
|
90011
90224
|
case 299:
|
|
90012
|
-
return
|
|
90225
|
+
return writeUnparsedNode(node);
|
|
90226
|
+
case 306:
|
|
90013
90227
|
case 300:
|
|
90228
|
+
return emitUnparsedSourceOrPrepend(node);
|
|
90014
90229
|
case 301:
|
|
90015
|
-
return emitUnparsedTextLike(node);
|
|
90016
90230
|
case 302:
|
|
90017
|
-
return
|
|
90231
|
+
return emitUnparsedTextLike(node);
|
|
90018
90232
|
case 303:
|
|
90019
|
-
return
|
|
90233
|
+
return emitUnparsedSyntheticReference(node);
|
|
90020
90234
|
case 304:
|
|
90235
|
+
return emitSourceFile(node);
|
|
90236
|
+
case 305:
|
|
90021
90237
|
return ts.Debug.fail("Bundles should be printed using printBundle");
|
|
90022
|
-
case 306:
|
|
90023
|
-
return ts.Debug.fail("InputFiles should not be printed");
|
|
90024
90238
|
case 307:
|
|
90025
|
-
return
|
|
90239
|
+
return ts.Debug.fail("InputFiles should not be printed");
|
|
90026
90240
|
case 308:
|
|
90241
|
+
return emitJSDocTypeExpression(node);
|
|
90242
|
+
case 309:
|
|
90027
90243
|
return emitJSDocNameReference(node);
|
|
90028
|
-
case 310:
|
|
90029
|
-
return writePunctuation("*");
|
|
90030
90244
|
case 311:
|
|
90031
|
-
return writePunctuation("
|
|
90245
|
+
return writePunctuation("*");
|
|
90032
90246
|
case 312:
|
|
90033
|
-
return
|
|
90247
|
+
return writePunctuation("?");
|
|
90034
90248
|
case 313:
|
|
90035
|
-
return
|
|
90249
|
+
return emitJSDocNullableType(node);
|
|
90036
90250
|
case 314:
|
|
90037
|
-
return
|
|
90251
|
+
return emitJSDocNonNullableType(node);
|
|
90038
90252
|
case 315:
|
|
90253
|
+
return emitJSDocOptionalType(node);
|
|
90254
|
+
case 316:
|
|
90039
90255
|
return emitJSDocFunctionType(node);
|
|
90040
90256
|
case 185:
|
|
90041
|
-
case 316:
|
|
90042
|
-
return emitRestOrJSDocVariadicType(node);
|
|
90043
90257
|
case 317:
|
|
90044
|
-
return;
|
|
90258
|
+
return emitRestOrJSDocVariadicType(node);
|
|
90045
90259
|
case 318:
|
|
90260
|
+
return;
|
|
90261
|
+
case 319:
|
|
90046
90262
|
return emitJSDoc(node);
|
|
90047
|
-
case 320:
|
|
90048
|
-
return emitJSDocTypeLiteral(node);
|
|
90049
90263
|
case 321:
|
|
90264
|
+
return emitJSDocTypeLiteral(node);
|
|
90265
|
+
case 322:
|
|
90050
90266
|
return emitJSDocSignature(node);
|
|
90051
|
-
case 325:
|
|
90052
|
-
case 330:
|
|
90053
|
-
case 335:
|
|
90054
|
-
return emitJSDocSimpleTag(node);
|
|
90055
90267
|
case 326:
|
|
90268
|
+
case 331:
|
|
90269
|
+
case 336:
|
|
90270
|
+
return emitJSDocSimpleTag(node);
|
|
90056
90271
|
case 327:
|
|
90057
|
-
return emitJSDocHeritageTag(node);
|
|
90058
90272
|
case 328:
|
|
90273
|
+
return emitJSDocHeritageTag(node);
|
|
90059
90274
|
case 329:
|
|
90275
|
+
case 330:
|
|
90060
90276
|
return;
|
|
90061
|
-
case 331:
|
|
90062
90277
|
case 332:
|
|
90063
90278
|
case 333:
|
|
90064
90279
|
case 334:
|
|
90280
|
+
case 335:
|
|
90065
90281
|
return;
|
|
90066
|
-
case 336:
|
|
90067
|
-
return emitJSDocCallbackTag(node);
|
|
90068
|
-
case 338:
|
|
90069
|
-
case 345:
|
|
90070
|
-
return emitJSDocPropertyLikeTag(node);
|
|
90071
90282
|
case 337:
|
|
90283
|
+
return emitJSDocCallbackTag(node);
|
|
90072
90284
|
case 339:
|
|
90285
|
+
case 346:
|
|
90286
|
+
return emitJSDocPropertyLikeTag(node);
|
|
90287
|
+
case 338:
|
|
90073
90288
|
case 340:
|
|
90074
90289
|
case 341:
|
|
90075
|
-
return emitJSDocSimpleTypedTag(node);
|
|
90076
90290
|
case 342:
|
|
90077
|
-
return
|
|
90291
|
+
return emitJSDocSimpleTypedTag(node);
|
|
90078
90292
|
case 343:
|
|
90079
|
-
return
|
|
90293
|
+
return emitJSDocTemplateTag(node);
|
|
90080
90294
|
case 344:
|
|
90295
|
+
return emitJSDocTypedefTag(node);
|
|
90296
|
+
case 345:
|
|
90081
90297
|
return emitJSDocSeeTag(node);
|
|
90082
|
-
case
|
|
90298
|
+
case 348:
|
|
90299
|
+
case 352:
|
|
90083
90300
|
case 351:
|
|
90084
|
-
case 350:
|
|
90085
90301
|
return;
|
|
90086
90302
|
}
|
|
90087
90303
|
if (ts.isExpression(node)) {
|
|
@@ -90174,18 +90390,18 @@ var ts;
|
|
|
90174
90390
|
return emitJsxSelfClosingElement(node);
|
|
90175
90391
|
case 281:
|
|
90176
90392
|
return emitJsxFragment(node);
|
|
90177
|
-
case 346:
|
|
90178
|
-
return ts.Debug.fail("SyntaxList should not be printed");
|
|
90179
90393
|
case 347:
|
|
90180
|
-
return;
|
|
90394
|
+
return ts.Debug.fail("SyntaxList should not be printed");
|
|
90181
90395
|
case 348:
|
|
90182
|
-
return
|
|
90396
|
+
return;
|
|
90183
90397
|
case 349:
|
|
90184
|
-
return
|
|
90398
|
+
return emitPartiallyEmittedExpression(node);
|
|
90185
90399
|
case 350:
|
|
90400
|
+
return emitCommaList(node);
|
|
90186
90401
|
case 351:
|
|
90187
|
-
return;
|
|
90188
90402
|
case 352:
|
|
90403
|
+
return;
|
|
90404
|
+
case 353:
|
|
90189
90405
|
return ts.Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
90190
90406
|
}
|
|
90191
90407
|
}
|
|
@@ -90233,7 +90449,7 @@ var ts;
|
|
|
90233
90449
|
}
|
|
90234
90450
|
function emitHelpers(node) {
|
|
90235
90451
|
var helpersEmitted = false;
|
|
90236
|
-
var bundle = node.kind ===
|
|
90452
|
+
var bundle = node.kind === 305 ? node : undefined;
|
|
90237
90453
|
if (bundle && moduleKind === ts.ModuleKind.None) {
|
|
90238
90454
|
return;
|
|
90239
90455
|
}
|
|
@@ -90307,7 +90523,7 @@ var ts;
|
|
|
90307
90523
|
var pos = getTextPosWithWriteLine();
|
|
90308
90524
|
writeUnparsedNode(unparsed);
|
|
90309
90525
|
if (bundleFileInfo) {
|
|
90310
|
-
updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind ===
|
|
90526
|
+
updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 301 ?
|
|
90311
90527
|
"text" :
|
|
90312
90528
|
"internal");
|
|
90313
90529
|
}
|
|
@@ -90390,7 +90606,7 @@ var ts;
|
|
|
90390
90606
|
emit(node.dotDotDotToken);
|
|
90391
90607
|
emitNodeWithWriter(node.name, writeParameter);
|
|
90392
90608
|
emit(node.questionToken);
|
|
90393
|
-
if (node.parent && node.parent.kind ===
|
|
90609
|
+
if (node.parent && node.parent.kind === 316 && !node.name) {
|
|
90394
90610
|
emit(node.type);
|
|
90395
90611
|
}
|
|
90396
90612
|
else {
|
|
@@ -90697,6 +90913,19 @@ var ts;
|
|
|
90697
90913
|
writeKeyword("import");
|
|
90698
90914
|
writePunctuation("(");
|
|
90699
90915
|
emit(node.argument);
|
|
90916
|
+
if (node.assertions) {
|
|
90917
|
+
writePunctuation(",");
|
|
90918
|
+
writeSpace();
|
|
90919
|
+
writePunctuation("{");
|
|
90920
|
+
writeSpace();
|
|
90921
|
+
writeKeyword("assert");
|
|
90922
|
+
writePunctuation(":");
|
|
90923
|
+
writeSpace();
|
|
90924
|
+
var elements = node.assertions.assertClause.elements;
|
|
90925
|
+
emitList(node.assertions.assertClause, elements, 526226);
|
|
90926
|
+
writeSpace();
|
|
90927
|
+
writePunctuation("}");
|
|
90928
|
+
}
|
|
90700
90929
|
writePunctuation(")");
|
|
90701
90930
|
if (node.qualifier) {
|
|
90702
90931
|
writePunctuation(".");
|
|
@@ -91834,7 +92063,7 @@ var ts;
|
|
|
91834
92063
|
}
|
|
91835
92064
|
}
|
|
91836
92065
|
if (node.tags) {
|
|
91837
|
-
if (node.tags.length === 1 && node.tags[0].kind ===
|
|
92066
|
+
if (node.tags.length === 1 && node.tags[0].kind === 342 && !node.comment) {
|
|
91838
92067
|
writeSpace();
|
|
91839
92068
|
emit(node.tags[0]);
|
|
91840
92069
|
}
|
|
@@ -91879,7 +92108,7 @@ var ts;
|
|
|
91879
92108
|
function emitJSDocTypedefTag(tag) {
|
|
91880
92109
|
emitJSDocTagName(tag.tagName);
|
|
91881
92110
|
if (tag.typeExpression) {
|
|
91882
|
-
if (tag.typeExpression.kind ===
|
|
92111
|
+
if (tag.typeExpression.kind === 308) {
|
|
91883
92112
|
emitJSDocTypeExpression(tag.typeExpression);
|
|
91884
92113
|
}
|
|
91885
92114
|
else {
|
|
@@ -91898,7 +92127,7 @@ var ts;
|
|
|
91898
92127
|
emit(tag.fullName);
|
|
91899
92128
|
}
|
|
91900
92129
|
emitJSDocComment(tag.comment);
|
|
91901
|
-
if (tag.typeExpression && tag.typeExpression.kind ===
|
|
92130
|
+
if (tag.typeExpression && tag.typeExpression.kind === 321) {
|
|
91902
92131
|
emitJSDocTypeLiteral(tag.typeExpression);
|
|
91903
92132
|
}
|
|
91904
92133
|
}
|
|
@@ -92866,8 +93095,8 @@ var ts;
|
|
|
92866
93095
|
if (!node)
|
|
92867
93096
|
return;
|
|
92868
93097
|
switch (node.kind) {
|
|
92869
|
-
case 294:
|
|
92870
93098
|
case 295:
|
|
93099
|
+
case 296:
|
|
92871
93100
|
case 166:
|
|
92872
93101
|
case 168:
|
|
92873
93102
|
case 171:
|
|
@@ -93089,7 +93318,7 @@ var ts;
|
|
|
93089
93318
|
var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 11;
|
|
93090
93319
|
if ((pos > 0 || end > 0) && pos !== end) {
|
|
93091
93320
|
if (!skipLeadingComments) {
|
|
93092
|
-
emitLeadingComments(pos, node.kind !==
|
|
93321
|
+
emitLeadingComments(pos, node.kind !== 348);
|
|
93093
93322
|
}
|
|
93094
93323
|
if (!skipLeadingComments || (pos >= 0 && (emitFlags & 512) !== 0)) {
|
|
93095
93324
|
containerPos = pos;
|
|
@@ -93112,7 +93341,7 @@ var ts;
|
|
|
93112
93341
|
containerPos = savedContainerPos;
|
|
93113
93342
|
containerEnd = savedContainerEnd;
|
|
93114
93343
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
93115
|
-
if (!skipTrailingComments && node.kind !==
|
|
93344
|
+
if (!skipTrailingComments && node.kind !== 348) {
|
|
93116
93345
|
emitTrailingComments(end);
|
|
93117
93346
|
}
|
|
93118
93347
|
}
|
|
@@ -93363,7 +93592,7 @@ var ts;
|
|
|
93363
93592
|
}
|
|
93364
93593
|
else {
|
|
93365
93594
|
var source = sourceMapRange.source || sourceMapSource;
|
|
93366
|
-
if (node.kind !==
|
|
93595
|
+
if (node.kind !== 348
|
|
93367
93596
|
&& (emitFlags & 16) === 0
|
|
93368
93597
|
&& sourceMapRange.pos >= 0) {
|
|
93369
93598
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
@@ -93380,7 +93609,7 @@ var ts;
|
|
|
93380
93609
|
if (emitFlags & 64) {
|
|
93381
93610
|
sourceMapsDisabled = false;
|
|
93382
93611
|
}
|
|
93383
|
-
if (node.kind !==
|
|
93612
|
+
if (node.kind !== 348
|
|
93384
93613
|
&& (emitFlags & 32) === 0
|
|
93385
93614
|
&& sourceMapRange.end >= 0) {
|
|
93386
93615
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
@@ -94380,17 +94609,66 @@ var ts;
|
|
|
94380
94609
|
return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
|
|
94381
94610
|
}
|
|
94382
94611
|
ts.getModeForResolutionAtIndex = getModeForResolutionAtIndex;
|
|
94383
|
-
function
|
|
94612
|
+
function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
94384
94613
|
var _a;
|
|
94614
|
+
if (ts.isExportDeclaration(decl)) {
|
|
94615
|
+
return decl.isTypeOnly;
|
|
94616
|
+
}
|
|
94617
|
+
if ((_a = decl.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly) {
|
|
94618
|
+
return true;
|
|
94619
|
+
}
|
|
94620
|
+
return false;
|
|
94621
|
+
}
|
|
94622
|
+
ts.isExclusivelyTypeOnlyImportOrExport = isExclusivelyTypeOnlyImportOrExport;
|
|
94623
|
+
function getModeForUsageLocation(file, usage) {
|
|
94624
|
+
var _a, _b;
|
|
94385
94625
|
if (file.impliedNodeFormat === undefined)
|
|
94386
94626
|
return undefined;
|
|
94627
|
+
if ((ts.isImportDeclaration(usage.parent) || ts.isExportDeclaration(usage.parent))) {
|
|
94628
|
+
var isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
|
|
94629
|
+
if (isTypeOnly) {
|
|
94630
|
+
var override = getResolutionModeOverrideForClause(usage.parent.assertClause);
|
|
94631
|
+
if (override) {
|
|
94632
|
+
return override;
|
|
94633
|
+
}
|
|
94634
|
+
}
|
|
94635
|
+
}
|
|
94636
|
+
if (usage.parent.parent && ts.isImportTypeNode(usage.parent.parent)) {
|
|
94637
|
+
var override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) === null || _a === void 0 ? void 0 : _a.assertClause);
|
|
94638
|
+
if (override) {
|
|
94639
|
+
return override;
|
|
94640
|
+
}
|
|
94641
|
+
}
|
|
94387
94642
|
if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
|
|
94388
94643
|
return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
94389
94644
|
}
|
|
94390
|
-
var exprParentParent = (
|
|
94645
|
+
var exprParentParent = (_b = ts.walkUpParenthesizedExpressions(usage.parent)) === null || _b === void 0 ? void 0 : _b.parent;
|
|
94391
94646
|
return exprParentParent && ts.isImportEqualsDeclaration(exprParentParent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
|
|
94392
94647
|
}
|
|
94393
94648
|
ts.getModeForUsageLocation = getModeForUsageLocation;
|
|
94649
|
+
function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) {
|
|
94650
|
+
if (!clause)
|
|
94651
|
+
return undefined;
|
|
94652
|
+
if (ts.length(clause.elements) !== 1) {
|
|
94653
|
+
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);
|
|
94654
|
+
return undefined;
|
|
94655
|
+
}
|
|
94656
|
+
var elem = clause.elements[0];
|
|
94657
|
+
if (!ts.isStringLiteralLike(elem.name))
|
|
94658
|
+
return undefined;
|
|
94659
|
+
if (elem.name.text !== "resolution-mode") {
|
|
94660
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.name, ts.Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions);
|
|
94661
|
+
return undefined;
|
|
94662
|
+
}
|
|
94663
|
+
if (!ts.isStringLiteralLike(elem.value))
|
|
94664
|
+
return undefined;
|
|
94665
|
+
if (elem.value.text !== "import" && elem.value.text !== "require") {
|
|
94666
|
+
grammarErrorOnNode === null || grammarErrorOnNode === void 0 ? void 0 : grammarErrorOnNode(elem.value, ts.Diagnostics.resolution_mode_should_be_either_require_or_import);
|
|
94667
|
+
return undefined;
|
|
94668
|
+
}
|
|
94669
|
+
return elem.value.text === "import" ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
|
|
94670
|
+
}
|
|
94671
|
+
ts.getResolutionModeOverrideForClause = getResolutionModeOverrideForClause;
|
|
94394
94672
|
function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
|
|
94395
94673
|
if (names.length === 0) {
|
|
94396
94674
|
return [];
|
|
@@ -99229,70 +99507,81 @@ var ts;
|
|
|
99229
99507
|
useCaseSensitiveFileNames: (_a = host.useCaseSensitiveFileNames) === null || _a === void 0 ? void 0 : _a.call(host),
|
|
99230
99508
|
};
|
|
99231
99509
|
}
|
|
99232
|
-
function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier) {
|
|
99233
|
-
|
|
99510
|
+
function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier, options) {
|
|
99511
|
+
if (options === void 0) { options = {}; }
|
|
99512
|
+
var res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {}, options);
|
|
99234
99513
|
if (res === oldImportSpecifier)
|
|
99235
99514
|
return undefined;
|
|
99236
99515
|
return res;
|
|
99237
99516
|
}
|
|
99238
99517
|
moduleSpecifiers_1.updateModuleSpecifier = updateModuleSpecifier;
|
|
99239
|
-
function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host) {
|
|
99240
|
-
|
|
99518
|
+
function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, options) {
|
|
99519
|
+
if (options === void 0) { options = {}; }
|
|
99520
|
+
return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferences(host, {}, compilerOptions, importingSourceFile), {}, options);
|
|
99241
99521
|
}
|
|
99242
99522
|
moduleSpecifiers_1.getModuleSpecifier = getModuleSpecifier;
|
|
99243
|
-
function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences) {
|
|
99523
|
+
function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options) {
|
|
99524
|
+
if (options === void 0) { options = {}; }
|
|
99244
99525
|
var info = getInfo(importingSourceFile.path, host);
|
|
99245
|
-
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences);
|
|
99246
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true); });
|
|
99526
|
+
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
99527
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
99247
99528
|
}
|
|
99248
99529
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
99249
|
-
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences) {
|
|
99530
|
+
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
99531
|
+
if (options === void 0) { options = {}; }
|
|
99250
99532
|
var info = getInfo(importingSourceFileName, host);
|
|
99251
|
-
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences);
|
|
99252
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions); }) ||
|
|
99533
|
+
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
99534
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
99253
99535
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
99254
99536
|
}
|
|
99255
|
-
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences) {
|
|
99256
|
-
|
|
99537
|
+
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
99538
|
+
if (options === void 0) { options = {}; }
|
|
99539
|
+
return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options)[0];
|
|
99257
99540
|
}
|
|
99258
99541
|
moduleSpecifiers_1.tryGetModuleSpecifiersFromCache = tryGetModuleSpecifiersFromCache;
|
|
99259
|
-
function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences) {
|
|
99542
|
+
function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
99260
99543
|
var _a;
|
|
99544
|
+
if (options === void 0) { options = {}; }
|
|
99261
99545
|
var moduleSourceFile = ts.getSourceFileOfModule(moduleSymbol);
|
|
99262
99546
|
if (!moduleSourceFile) {
|
|
99263
99547
|
return ts.emptyArray;
|
|
99264
99548
|
}
|
|
99265
99549
|
var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
99266
|
-
var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences);
|
|
99550
|
+
var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options);
|
|
99267
99551
|
return [cached === null || cached === void 0 ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached === null || cached === void 0 ? void 0 : cached.modulePaths, cache];
|
|
99268
99552
|
}
|
|
99269
|
-
function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99270
|
-
|
|
99553
|
+
function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99554
|
+
if (options === void 0) { options = {}; }
|
|
99555
|
+
return getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options).moduleSpecifiers;
|
|
99271
99556
|
}
|
|
99272
99557
|
moduleSpecifiers_1.getModuleSpecifiers = getModuleSpecifiers;
|
|
99273
|
-
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99558
|
+
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99559
|
+
if (options === void 0) { options = {}; }
|
|
99274
99560
|
var computedWithoutCache = false;
|
|
99275
99561
|
var ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
|
|
99276
99562
|
if (ambient)
|
|
99277
99563
|
return { moduleSpecifiers: [ambient], computedWithoutCache: computedWithoutCache };
|
|
99278
|
-
var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
|
|
99564
|
+
var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
|
|
99279
99565
|
if (specifiers)
|
|
99280
99566
|
return { moduleSpecifiers: specifiers, computedWithoutCache: computedWithoutCache };
|
|
99281
99567
|
if (!moduleSourceFile)
|
|
99282
99568
|
return { moduleSpecifiers: ts.emptyArray, computedWithoutCache: computedWithoutCache };
|
|
99283
99569
|
computedWithoutCache = true;
|
|
99284
99570
|
modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
|
|
99285
|
-
var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences);
|
|
99286
|
-
cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, modulePaths, result);
|
|
99571
|
+
var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
|
|
99572
|
+
cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
|
|
99287
99573
|
return { moduleSpecifiers: result, computedWithoutCache: computedWithoutCache };
|
|
99288
99574
|
}
|
|
99289
99575
|
moduleSpecifiers_1.getModuleSpecifiersWithCacheInfo = getModuleSpecifiersWithCacheInfo;
|
|
99290
|
-
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences) {
|
|
99576
|
+
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options) {
|
|
99577
|
+
if (options === void 0) { options = {}; }
|
|
99291
99578
|
var info = getInfo(importingSourceFile.path, host);
|
|
99292
99579
|
var preferences = getPreferences(host, userPreferences, compilerOptions, importingSourceFile);
|
|
99293
99580
|
var existingSpecifier = ts.forEach(modulePaths, function (modulePath) { return ts.forEach(host.getFileIncludeReasons().get(ts.toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), function (reason) {
|
|
99294
99581
|
if (reason.kind !== ts.FileIncludeKind.Import || reason.file !== importingSourceFile.path)
|
|
99295
99582
|
return undefined;
|
|
99583
|
+
if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== ts.getModeForResolutionAtIndex(importingSourceFile, reason.index))
|
|
99584
|
+
return undefined;
|
|
99296
99585
|
var specifier = ts.getModuleNameStringLiteralAt(importingSourceFile, reason.index).text;
|
|
99297
99586
|
return preferences.relativePreference !== 1 || !ts.pathIsRelative(specifier) ?
|
|
99298
99587
|
specifier :
|
|
@@ -99308,7 +99597,7 @@ var ts;
|
|
|
99308
99597
|
var relativeSpecifiers;
|
|
99309
99598
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
99310
99599
|
var modulePath = modulePaths_1[_i];
|
|
99311
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions);
|
|
99600
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
99312
99601
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
99313
99602
|
if (specifier && modulePath.isRedirect) {
|
|
99314
99603
|
return nodeModulesSpecifiers;
|
|
@@ -99447,18 +99736,19 @@ var ts;
|
|
|
99447
99736
|
: undefined);
|
|
99448
99737
|
}
|
|
99449
99738
|
moduleSpecifiers_1.forEachFileNameOfModule = forEachFileNameOfModule;
|
|
99450
|
-
function getAllModulePaths(importingFilePath, importedFileName, host, preferences,
|
|
99739
|
+
function getAllModulePaths(importingFilePath, importedFileName, host, preferences, options) {
|
|
99451
99740
|
var _a;
|
|
99452
|
-
if (
|
|
99741
|
+
if (options === void 0) { options = {}; }
|
|
99742
|
+
var importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host));
|
|
99453
99743
|
var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
|
|
99454
99744
|
if (cache) {
|
|
99455
|
-
var cached = cache.get(importingFilePath, importedFilePath, preferences);
|
|
99745
|
+
var cached = cache.get(importingFilePath, importedFilePath, preferences, options);
|
|
99456
99746
|
if (cached === null || cached === void 0 ? void 0 : cached.modulePaths)
|
|
99457
99747
|
return cached.modulePaths;
|
|
99458
99748
|
}
|
|
99459
99749
|
var modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host);
|
|
99460
99750
|
if (cache) {
|
|
99461
|
-
cache.setModulePaths(importingFilePath, importedFilePath, preferences, modulePaths);
|
|
99751
|
+
cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths);
|
|
99462
99752
|
}
|
|
99463
99753
|
return modulePaths;
|
|
99464
99754
|
}
|
|
@@ -99638,7 +99928,7 @@ var ts;
|
|
|
99638
99928
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
99639
99929
|
: ts.removeFileExtension(relativePath);
|
|
99640
99930
|
}
|
|
99641
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly) {
|
|
99931
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
99642
99932
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
99643
99933
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
99644
99934
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -99697,7 +99987,7 @@ var ts;
|
|
|
99697
99987
|
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
99698
99988
|
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
99699
99989
|
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
99700
|
-
var conditions = ["node", importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99990
|
+
var conditions = ["node", overrideMode || importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99701
99991
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
99702
99992
|
? tryGetModuleNameFromExports(options, path, packageRootPath, ts.getPackageNameFromTypesPackageName(packageJsonContent.name), packageJsonContent.exports, conditions)
|
|
99703
99993
|
: undefined;
|