typescript 5.0.0-dev.20230116 → 5.0.0-dev.20230118
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/tsc.js +668 -501
- package/lib/tsserver.js +757 -535
- package/lib/tsserverlibrary.d.ts +95 -32
- package/lib/tsserverlibrary.js +746 -535
- package/lib/typescript.d.ts +85 -28
- package/lib/typescript.js +734 -535
- package/lib/typingsInstaller.js +275 -231
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230118`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3900,14 +3900,15 @@ ${lanes.join("\n")}
|
|
|
3900
3900
|
SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag";
|
|
3901
3901
|
SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
|
|
3902
3902
|
SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
|
|
3903
|
-
SyntaxKind5[SyntaxKind5["
|
|
3904
|
-
SyntaxKind5[SyntaxKind5["
|
|
3905
|
-
SyntaxKind5[SyntaxKind5["
|
|
3906
|
-
SyntaxKind5[SyntaxKind5["
|
|
3907
|
-
SyntaxKind5[SyntaxKind5["
|
|
3908
|
-
SyntaxKind5[SyntaxKind5["
|
|
3909
|
-
SyntaxKind5[SyntaxKind5["
|
|
3910
|
-
SyntaxKind5[SyntaxKind5["
|
|
3903
|
+
SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
|
|
3904
|
+
SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList";
|
|
3905
|
+
SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement";
|
|
3906
|
+
SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
|
|
3907
|
+
SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression";
|
|
3908
|
+
SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
|
|
3909
|
+
SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
|
|
3910
|
+
SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
|
|
3911
|
+
SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count";
|
|
3911
3912
|
SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
|
|
3912
3913
|
SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
|
|
3913
3914
|
SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -3936,9 +3937,9 @@ ${lanes.join("\n")}
|
|
|
3936
3937
|
SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
|
|
3937
3938
|
SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
|
|
3938
3939
|
SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
|
|
3939
|
-
SyntaxKind5[SyntaxKind5["LastJSDocNode"] =
|
|
3940
|
+
SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
|
|
3940
3941
|
SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
|
|
3941
|
-
SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] =
|
|
3942
|
+
SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
|
|
3942
3943
|
SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
|
|
3943
3944
|
SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
|
|
3944
3945
|
return SyntaxKind5;
|
|
@@ -8117,7 +8118,7 @@ ${lanes.join("\n")}
|
|
|
8117
8118
|
Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
|
|
8118
8119
|
Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
|
|
8119
8120
|
Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."),
|
|
8120
|
-
|
|
8121
|
+
Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
|
|
8121
8122
|
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
|
8122
8123
|
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
|
8123
8124
|
Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Aster_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'bundler'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
|
|
@@ -9039,7 +9040,8 @@ ${lanes.join("\n")}
|
|
|
9039
9040
|
_0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
9040
9041
|
_0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
9041
9042
|
_0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
9042
|
-
The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here.")
|
|
9043
|
+
The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
9044
|
+
Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string.")
|
|
9043
9045
|
};
|
|
9044
9046
|
}
|
|
9045
9047
|
});
|
|
@@ -9492,10 +9494,7 @@ ${lanes.join("\n")}
|
|
|
9492
9494
|
initial
|
|
9493
9495
|
);
|
|
9494
9496
|
}
|
|
9495
|
-
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
9496
|
-
if (!comments) {
|
|
9497
|
-
comments = [];
|
|
9498
|
-
}
|
|
9497
|
+
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
|
|
9499
9498
|
comments.push({ kind, pos, end, hasTrailingNewLine });
|
|
9500
9499
|
return comments;
|
|
9501
9500
|
}
|
|
@@ -11443,7 +11442,10 @@ ${lanes.join("\n")}
|
|
|
11443
11442
|
node = node.original;
|
|
11444
11443
|
}
|
|
11445
11444
|
}
|
|
11446
|
-
|
|
11445
|
+
if (!node || !nodeTest) {
|
|
11446
|
+
return node;
|
|
11447
|
+
}
|
|
11448
|
+
return nodeTest(node) ? node : void 0;
|
|
11447
11449
|
}
|
|
11448
11450
|
function findAncestor(node, callback) {
|
|
11449
11451
|
while (node) {
|
|
@@ -11761,6 +11763,9 @@ ${lanes.join("\n")}
|
|
|
11761
11763
|
function getJSDocTemplateTag(node) {
|
|
11762
11764
|
return getFirstJSDocTag(node, isJSDocTemplateTag);
|
|
11763
11765
|
}
|
|
11766
|
+
function getJSDocSatisfiesTag(node) {
|
|
11767
|
+
return getFirstJSDocTag(node, isJSDocSatisfiesTag);
|
|
11768
|
+
}
|
|
11764
11769
|
function getJSDocTypeTag(node) {
|
|
11765
11770
|
const tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
11766
11771
|
if (tag && tag.typeExpression && tag.typeExpression.type) {
|
|
@@ -12184,6 +12189,9 @@ ${lanes.join("\n")}
|
|
|
12184
12189
|
}
|
|
12185
12190
|
return false;
|
|
12186
12191
|
}
|
|
12192
|
+
function isBindingOrAssignmentElement(node) {
|
|
12193
|
+
return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
|
|
12194
|
+
}
|
|
12187
12195
|
function isBindingOrAssignmentPattern(node) {
|
|
12188
12196
|
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
12189
12197
|
}
|
|
@@ -12213,6 +12221,24 @@ ${lanes.join("\n")}
|
|
|
12213
12221
|
}
|
|
12214
12222
|
return false;
|
|
12215
12223
|
}
|
|
12224
|
+
function isArrayBindingOrAssignmentElement(node) {
|
|
12225
|
+
switch (node.kind) {
|
|
12226
|
+
case 205 /* BindingElement */:
|
|
12227
|
+
case 229 /* OmittedExpression */:
|
|
12228
|
+
case 227 /* SpreadElement */:
|
|
12229
|
+
case 206 /* ArrayLiteralExpression */:
|
|
12230
|
+
case 207 /* ObjectLiteralExpression */:
|
|
12231
|
+
case 79 /* Identifier */:
|
|
12232
|
+
case 208 /* PropertyAccessExpression */:
|
|
12233
|
+
case 209 /* ElementAccessExpression */:
|
|
12234
|
+
return true;
|
|
12235
|
+
}
|
|
12236
|
+
return isAssignmentExpression(
|
|
12237
|
+
node,
|
|
12238
|
+
/*excludeCompoundAssignment*/
|
|
12239
|
+
true
|
|
12240
|
+
);
|
|
12241
|
+
}
|
|
12216
12242
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
12217
12243
|
const kind = node.kind;
|
|
12218
12244
|
return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
|
|
@@ -12308,6 +12334,18 @@ ${lanes.join("\n")}
|
|
|
12308
12334
|
return false;
|
|
12309
12335
|
}
|
|
12310
12336
|
}
|
|
12337
|
+
function isLiteralTypeLiteral(node) {
|
|
12338
|
+
node = skipPartiallyEmittedExpressions(node);
|
|
12339
|
+
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
12340
|
+
case 104 /* NullKeyword */:
|
|
12341
|
+
case 110 /* TrueKeyword */:
|
|
12342
|
+
case 95 /* FalseKeyword */:
|
|
12343
|
+
case 221 /* PrefixUnaryExpression */:
|
|
12344
|
+
return true;
|
|
12345
|
+
default:
|
|
12346
|
+
return isLiteralExpression(node);
|
|
12347
|
+
}
|
|
12348
|
+
}
|
|
12311
12349
|
function isExpression(node) {
|
|
12312
12350
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
12313
12351
|
}
|
|
@@ -12320,8 +12358,8 @@ ${lanes.join("\n")}
|
|
|
12320
12358
|
case 227 /* SpreadElement */:
|
|
12321
12359
|
case 231 /* AsExpression */:
|
|
12322
12360
|
case 229 /* OmittedExpression */:
|
|
12323
|
-
case
|
|
12324
|
-
case
|
|
12361
|
+
case 357 /* CommaListExpression */:
|
|
12362
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
12325
12363
|
case 235 /* SatisfiesExpression */:
|
|
12326
12364
|
return true;
|
|
12327
12365
|
default:
|
|
@@ -12506,7 +12544,7 @@ ${lanes.join("\n")}
|
|
|
12506
12544
|
return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */;
|
|
12507
12545
|
}
|
|
12508
12546
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
12509
|
-
return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind ===
|
|
12547
|
+
return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 355 /* NotEmittedStatement */ || kind === 359 /* EndOfDeclarationMarker */ || kind === 358 /* MergeDeclarationMarker */;
|
|
12510
12548
|
}
|
|
12511
12549
|
function isDeclaration(node) {
|
|
12512
12550
|
if (node.kind === 165 /* TypeParameter */) {
|
|
@@ -12567,13 +12605,13 @@ ${lanes.join("\n")}
|
|
|
12567
12605
|
return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
|
|
12568
12606
|
}
|
|
12569
12607
|
function isJSDocNode(node) {
|
|
12570
|
-
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <=
|
|
12608
|
+
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
|
|
12571
12609
|
}
|
|
12572
12610
|
function isJSDocCommentContainingNode(node) {
|
|
12573
12611
|
return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
|
|
12574
12612
|
}
|
|
12575
12613
|
function isJSDocTag(node) {
|
|
12576
|
-
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <=
|
|
12614
|
+
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
|
|
12577
12615
|
}
|
|
12578
12616
|
function isSetAccessor(node) {
|
|
12579
12617
|
return node.kind === 175 /* SetAccessor */;
|
|
@@ -12993,7 +13031,7 @@ ${lanes.join("\n")}
|
|
|
12993
13031
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
12994
13032
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
12995
13033
|
}
|
|
12996
|
-
if (node.kind ===
|
|
13034
|
+
if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
|
|
12997
13035
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
12998
13036
|
}
|
|
12999
13037
|
return skipTrivia(
|
|
@@ -13294,6 +13332,7 @@ ${lanes.join("\n")}
|
|
|
13294
13332
|
return false;
|
|
13295
13333
|
}
|
|
13296
13334
|
function isDeclarationWithTypeParameters(node) {
|
|
13335
|
+
Debug.type(node);
|
|
13297
13336
|
switch (node.kind) {
|
|
13298
13337
|
case 341 /* JSDocCallbackTag */:
|
|
13299
13338
|
case 349 /* JSDocTypedefTag */:
|
|
@@ -13305,6 +13344,7 @@ ${lanes.join("\n")}
|
|
|
13305
13344
|
}
|
|
13306
13345
|
}
|
|
13307
13346
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
13347
|
+
Debug.type(node);
|
|
13308
13348
|
switch (node.kind) {
|
|
13309
13349
|
case 176 /* CallSignature */:
|
|
13310
13350
|
case 177 /* ConstructSignature */:
|
|
@@ -14859,7 +14899,7 @@ ${lanes.join("\n")}
|
|
|
14859
14899
|
return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
|
|
14860
14900
|
}
|
|
14861
14901
|
function ownsJSDocTag(hostNode, tag) {
|
|
14862
|
-
return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
14902
|
+
return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
14863
14903
|
}
|
|
14864
14904
|
function getNextJSDocCommentLocation(node) {
|
|
14865
14905
|
const parent2 = node.parent;
|
|
@@ -15395,7 +15435,7 @@ ${lanes.join("\n")}
|
|
|
15395
15435
|
}
|
|
15396
15436
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
15397
15437
|
switch (nodeKind) {
|
|
15398
|
-
case
|
|
15438
|
+
case 357 /* CommaListExpression */:
|
|
15399
15439
|
return 0 /* Comma */;
|
|
15400
15440
|
case 227 /* SpreadElement */:
|
|
15401
15441
|
return 1 /* Spread */;
|
|
@@ -16365,14 +16405,23 @@ ${lanes.join("\n")}
|
|
|
16365
16405
|
}
|
|
16366
16406
|
return 0 /* None */;
|
|
16367
16407
|
}
|
|
16408
|
+
function isBinaryLogicalOperator(token) {
|
|
16409
|
+
return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
|
|
16410
|
+
}
|
|
16368
16411
|
function isLogicalOperator(token) {
|
|
16369
|
-
return token
|
|
16412
|
+
return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
|
|
16370
16413
|
}
|
|
16371
16414
|
function isLogicalOrCoalescingAssignmentOperator(token) {
|
|
16372
16415
|
return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
|
|
16373
16416
|
}
|
|
16374
16417
|
function isLogicalOrCoalescingAssignmentExpression(expr) {
|
|
16375
|
-
return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
16418
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
16419
|
+
}
|
|
16420
|
+
function isLogicalOrCoalescingBinaryOperator(token) {
|
|
16421
|
+
return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
|
|
16422
|
+
}
|
|
16423
|
+
function isLogicalOrCoalescingBinaryExpression(expr) {
|
|
16424
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
|
|
16376
16425
|
}
|
|
16377
16426
|
function isAssignmentOperator(token) {
|
|
16378
16427
|
return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
|
|
@@ -16746,7 +16795,7 @@ ${lanes.join("\n")}
|
|
|
16746
16795
|
return filter(node.declarations, isInitializedVariable);
|
|
16747
16796
|
}
|
|
16748
16797
|
function isInitializedVariable(node) {
|
|
16749
|
-
return node.initializer !== void 0;
|
|
16798
|
+
return isVariableDeclaration(node) && node.initializer !== void 0;
|
|
16750
16799
|
}
|
|
16751
16800
|
function isWatchSet(options) {
|
|
16752
16801
|
return options.watch && hasProperty(options, "watch");
|
|
@@ -16927,7 +16976,7 @@ ${lanes.join("\n")}
|
|
|
16927
16976
|
return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node);
|
|
16928
16977
|
}
|
|
16929
16978
|
function isTypeNodeKind(kind) {
|
|
16930
|
-
return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */;
|
|
16979
|
+
return kind >= 179 /* FirstTypeNode */ && kind <= 202 /* LastTypeNode */ || kind === 131 /* AnyKeyword */ || kind === 157 /* UnknownKeyword */ || kind === 148 /* NumberKeyword */ || kind === 160 /* BigIntKeyword */ || kind === 149 /* ObjectKeyword */ || kind === 134 /* BooleanKeyword */ || kind === 152 /* StringKeyword */ || kind === 153 /* SymbolKeyword */ || kind === 114 /* VoidKeyword */ || kind === 155 /* UndefinedKeyword */ || kind === 144 /* NeverKeyword */ || kind === 139 /* IntrinsicKeyword */ || kind === 230 /* ExpressionWithTypeArguments */ || kind === 315 /* JSDocAllType */ || kind === 316 /* JSDocUnknownType */ || kind === 317 /* JSDocNullableType */ || kind === 318 /* JSDocNonNullableType */ || kind === 319 /* JSDocOptionalType */ || kind === 320 /* JSDocFunctionType */ || kind === 321 /* JSDocVariadicType */;
|
|
16931
16980
|
}
|
|
16932
16981
|
function isAccessExpression(node) {
|
|
16933
16982
|
return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
|
|
@@ -17009,7 +17058,7 @@ ${lanes.join("\n")}
|
|
|
17009
17058
|
case 209 /* ElementAccessExpression */:
|
|
17010
17059
|
case 208 /* PropertyAccessExpression */:
|
|
17011
17060
|
case 232 /* NonNullExpression */:
|
|
17012
|
-
case
|
|
17061
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
17013
17062
|
case 235 /* SatisfiesExpression */:
|
|
17014
17063
|
node = node.expression;
|
|
17015
17064
|
continue;
|
|
@@ -18250,7 +18299,7 @@ ${lanes.join("\n")}
|
|
|
18250
18299
|
return parent2.types;
|
|
18251
18300
|
case 186 /* TupleType */:
|
|
18252
18301
|
case 206 /* ArrayLiteralExpression */:
|
|
18253
|
-
case
|
|
18302
|
+
case 357 /* CommaListExpression */:
|
|
18254
18303
|
case 272 /* NamedImports */:
|
|
18255
18304
|
case 276 /* NamedExports */:
|
|
18256
18305
|
return parent2.elements;
|
|
@@ -18435,6 +18484,16 @@ ${lanes.join("\n")}
|
|
|
18435
18484
|
const kind = node.kind;
|
|
18436
18485
|
return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
|
|
18437
18486
|
}
|
|
18487
|
+
function isJSDocSatisfiesExpression(node) {
|
|
18488
|
+
return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
|
|
18489
|
+
}
|
|
18490
|
+
function getJSDocSatisfiesExpressionType(node) {
|
|
18491
|
+
return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
|
|
18492
|
+
}
|
|
18493
|
+
function tryGetJSDocSatisfiesTypeNode(node) {
|
|
18494
|
+
const tag = getJSDocSatisfiesTag(node);
|
|
18495
|
+
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
18496
|
+
}
|
|
18438
18497
|
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
|
|
18439
18498
|
var init_utilities = __esm({
|
|
18440
18499
|
"src/compiler/utilities.ts"() {
|
|
@@ -19653,6 +19712,12 @@ ${lanes.join("\n")}
|
|
|
19653
19712
|
get updateJSDocThrowsTag() {
|
|
19654
19713
|
return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
|
|
19655
19714
|
},
|
|
19715
|
+
get createJSDocSatisfiesTag() {
|
|
19716
|
+
return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
|
|
19717
|
+
},
|
|
19718
|
+
get updateJSDocSatisfiesTag() {
|
|
19719
|
+
return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
|
|
19720
|
+
},
|
|
19656
19721
|
createJSDocEnumTag: createJSDocEnumTag2,
|
|
19657
19722
|
updateJSDocEnumTag,
|
|
19658
19723
|
createJSDocUnknownTag,
|
|
@@ -22812,18 +22877,18 @@ ${lanes.join("\n")}
|
|
|
22812
22877
|
return node;
|
|
22813
22878
|
}
|
|
22814
22879
|
function createSyntaxList3(children) {
|
|
22815
|
-
const node = createBaseNode(
|
|
22880
|
+
const node = createBaseNode(354 /* SyntaxList */);
|
|
22816
22881
|
node._children = children;
|
|
22817
22882
|
return node;
|
|
22818
22883
|
}
|
|
22819
22884
|
function createNotEmittedStatement2(original) {
|
|
22820
|
-
const node = createBaseNode(
|
|
22885
|
+
const node = createBaseNode(355 /* NotEmittedStatement */);
|
|
22821
22886
|
node.original = original;
|
|
22822
22887
|
setTextRange(node, original);
|
|
22823
22888
|
return node;
|
|
22824
22889
|
}
|
|
22825
22890
|
function createPartiallyEmittedExpression2(expression, original) {
|
|
22826
|
-
const node = createBaseNode(
|
|
22891
|
+
const node = createBaseNode(356 /* PartiallyEmittedExpression */);
|
|
22827
22892
|
node.expression = expression;
|
|
22828
22893
|
node.original = original;
|
|
22829
22894
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -22845,7 +22910,7 @@ ${lanes.join("\n")}
|
|
|
22845
22910
|
return node;
|
|
22846
22911
|
}
|
|
22847
22912
|
function createCommaListExpression(elements) {
|
|
22848
|
-
const node = createBaseNode(
|
|
22913
|
+
const node = createBaseNode(357 /* CommaListExpression */);
|
|
22849
22914
|
node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements));
|
|
22850
22915
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
22851
22916
|
return node;
|
|
@@ -22854,19 +22919,19 @@ ${lanes.join("\n")}
|
|
|
22854
22919
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
22855
22920
|
}
|
|
22856
22921
|
function createEndOfDeclarationMarker(original) {
|
|
22857
|
-
const node = createBaseNode(
|
|
22922
|
+
const node = createBaseNode(359 /* EndOfDeclarationMarker */);
|
|
22858
22923
|
node.emitNode = {};
|
|
22859
22924
|
node.original = original;
|
|
22860
22925
|
return node;
|
|
22861
22926
|
}
|
|
22862
22927
|
function createMergeDeclarationMarker(original) {
|
|
22863
|
-
const node = createBaseNode(
|
|
22928
|
+
const node = createBaseNode(358 /* MergeDeclarationMarker */);
|
|
22864
22929
|
node.emitNode = {};
|
|
22865
22930
|
node.original = original;
|
|
22866
22931
|
return node;
|
|
22867
22932
|
}
|
|
22868
22933
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
22869
|
-
const node = createBaseNode(
|
|
22934
|
+
const node = createBaseNode(360 /* SyntheticReferenceExpression */);
|
|
22870
22935
|
node.expression = expression;
|
|
22871
22936
|
node.thisArg = thisArg;
|
|
22872
22937
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -23106,7 +23171,7 @@ ${lanes.join("\n")}
|
|
|
23106
23171
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
23107
23172
|
case 232 /* NonNullExpression */:
|
|
23108
23173
|
return updateNonNullExpression2(outerExpression, expression);
|
|
23109
|
-
case
|
|
23174
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
23110
23175
|
return updatePartiallyEmittedExpression2(outerExpression, expression);
|
|
23111
23176
|
}
|
|
23112
23177
|
}
|
|
@@ -23640,7 +23705,7 @@ ${lanes.join("\n")}
|
|
|
23640
23705
|
case 213 /* TypeAssertionExpression */:
|
|
23641
23706
|
case 235 /* SatisfiesExpression */:
|
|
23642
23707
|
case 231 /* AsExpression */:
|
|
23643
|
-
case
|
|
23708
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
23644
23709
|
case 214 /* ParenthesizedExpression */:
|
|
23645
23710
|
case 106 /* SuperKeyword */:
|
|
23646
23711
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -25308,10 +25373,10 @@ ${lanes.join("\n")}
|
|
|
25308
25373
|
return node.kind === 234 /* SyntheticExpression */;
|
|
25309
25374
|
}
|
|
25310
25375
|
function isPartiallyEmittedExpression(node) {
|
|
25311
|
-
return node.kind ===
|
|
25376
|
+
return node.kind === 356 /* PartiallyEmittedExpression */;
|
|
25312
25377
|
}
|
|
25313
25378
|
function isCommaListExpression(node) {
|
|
25314
|
-
return node.kind ===
|
|
25379
|
+
return node.kind === 357 /* CommaListExpression */;
|
|
25315
25380
|
}
|
|
25316
25381
|
function isTemplateSpan(node) {
|
|
25317
25382
|
return node.kind === 236 /* TemplateSpan */;
|
|
@@ -25455,16 +25520,16 @@ ${lanes.join("\n")}
|
|
|
25455
25520
|
return node.kind === 279 /* MissingDeclaration */;
|
|
25456
25521
|
}
|
|
25457
25522
|
function isNotEmittedStatement(node) {
|
|
25458
|
-
return node.kind ===
|
|
25523
|
+
return node.kind === 355 /* NotEmittedStatement */;
|
|
25459
25524
|
}
|
|
25460
25525
|
function isSyntheticReference(node) {
|
|
25461
|
-
return node.kind ===
|
|
25526
|
+
return node.kind === 360 /* SyntheticReferenceExpression */;
|
|
25462
25527
|
}
|
|
25463
25528
|
function isMergeDeclarationMarker(node) {
|
|
25464
|
-
return node.kind ===
|
|
25529
|
+
return node.kind === 358 /* MergeDeclarationMarker */;
|
|
25465
25530
|
}
|
|
25466
25531
|
function isEndOfDeclarationMarker(node) {
|
|
25467
|
-
return node.kind ===
|
|
25532
|
+
return node.kind === 359 /* EndOfDeclarationMarker */;
|
|
25468
25533
|
}
|
|
25469
25534
|
function isExternalModuleReference(node) {
|
|
25470
25535
|
return node.kind === 280 /* ExternalModuleReference */;
|
|
@@ -25655,11 +25720,14 @@ ${lanes.join("\n")}
|
|
|
25655
25720
|
function isJSDocImplementsTag(node) {
|
|
25656
25721
|
return node.kind === 332 /* JSDocImplementsTag */;
|
|
25657
25722
|
}
|
|
25723
|
+
function isJSDocSatisfiesTag(node) {
|
|
25724
|
+
return node.kind === 353 /* JSDocSatisfiesTag */;
|
|
25725
|
+
}
|
|
25658
25726
|
function isJSDocThrowsTag(node) {
|
|
25659
25727
|
return node.kind === 352 /* JSDocThrowsTag */;
|
|
25660
25728
|
}
|
|
25661
25729
|
function isSyntaxList(n) {
|
|
25662
|
-
return n.kind ===
|
|
25730
|
+
return n.kind === 354 /* SyntaxList */;
|
|
25663
25731
|
}
|
|
25664
25732
|
var init_nodeTests = __esm({
|
|
25665
25733
|
"src/compiler/factory/nodeTests.ts"() {
|
|
@@ -26033,7 +26101,7 @@ ${lanes.join("\n")}
|
|
|
26033
26101
|
return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
|
|
26034
26102
|
}
|
|
26035
26103
|
function isCommaSequence(node) {
|
|
26036
|
-
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind ===
|
|
26104
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
|
|
26037
26105
|
}
|
|
26038
26106
|
function isJSDocTypeAssertion(node) {
|
|
26039
26107
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -26056,7 +26124,7 @@ ${lanes.join("\n")}
|
|
|
26056
26124
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
26057
26125
|
case 232 /* NonNullExpression */:
|
|
26058
26126
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
26059
|
-
case
|
|
26127
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
26060
26128
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
26061
26129
|
}
|
|
26062
26130
|
return false;
|
|
@@ -27465,7 +27533,7 @@ ${lanes.join("\n")}
|
|
|
27465
27533
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
27466
27534
|
return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
|
|
27467
27535
|
},
|
|
27468
|
-
[
|
|
27536
|
+
[357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
27469
27537
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
27470
27538
|
},
|
|
27471
27539
|
[281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -27537,6 +27605,7 @@ ${lanes.join("\n")}
|
|
|
27537
27605
|
[347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27538
27606
|
[346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27539
27607
|
[343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27608
|
+
[353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27540
27609
|
[352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27541
27610
|
[342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
|
|
27542
27611
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
@@ -27556,7 +27625,7 @@ ${lanes.join("\n")}
|
|
|
27556
27625
|
[339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
27557
27626
|
[334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
27558
27627
|
[340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
27559
|
-
[
|
|
27628
|
+
[356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
27560
27629
|
};
|
|
27561
27630
|
((Parser2) => {
|
|
27562
27631
|
const scanner2 = createScanner(
|
|
@@ -33449,6 +33518,9 @@ ${lanes.join("\n")}
|
|
|
33449
33518
|
case "overload":
|
|
33450
33519
|
tag = parseOverloadTag(start2, tagName, margin, indentText);
|
|
33451
33520
|
break;
|
|
33521
|
+
case "satisfies":
|
|
33522
|
+
tag = parseSatisfiesTag(start2, tagName, margin, indentText);
|
|
33523
|
+
break;
|
|
33452
33524
|
case "see":
|
|
33453
33525
|
tag = parseSeeTag(start2, tagName, margin, indentText);
|
|
33454
33526
|
break;
|
|
@@ -33757,6 +33829,14 @@ ${lanes.join("\n")}
|
|
|
33757
33829
|
const className = parseExpressionWithTypeArgumentsForAugments();
|
|
33758
33830
|
return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
|
|
33759
33831
|
}
|
|
33832
|
+
function parseSatisfiesTag(start2, tagName, margin, indentText) {
|
|
33833
|
+
const typeExpression = parseJSDocTypeExpression(
|
|
33834
|
+
/*mayOmitBraces*/
|
|
33835
|
+
false
|
|
33836
|
+
);
|
|
33837
|
+
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
33838
|
+
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
|
|
33839
|
+
}
|
|
33760
33840
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
33761
33841
|
const usedBrace = parseOptional(18 /* OpenBraceToken */);
|
|
33762
33842
|
const pos = getNodePos();
|
|
@@ -35662,7 +35742,7 @@ ${lanes.join("\n")}
|
|
|
35662
35742
|
const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
|
|
35663
35743
|
json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
|
|
35664
35744
|
let extendedConfigPath;
|
|
35665
|
-
if (json.extends) {
|
|
35745
|
+
if (json.extends || json.extends === "") {
|
|
35666
35746
|
if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
|
|
35667
35747
|
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
|
|
35668
35748
|
} else {
|
|
@@ -35789,7 +35869,11 @@ ${lanes.join("\n")}
|
|
|
35789
35869
|
if (resolved.resolvedModule) {
|
|
35790
35870
|
return resolved.resolvedModule.resolvedFileName;
|
|
35791
35871
|
}
|
|
35792
|
-
|
|
35872
|
+
if (extendedConfig === "") {
|
|
35873
|
+
errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
|
|
35874
|
+
} else {
|
|
35875
|
+
errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
|
|
35876
|
+
}
|
|
35793
35877
|
return void 0;
|
|
35794
35878
|
}
|
|
35795
35879
|
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
|
|
@@ -36070,6 +36154,7 @@ ${lanes.join("\n")}
|
|
|
36070
36154
|
}
|
|
36071
36155
|
}
|
|
36072
36156
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
36157
|
+
Debug.assert(typeof spec === "string");
|
|
36073
36158
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
36074
36159
|
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
36075
36160
|
} else if (invalidDotDotAfterRecursiveWildcard(spec)) {
|
|
@@ -37158,7 +37243,7 @@ ${lanes.join("\n")}
|
|
|
37158
37243
|
{
|
|
37159
37244
|
name: "allowImportingTsExtensions",
|
|
37160
37245
|
type: "boolean",
|
|
37161
|
-
|
|
37246
|
+
affectsSemanticDiagnostics: true,
|
|
37162
37247
|
category: Diagnostics.Modules,
|
|
37163
37248
|
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
37164
37249
|
defaultValueDescription: false
|
|
@@ -40145,7 +40230,7 @@ ${lanes.join("\n")}
|
|
|
40145
40230
|
}
|
|
40146
40231
|
}
|
|
40147
40232
|
function shouldAllowImportingTsExtension(compilerOptions, fromFileName) {
|
|
40148
|
-
return
|
|
40233
|
+
return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName);
|
|
40149
40234
|
}
|
|
40150
40235
|
function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {
|
|
40151
40236
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
@@ -41036,13 +41121,12 @@ ${lanes.join("\n")}
|
|
|
41036
41121
|
} else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
|
|
41037
41122
|
node = node.operand;
|
|
41038
41123
|
} else {
|
|
41039
|
-
return
|
|
41124
|
+
return isLogicalOrCoalescingBinaryExpression(node);
|
|
41040
41125
|
}
|
|
41041
41126
|
}
|
|
41042
41127
|
}
|
|
41043
41128
|
function isLogicalAssignmentExpression(node) {
|
|
41044
|
-
|
|
41045
|
-
return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
|
|
41129
|
+
return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
|
|
41046
41130
|
}
|
|
41047
41131
|
function isTopLevelLogicalExpression(node) {
|
|
41048
41132
|
while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
|
|
@@ -41425,7 +41509,7 @@ ${lanes.join("\n")}
|
|
|
41425
41509
|
};
|
|
41426
41510
|
}
|
|
41427
41511
|
const operator = node.operatorToken.kind;
|
|
41428
|
-
if (operator
|
|
41512
|
+
if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
|
|
41429
41513
|
if (isTopLevelLogicalExpression(node)) {
|
|
41430
41514
|
const postExpressionLabel = createBranchLabel();
|
|
41431
41515
|
bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
|
|
@@ -44848,7 +44932,7 @@ ${lanes.join("\n")}
|
|
|
44848
44932
|
if (jsxFragmentPragma) {
|
|
44849
44933
|
const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
44850
44934
|
file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
44851
|
-
visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
44935
|
+
visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
|
|
44852
44936
|
if (file.localJsxFragmentFactory) {
|
|
44853
44937
|
return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
44854
44938
|
}
|
|
@@ -44891,7 +44975,7 @@ ${lanes.join("\n")}
|
|
|
44891
44975
|
if (jsxPragma) {
|
|
44892
44976
|
const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
44893
44977
|
file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
44894
|
-
visitNode(file.localJsxFactory, markAsSynthetic);
|
|
44978
|
+
visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
|
|
44895
44979
|
if (file.localJsxFactory) {
|
|
44896
44980
|
return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
44897
44981
|
}
|
|
@@ -46402,6 +46486,7 @@ ${lanes.join("\n")}
|
|
|
46402
46486
|
return valueSymbol;
|
|
46403
46487
|
}
|
|
46404
46488
|
const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
46489
|
+
Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
46405
46490
|
result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
|
|
46406
46491
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
46407
46492
|
if (valueSymbol.valueDeclaration)
|
|
@@ -50041,7 +50126,7 @@ ${lanes.join("\n")}
|
|
|
50041
50126
|
}
|
|
50042
50127
|
let hadError = false;
|
|
50043
50128
|
const file = getSourceFileOfNode(existing);
|
|
50044
|
-
const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
|
|
50129
|
+
const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
|
|
50045
50130
|
if (hadError) {
|
|
50046
50131
|
return void 0;
|
|
50047
50132
|
}
|
|
@@ -50054,16 +50139,16 @@ ${lanes.join("\n")}
|
|
|
50054
50139
|
return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
|
|
50055
50140
|
}
|
|
50056
50141
|
if (isJSDocNullableType(node)) {
|
|
50057
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
|
|
50142
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
|
|
50058
50143
|
}
|
|
50059
50144
|
if (isJSDocOptionalType(node)) {
|
|
50060
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
50145
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
50061
50146
|
}
|
|
50062
50147
|
if (isJSDocNonNullableType(node)) {
|
|
50063
50148
|
return visitNode(node.type, visitExistingNodeTreeSymbols);
|
|
50064
50149
|
}
|
|
50065
50150
|
if (isJSDocVariadicType(node)) {
|
|
50066
|
-
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
|
|
50151
|
+
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
50067
50152
|
}
|
|
50068
50153
|
if (isJSDocTypeLiteral(node)) {
|
|
50069
50154
|
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
|
|
@@ -50075,7 +50160,7 @@ ${lanes.join("\n")}
|
|
|
50075
50160
|
void 0,
|
|
50076
50161
|
name,
|
|
50077
50162
|
t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
50078
|
-
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50163
|
+
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50079
50164
|
);
|
|
50080
50165
|
}));
|
|
50081
50166
|
}
|
|
@@ -50094,9 +50179,9 @@ ${lanes.join("\n")}
|
|
|
50094
50179
|
"x",
|
|
50095
50180
|
/*questionToken*/
|
|
50096
50181
|
void 0,
|
|
50097
|
-
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
|
|
50182
|
+
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
|
|
50098
50183
|
)],
|
|
50099
|
-
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
|
|
50184
|
+
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
|
|
50100
50185
|
)]);
|
|
50101
50186
|
}
|
|
50102
50187
|
if (isJSDocFunctionType(node)) {
|
|
@@ -50105,33 +50190,33 @@ ${lanes.join("\n")}
|
|
|
50105
50190
|
return factory.createConstructorTypeNode(
|
|
50106
50191
|
/*modifiers*/
|
|
50107
50192
|
void 0,
|
|
50108
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
50193
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
50109
50194
|
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
|
|
50110
50195
|
/*modifiers*/
|
|
50111
50196
|
void 0,
|
|
50112
50197
|
getEffectiveDotDotDotForParameter(p),
|
|
50113
50198
|
getNameForJSDocFunctionParameter(p, i),
|
|
50114
50199
|
p.questionToken,
|
|
50115
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
50200
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
50116
50201
|
/*initializer*/
|
|
50117
50202
|
void 0
|
|
50118
50203
|
)),
|
|
50119
|
-
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50204
|
+
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50120
50205
|
);
|
|
50121
50206
|
} else {
|
|
50122
50207
|
return factory.createFunctionTypeNode(
|
|
50123
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
50208
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
50124
50209
|
map(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
50125
50210
|
/*modifiers*/
|
|
50126
50211
|
void 0,
|
|
50127
50212
|
getEffectiveDotDotDotForParameter(p),
|
|
50128
50213
|
getNameForJSDocFunctionParameter(p, i),
|
|
50129
50214
|
p.questionToken,
|
|
50130
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
50215
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
50131
50216
|
/*initializer*/
|
|
50132
50217
|
void 0
|
|
50133
50218
|
)),
|
|
50134
|
-
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50219
|
+
visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
50135
50220
|
);
|
|
50136
50221
|
}
|
|
50137
50222
|
}
|
|
@@ -51053,7 +51138,7 @@ ${lanes.join("\n")}
|
|
|
51053
51138
|
break;
|
|
51054
51139
|
}
|
|
51055
51140
|
case 268 /* ImportEqualsDeclaration */:
|
|
51056
|
-
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
|
|
51141
|
+
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
|
|
51057
51142
|
serializeMaybeAliasAssignment(symbol);
|
|
51058
51143
|
break;
|
|
51059
51144
|
}
|
|
@@ -67322,7 +67407,7 @@ ${lanes.join("\n")}
|
|
|
67322
67407
|
}
|
|
67323
67408
|
}
|
|
67324
67409
|
function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
|
|
67325
|
-
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
67410
|
+
const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
|
|
67326
67411
|
if (typeNode) {
|
|
67327
67412
|
return getTypeFromTypeNode(typeNode);
|
|
67328
67413
|
}
|
|
@@ -67931,8 +68016,16 @@ ${lanes.join("\n")}
|
|
|
67931
68016
|
Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */);
|
|
67932
68017
|
return getContextualTypeForSubstitutionExpression(parent2.parent, node);
|
|
67933
68018
|
case 214 /* ParenthesizedExpression */: {
|
|
67934
|
-
|
|
67935
|
-
|
|
68019
|
+
if (isInJSFile(parent2)) {
|
|
68020
|
+
if (isJSDocSatisfiesExpression(parent2)) {
|
|
68021
|
+
return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2));
|
|
68022
|
+
}
|
|
68023
|
+
const typeTag = getJSDocTypeTag(parent2);
|
|
68024
|
+
if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
|
|
68025
|
+
return getTypeFromTypeNode(typeTag.typeExpression.type);
|
|
68026
|
+
}
|
|
68027
|
+
}
|
|
68028
|
+
return getContextualType2(parent2, contextFlags);
|
|
67936
68029
|
}
|
|
67937
68030
|
case 232 /* NonNullExpression */:
|
|
67938
68031
|
return getContextualType2(parent2, contextFlags);
|
|
@@ -72136,12 +72229,15 @@ ${lanes.join("\n")}
|
|
|
72136
72229
|
}
|
|
72137
72230
|
function checkSatisfiesExpression(node) {
|
|
72138
72231
|
checkSourceElement(node.type);
|
|
72139
|
-
|
|
72140
|
-
|
|
72232
|
+
return checkSatisfiesExpressionWorker(node.expression, node.type);
|
|
72233
|
+
}
|
|
72234
|
+
function checkSatisfiesExpressionWorker(expression, target, checkMode) {
|
|
72235
|
+
const exprType = checkExpression(expression, checkMode);
|
|
72236
|
+
const targetType = getTypeFromTypeNode(target);
|
|
72141
72237
|
if (isErrorType(targetType)) {
|
|
72142
72238
|
return targetType;
|
|
72143
72239
|
}
|
|
72144
|
-
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType,
|
|
72240
|
+
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
|
|
72145
72241
|
return exprType;
|
|
72146
72242
|
}
|
|
72147
72243
|
function checkMetaProperty(node) {
|
|
@@ -73548,12 +73644,12 @@ ${lanes.join("\n")}
|
|
|
73548
73644
|
void 0
|
|
73549
73645
|
);
|
|
73550
73646
|
const operator = operatorToken.kind;
|
|
73551
|
-
if (operator
|
|
73552
|
-
|
|
73553
|
-
|
|
73554
|
-
|
|
73555
|
-
|
|
73556
|
-
|
|
73647
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
73648
|
+
let parent2 = node.parent;
|
|
73649
|
+
while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) {
|
|
73650
|
+
parent2 = parent2.parent;
|
|
73651
|
+
}
|
|
73652
|
+
if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) {
|
|
73557
73653
|
checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0);
|
|
73558
73654
|
}
|
|
73559
73655
|
checkTruthinessOfType(leftType, node.left);
|
|
@@ -73630,7 +73726,7 @@ ${lanes.join("\n")}
|
|
|
73630
73726
|
return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
|
|
73631
73727
|
}
|
|
73632
73728
|
let leftType;
|
|
73633
|
-
if (operator
|
|
73729
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
73634
73730
|
leftType = checkTruthinessExpression(left, checkMode);
|
|
73635
73731
|
} else {
|
|
73636
73732
|
leftType = checkExpression(left, checkMode);
|
|
@@ -74173,6 +74269,12 @@ ${lanes.join("\n")}
|
|
|
74173
74269
|
}
|
|
74174
74270
|
function checkDeclarationInitializer(declaration, checkMode, contextualType) {
|
|
74175
74271
|
const initializer = getEffectiveInitializer(declaration);
|
|
74272
|
+
if (isInJSFile(declaration)) {
|
|
74273
|
+
const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
|
|
74274
|
+
if (typeNode) {
|
|
74275
|
+
return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
|
|
74276
|
+
}
|
|
74277
|
+
}
|
|
74176
74278
|
const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
|
|
74177
74279
|
initializer,
|
|
74178
74280
|
contextualType,
|
|
@@ -74500,9 +74602,14 @@ ${lanes.join("\n")}
|
|
|
74500
74602
|
}
|
|
74501
74603
|
}
|
|
74502
74604
|
function checkParenthesizedExpression(node, checkMode) {
|
|
74503
|
-
if (hasJSDocNodes(node)
|
|
74504
|
-
|
|
74505
|
-
|
|
74605
|
+
if (hasJSDocNodes(node)) {
|
|
74606
|
+
if (isJSDocSatisfiesExpression(node)) {
|
|
74607
|
+
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
74608
|
+
}
|
|
74609
|
+
if (isJSDocTypeAssertion(node)) {
|
|
74610
|
+
const type = getJSDocTypeAssertionType(node);
|
|
74611
|
+
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
74612
|
+
}
|
|
74506
74613
|
}
|
|
74507
74614
|
return checkExpression(node.expression, checkMode);
|
|
74508
74615
|
}
|
|
@@ -76204,6 +76311,19 @@ ${lanes.join("\n")}
|
|
|
76204
76311
|
function checkJSDocTypeTag(node) {
|
|
76205
76312
|
checkSourceElement(node.typeExpression);
|
|
76206
76313
|
}
|
|
76314
|
+
function checkJSDocSatisfiesTag(node) {
|
|
76315
|
+
checkSourceElement(node.typeExpression);
|
|
76316
|
+
const host2 = getEffectiveJSDocHost(node);
|
|
76317
|
+
if (host2) {
|
|
76318
|
+
const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
|
|
76319
|
+
if (length(tags) > 1) {
|
|
76320
|
+
for (let i = 1; i < length(tags); i++) {
|
|
76321
|
+
const tagName = tags[i].tagName;
|
|
76322
|
+
error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
|
|
76323
|
+
}
|
|
76324
|
+
}
|
|
76325
|
+
}
|
|
76326
|
+
}
|
|
76207
76327
|
function checkJSDocLinkLikeTag(node) {
|
|
76208
76328
|
if (node.name) {
|
|
76209
76329
|
resolveJSDocMemberName(
|
|
@@ -76989,15 +77109,24 @@ ${lanes.join("\n")}
|
|
|
76989
77109
|
function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
|
|
76990
77110
|
if (!strictNullChecks)
|
|
76991
77111
|
return;
|
|
76992
|
-
|
|
76993
|
-
|
|
76994
|
-
|
|
76995
|
-
helper(
|
|
77112
|
+
bothHelper(condExpr, body);
|
|
77113
|
+
function bothHelper(condExpr2, body2) {
|
|
77114
|
+
condExpr2 = skipParentheses(condExpr2);
|
|
77115
|
+
helper(condExpr2, body2);
|
|
77116
|
+
while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
|
|
77117
|
+
condExpr2 = skipParentheses(condExpr2.left);
|
|
77118
|
+
helper(condExpr2, body2);
|
|
77119
|
+
}
|
|
76996
77120
|
}
|
|
76997
77121
|
function helper(condExpr2, body2) {
|
|
76998
|
-
const location =
|
|
76999
|
-
if (isModuleExportsAccessExpression(location))
|
|
77122
|
+
const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
|
|
77123
|
+
if (isModuleExportsAccessExpression(location)) {
|
|
77000
77124
|
return;
|
|
77125
|
+
}
|
|
77126
|
+
if (isLogicalOrCoalescingBinaryExpression(location)) {
|
|
77127
|
+
bothHelper(location, body2);
|
|
77128
|
+
return;
|
|
77129
|
+
}
|
|
77001
77130
|
const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
|
|
77002
77131
|
const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion3(location.expression);
|
|
77003
77132
|
if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
|
|
@@ -77007,7 +77136,7 @@ ${lanes.join("\n")}
|
|
|
77007
77136
|
if (callSignatures.length === 0 && !isPromise) {
|
|
77008
77137
|
return;
|
|
77009
77138
|
}
|
|
77010
|
-
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name :
|
|
77139
|
+
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
|
|
77011
77140
|
const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
|
|
77012
77141
|
if (!testedSymbol && !isPromise) {
|
|
77013
77142
|
return;
|
|
@@ -79808,6 +79937,8 @@ ${lanes.join("\n")}
|
|
|
79808
79937
|
case 338 /* JSDocProtectedTag */:
|
|
79809
79938
|
case 337 /* JSDocPrivateTag */:
|
|
79810
79939
|
return checkJSDocAccessibilityModifiers(node);
|
|
79940
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
79941
|
+
return checkJSDocSatisfiesTag(node);
|
|
79811
79942
|
case 196 /* IndexedAccessType */:
|
|
79812
79943
|
return checkIndexedAccessType(node);
|
|
79813
79944
|
case 197 /* MappedType */:
|
|
@@ -83499,13 +83630,10 @@ ${lanes.join("\n")}
|
|
|
83499
83630
|
|
|
83500
83631
|
// src/compiler/visitorPublic.ts
|
|
83501
83632
|
function visitNode(node, visitor, test, lift) {
|
|
83502
|
-
if (node === void 0
|
|
83633
|
+
if (node === void 0) {
|
|
83503
83634
|
return node;
|
|
83504
83635
|
}
|
|
83505
83636
|
const visited = visitor(node);
|
|
83506
|
-
if (visited === node) {
|
|
83507
|
-
return node;
|
|
83508
|
-
}
|
|
83509
83637
|
let visitedNode;
|
|
83510
83638
|
if (visited === void 0) {
|
|
83511
83639
|
return void 0;
|
|
@@ -83518,7 +83646,7 @@ ${lanes.join("\n")}
|
|
|
83518
83646
|
return visitedNode;
|
|
83519
83647
|
}
|
|
83520
83648
|
function visitNodes2(nodes, visitor, test, start, count) {
|
|
83521
|
-
if (nodes === void 0
|
|
83649
|
+
if (nodes === void 0) {
|
|
83522
83650
|
return nodes;
|
|
83523
83651
|
}
|
|
83524
83652
|
const length2 = nodes.length;
|
|
@@ -83567,25 +83695,30 @@ ${lanes.join("\n")}
|
|
|
83567
83695
|
}
|
|
83568
83696
|
for (let i = 0; i < count; i++) {
|
|
83569
83697
|
const node = nodes[i + start];
|
|
83570
|
-
const visited = node !== void 0 ? visitor(node) : void 0;
|
|
83698
|
+
const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
|
|
83571
83699
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
83572
83700
|
if (updated === void 0) {
|
|
83573
83701
|
updated = nodes.slice(0, i);
|
|
83702
|
+
Debug.assertEachNode(updated, test);
|
|
83574
83703
|
}
|
|
83575
83704
|
if (visited) {
|
|
83576
83705
|
if (isArray(visited)) {
|
|
83577
83706
|
for (const visitedNode of visited) {
|
|
83578
|
-
|
|
83707
|
+
Debug.assertNode(visitedNode, test);
|
|
83579
83708
|
updated.push(visitedNode);
|
|
83580
83709
|
}
|
|
83581
83710
|
} else {
|
|
83582
|
-
|
|
83711
|
+
Debug.assertNode(visited, test);
|
|
83583
83712
|
updated.push(visited);
|
|
83584
83713
|
}
|
|
83585
83714
|
}
|
|
83586
83715
|
}
|
|
83587
83716
|
}
|
|
83588
|
-
|
|
83717
|
+
if (updated) {
|
|
83718
|
+
return updated;
|
|
83719
|
+
}
|
|
83720
|
+
Debug.assertEachNode(nodes, test);
|
|
83721
|
+
return nodes;
|
|
83589
83722
|
}
|
|
83590
83723
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) {
|
|
83591
83724
|
context.startLexicalEnvironment();
|
|
@@ -83599,7 +83732,7 @@ ${lanes.join("\n")}
|
|
|
83599
83732
|
context.startLexicalEnvironment();
|
|
83600
83733
|
if (nodes) {
|
|
83601
83734
|
context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
|
|
83602
|
-
updated = nodesVisitor(nodes, visitor,
|
|
83735
|
+
updated = nodesVisitor(nodes, visitor, isParameter);
|
|
83603
83736
|
if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
|
|
83604
83737
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
83605
83738
|
}
|
|
@@ -83721,6 +83854,7 @@ ${lanes.join("\n")}
|
|
|
83721
83854
|
function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
|
|
83722
83855
|
context.startBlockScope();
|
|
83723
83856
|
const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
|
|
83857
|
+
Debug.assert(updated);
|
|
83724
83858
|
const declarations = context.endBlockScope();
|
|
83725
83859
|
if (some(declarations)) {
|
|
83726
83860
|
if (isBlock(updated)) {
|
|
@@ -83752,14 +83886,14 @@ ${lanes.join("\n")}
|
|
|
83752
83886
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83753
83887
|
return context.factory.updateQualifiedName(
|
|
83754
83888
|
node,
|
|
83755
|
-
nodeVisitor(node.left, visitor, isEntityName),
|
|
83756
|
-
nodeVisitor(node.right, visitor, isIdentifier)
|
|
83889
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
|
|
83890
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
|
|
83757
83891
|
);
|
|
83758
83892
|
},
|
|
83759
83893
|
[164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83760
83894
|
return context.factory.updateComputedPropertyName(
|
|
83761
83895
|
node,
|
|
83762
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
83896
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
83763
83897
|
);
|
|
83764
83898
|
},
|
|
83765
83899
|
// Signature elements
|
|
@@ -83767,7 +83901,7 @@ ${lanes.join("\n")}
|
|
|
83767
83901
|
return context.factory.updateTypeParameterDeclaration(
|
|
83768
83902
|
node,
|
|
83769
83903
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83770
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
83904
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
83771
83905
|
nodeVisitor(node.constraint, visitor, isTypeNode),
|
|
83772
83906
|
nodeVisitor(node.default, visitor, isTypeNode)
|
|
83773
83907
|
);
|
|
@@ -83776,9 +83910,9 @@ ${lanes.join("\n")}
|
|
|
83776
83910
|
return context.factory.updateParameterDeclaration(
|
|
83777
83911
|
node,
|
|
83778
83912
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83779
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
83780
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
83781
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
83913
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
83914
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
83915
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83782
83916
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
83783
83917
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
83784
83918
|
);
|
|
@@ -83786,7 +83920,7 @@ ${lanes.join("\n")}
|
|
|
83786
83920
|
[167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83787
83921
|
return context.factory.updateDecorator(
|
|
83788
83922
|
node,
|
|
83789
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
83923
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
83790
83924
|
);
|
|
83791
83925
|
},
|
|
83792
83926
|
// Type elements
|
|
@@ -83794,19 +83928,19 @@ ${lanes.join("\n")}
|
|
|
83794
83928
|
return context.factory.updatePropertySignature(
|
|
83795
83929
|
node,
|
|
83796
83930
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83797
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83798
|
-
nodeVisitor(node.questionToken, tokenVisitor,
|
|
83931
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83932
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83799
83933
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83800
83934
|
);
|
|
83801
83935
|
},
|
|
83802
83936
|
[169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
83803
|
-
var _a2;
|
|
83937
|
+
var _a2, _b;
|
|
83804
83938
|
return context.factory.updatePropertyDeclaration(
|
|
83805
83939
|
node,
|
|
83806
83940
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83807
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83941
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83808
83942
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
83809
|
-
nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
|
|
83943
|
+
tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
|
|
83810
83944
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
83811
83945
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
83812
83946
|
);
|
|
@@ -83815,10 +83949,10 @@ ${lanes.join("\n")}
|
|
|
83815
83949
|
return context.factory.updateMethodSignature(
|
|
83816
83950
|
node,
|
|
83817
83951
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83818
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83819
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
83952
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83953
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83820
83954
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83821
|
-
nodesVisitor(node.parameters, visitor,
|
|
83955
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
83822
83956
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83823
83957
|
);
|
|
83824
83958
|
},
|
|
@@ -83826,9 +83960,9 @@ ${lanes.join("\n")}
|
|
|
83826
83960
|
return context.factory.updateMethodDeclaration(
|
|
83827
83961
|
node,
|
|
83828
83962
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83829
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
83830
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83831
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
83963
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
83964
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83965
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
83832
83966
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83833
83967
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
83834
83968
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
@@ -83847,7 +83981,7 @@ ${lanes.join("\n")}
|
|
|
83847
83981
|
return context.factory.updateGetAccessorDeclaration(
|
|
83848
83982
|
node,
|
|
83849
83983
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83850
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83984
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83851
83985
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
83852
83986
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
83853
83987
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
@@ -83857,7 +83991,7 @@ ${lanes.join("\n")}
|
|
|
83857
83991
|
return context.factory.updateSetAccessorDeclaration(
|
|
83858
83992
|
node,
|
|
83859
83993
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
83860
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
83994
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
83861
83995
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
83862
83996
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
83863
83997
|
);
|
|
@@ -83874,7 +84008,7 @@ ${lanes.join("\n")}
|
|
|
83874
84008
|
return context.factory.updateCallSignature(
|
|
83875
84009
|
node,
|
|
83876
84010
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83877
|
-
nodesVisitor(node.parameters, visitor,
|
|
84011
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
83878
84012
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83879
84013
|
);
|
|
83880
84014
|
},
|
|
@@ -83882,7 +84016,7 @@ ${lanes.join("\n")}
|
|
|
83882
84016
|
return context.factory.updateConstructSignature(
|
|
83883
84017
|
node,
|
|
83884
84018
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83885
|
-
nodesVisitor(node.parameters, visitor,
|
|
84019
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
83886
84020
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83887
84021
|
);
|
|
83888
84022
|
},
|
|
@@ -83890,8 +84024,8 @@ ${lanes.join("\n")}
|
|
|
83890
84024
|
return context.factory.updateIndexSignature(
|
|
83891
84025
|
node,
|
|
83892
84026
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83893
|
-
nodesVisitor(node.parameters, visitor,
|
|
83894
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84027
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
84028
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83895
84029
|
);
|
|
83896
84030
|
},
|
|
83897
84031
|
// Types
|
|
@@ -83899,14 +84033,14 @@ ${lanes.join("\n")}
|
|
|
83899
84033
|
return context.factory.updateTypePredicateNode(
|
|
83900
84034
|
node,
|
|
83901
84035
|
nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
|
|
83902
|
-
nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
|
|
84036
|
+
Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
|
|
83903
84037
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
83904
84038
|
);
|
|
83905
84039
|
},
|
|
83906
84040
|
[180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83907
84041
|
return context.factory.updateTypeReferenceNode(
|
|
83908
84042
|
node,
|
|
83909
|
-
nodeVisitor(node.typeName, visitor, isEntityName),
|
|
84043
|
+
Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
|
|
83910
84044
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
83911
84045
|
);
|
|
83912
84046
|
},
|
|
@@ -83914,8 +84048,8 @@ ${lanes.join("\n")}
|
|
|
83914
84048
|
return context.factory.updateFunctionTypeNode(
|
|
83915
84049
|
node,
|
|
83916
84050
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83917
|
-
nodesVisitor(node.parameters, visitor,
|
|
83918
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84051
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
84052
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83919
84053
|
);
|
|
83920
84054
|
},
|
|
83921
84055
|
[182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -83923,14 +84057,14 @@ ${lanes.join("\n")}
|
|
|
83923
84057
|
node,
|
|
83924
84058
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
83925
84059
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
83926
|
-
nodesVisitor(node.parameters, visitor,
|
|
83927
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84060
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
84061
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83928
84062
|
);
|
|
83929
84063
|
},
|
|
83930
84064
|
[183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83931
84065
|
return context.factory.updateTypeQueryNode(
|
|
83932
84066
|
node,
|
|
83933
|
-
nodeVisitor(node.exprName, visitor, isEntityName),
|
|
84067
|
+
Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
|
|
83934
84068
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
83935
84069
|
);
|
|
83936
84070
|
},
|
|
@@ -83943,7 +84077,7 @@ ${lanes.join("\n")}
|
|
|
83943
84077
|
[185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83944
84078
|
return context.factory.updateArrayTypeNode(
|
|
83945
84079
|
node,
|
|
83946
|
-
nodeVisitor(node.elementType, visitor, isTypeNode)
|
|
84080
|
+
Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
|
|
83947
84081
|
);
|
|
83948
84082
|
},
|
|
83949
84083
|
[186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -83955,13 +84089,13 @@ ${lanes.join("\n")}
|
|
|
83955
84089
|
[187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83956
84090
|
return context.factory.updateOptionalTypeNode(
|
|
83957
84091
|
node,
|
|
83958
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84092
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83959
84093
|
);
|
|
83960
84094
|
},
|
|
83961
84095
|
[188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83962
84096
|
return context.factory.updateRestTypeNode(
|
|
83963
84097
|
node,
|
|
83964
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84098
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
83965
84099
|
);
|
|
83966
84100
|
},
|
|
83967
84101
|
[189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -83979,22 +84113,22 @@ ${lanes.join("\n")}
|
|
|
83979
84113
|
[191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83980
84114
|
return context.factory.updateConditionalTypeNode(
|
|
83981
84115
|
node,
|
|
83982
|
-
nodeVisitor(node.checkType, visitor, isTypeNode),
|
|
83983
|
-
nodeVisitor(node.extendsType, visitor, isTypeNode),
|
|
83984
|
-
nodeVisitor(node.trueType, visitor, isTypeNode),
|
|
83985
|
-
nodeVisitor(node.falseType, visitor, isTypeNode)
|
|
84116
|
+
Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
|
|
84117
|
+
Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
|
|
84118
|
+
Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
|
|
84119
|
+
Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
|
|
83986
84120
|
);
|
|
83987
84121
|
},
|
|
83988
84122
|
[192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83989
84123
|
return context.factory.updateInferTypeNode(
|
|
83990
84124
|
node,
|
|
83991
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
|
|
84125
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
|
|
83992
84126
|
);
|
|
83993
84127
|
},
|
|
83994
84128
|
[202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83995
84129
|
return context.factory.updateImportTypeNode(
|
|
83996
84130
|
node,
|
|
83997
|
-
nodeVisitor(node.argument, visitor, isTypeNode),
|
|
84131
|
+
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
83998
84132
|
nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
|
|
83999
84133
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
84000
84134
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
@@ -84004,45 +84138,45 @@ ${lanes.join("\n")}
|
|
|
84004
84138
|
[298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84005
84139
|
return context.factory.updateImportTypeAssertionContainer(
|
|
84006
84140
|
node,
|
|
84007
|
-
nodeVisitor(node.assertClause, visitor, isAssertClause),
|
|
84141
|
+
Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
|
|
84008
84142
|
node.multiLine
|
|
84009
84143
|
);
|
|
84010
84144
|
},
|
|
84011
84145
|
[199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84012
84146
|
return context.factory.updateNamedTupleMember(
|
|
84013
84147
|
node,
|
|
84014
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
84015
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84016
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
84017
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84148
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
84149
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84150
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
84151
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84018
84152
|
);
|
|
84019
84153
|
},
|
|
84020
84154
|
[193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84021
84155
|
return context.factory.updateParenthesizedType(
|
|
84022
84156
|
node,
|
|
84023
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84157
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84024
84158
|
);
|
|
84025
84159
|
},
|
|
84026
84160
|
[195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84027
84161
|
return context.factory.updateTypeOperatorNode(
|
|
84028
84162
|
node,
|
|
84029
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84163
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84030
84164
|
);
|
|
84031
84165
|
},
|
|
84032
84166
|
[196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84033
84167
|
return context.factory.updateIndexedAccessTypeNode(
|
|
84034
84168
|
node,
|
|
84035
|
-
nodeVisitor(node.objectType, visitor, isTypeNode),
|
|
84036
|
-
nodeVisitor(node.indexType, visitor, isTypeNode)
|
|
84169
|
+
Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
|
|
84170
|
+
Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
|
|
84037
84171
|
);
|
|
84038
84172
|
},
|
|
84039
84173
|
[197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84040
84174
|
return context.factory.updateMappedTypeNode(
|
|
84041
84175
|
node,
|
|
84042
|
-
nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
|
|
84043
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
|
|
84176
|
+
tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
|
|
84177
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
|
|
84044
84178
|
nodeVisitor(node.nameType, visitor, isTypeNode),
|
|
84045
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
|
|
84179
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
|
|
84046
84180
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84047
84181
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
84048
84182
|
);
|
|
@@ -84050,21 +84184,21 @@ ${lanes.join("\n")}
|
|
|
84050
84184
|
[198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84051
84185
|
return context.factory.updateLiteralTypeNode(
|
|
84052
84186
|
node,
|
|
84053
|
-
nodeVisitor(node.literal, visitor,
|
|
84187
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
|
|
84054
84188
|
);
|
|
84055
84189
|
},
|
|
84056
84190
|
[200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84057
84191
|
return context.factory.updateTemplateLiteralType(
|
|
84058
84192
|
node,
|
|
84059
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
84193
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
84060
84194
|
nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
|
|
84061
84195
|
);
|
|
84062
84196
|
},
|
|
84063
84197
|
[201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84064
84198
|
return context.factory.updateTemplateLiteralTypeSpan(
|
|
84065
84199
|
node,
|
|
84066
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84067
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
84200
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
84201
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
84068
84202
|
);
|
|
84069
84203
|
},
|
|
84070
84204
|
// Binding patterns
|
|
@@ -84083,9 +84217,9 @@ ${lanes.join("\n")}
|
|
|
84083
84217
|
[205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84084
84218
|
return context.factory.updateBindingElement(
|
|
84085
84219
|
node,
|
|
84086
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
84220
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
84087
84221
|
nodeVisitor(node.propertyName, visitor, isPropertyName),
|
|
84088
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
84222
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
84089
84223
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84090
84224
|
);
|
|
84091
84225
|
},
|
|
@@ -84105,37 +84239,37 @@ ${lanes.join("\n")}
|
|
|
84105
84239
|
[208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84106
84240
|
return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
|
|
84107
84241
|
node,
|
|
84108
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84109
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
84110
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
84242
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84243
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
84244
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
84111
84245
|
) : context.factory.updatePropertyAccessExpression(
|
|
84112
84246
|
node,
|
|
84113
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84114
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
84247
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84248
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
84115
84249
|
);
|
|
84116
84250
|
},
|
|
84117
84251
|
[209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84118
84252
|
return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
|
|
84119
84253
|
node,
|
|
84120
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84121
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
84122
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
84254
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84255
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
84256
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
84123
84257
|
) : context.factory.updateElementAccessExpression(
|
|
84124
84258
|
node,
|
|
84125
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84126
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
84259
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84260
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
84127
84261
|
);
|
|
84128
84262
|
},
|
|
84129
84263
|
[210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84130
84264
|
return isCallChain(node) ? context.factory.updateCallChain(
|
|
84131
84265
|
node,
|
|
84132
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84133
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
84266
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84267
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
84134
84268
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84135
84269
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
84136
84270
|
) : context.factory.updateCallExpression(
|
|
84137
84271
|
node,
|
|
84138
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84272
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84139
84273
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84140
84274
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
84141
84275
|
);
|
|
@@ -84143,7 +84277,7 @@ ${lanes.join("\n")}
|
|
|
84143
84277
|
[211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84144
84278
|
return context.factory.updateNewExpression(
|
|
84145
84279
|
node,
|
|
84146
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84280
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84147
84281
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84148
84282
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
84149
84283
|
);
|
|
@@ -84151,29 +84285,29 @@ ${lanes.join("\n")}
|
|
|
84151
84285
|
[212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84152
84286
|
return context.factory.updateTaggedTemplateExpression(
|
|
84153
84287
|
node,
|
|
84154
|
-
nodeVisitor(node.tag, visitor, isExpression),
|
|
84288
|
+
Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
|
|
84155
84289
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84156
|
-
nodeVisitor(node.template, visitor, isTemplateLiteral)
|
|
84290
|
+
Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
|
|
84157
84291
|
);
|
|
84158
84292
|
},
|
|
84159
84293
|
[213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84160
84294
|
return context.factory.updateTypeAssertion(
|
|
84161
84295
|
node,
|
|
84162
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84163
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84296
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
84297
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84164
84298
|
);
|
|
84165
84299
|
},
|
|
84166
84300
|
[214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84167
84301
|
return context.factory.updateParenthesizedExpression(
|
|
84168
84302
|
node,
|
|
84169
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84303
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84170
84304
|
);
|
|
84171
84305
|
},
|
|
84172
84306
|
[215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84173
84307
|
return context.factory.updateFunctionExpression(
|
|
84174
84308
|
node,
|
|
84175
84309
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84176
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
84310
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
84177
84311
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84178
84312
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84179
84313
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -84188,82 +84322,82 @@ ${lanes.join("\n")}
|
|
|
84188
84322
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84189
84323
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
84190
84324
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84191
|
-
nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
|
|
84325
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
|
|
84192
84326
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
84193
84327
|
);
|
|
84194
84328
|
},
|
|
84195
84329
|
[217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84196
84330
|
return context.factory.updateDeleteExpression(
|
|
84197
84331
|
node,
|
|
84198
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84332
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84199
84333
|
);
|
|
84200
84334
|
},
|
|
84201
84335
|
[218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84202
84336
|
return context.factory.updateTypeOfExpression(
|
|
84203
84337
|
node,
|
|
84204
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84338
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84205
84339
|
);
|
|
84206
84340
|
},
|
|
84207
84341
|
[219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84208
84342
|
return context.factory.updateVoidExpression(
|
|
84209
84343
|
node,
|
|
84210
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84344
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84211
84345
|
);
|
|
84212
84346
|
},
|
|
84213
84347
|
[220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84214
84348
|
return context.factory.updateAwaitExpression(
|
|
84215
84349
|
node,
|
|
84216
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84350
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84217
84351
|
);
|
|
84218
84352
|
},
|
|
84219
84353
|
[221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84220
84354
|
return context.factory.updatePrefixUnaryExpression(
|
|
84221
84355
|
node,
|
|
84222
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
84356
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
84223
84357
|
);
|
|
84224
84358
|
},
|
|
84225
84359
|
[222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84226
84360
|
return context.factory.updatePostfixUnaryExpression(
|
|
84227
84361
|
node,
|
|
84228
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
84362
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
84229
84363
|
);
|
|
84230
84364
|
},
|
|
84231
84365
|
[223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84232
84366
|
return context.factory.updateBinaryExpression(
|
|
84233
84367
|
node,
|
|
84234
|
-
nodeVisitor(node.left, visitor, isExpression),
|
|
84235
|
-
nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
|
|
84236
|
-
nodeVisitor(node.right, visitor, isExpression)
|
|
84368
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
|
|
84369
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
|
|
84370
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
|
|
84237
84371
|
);
|
|
84238
84372
|
},
|
|
84239
84373
|
[224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84240
84374
|
return context.factory.updateConditionalExpression(
|
|
84241
84375
|
node,
|
|
84242
|
-
nodeVisitor(node.condition, visitor, isExpression),
|
|
84243
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
84244
|
-
nodeVisitor(node.whenTrue, visitor, isExpression),
|
|
84245
|
-
nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
|
|
84246
|
-
nodeVisitor(node.whenFalse, visitor, isExpression)
|
|
84376
|
+
Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
|
|
84377
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
|
|
84378
|
+
Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
|
|
84379
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
|
|
84380
|
+
Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
|
|
84247
84381
|
);
|
|
84248
84382
|
},
|
|
84249
84383
|
[225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84250
84384
|
return context.factory.updateTemplateExpression(
|
|
84251
84385
|
node,
|
|
84252
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
84386
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
84253
84387
|
nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
|
|
84254
84388
|
);
|
|
84255
84389
|
},
|
|
84256
84390
|
[226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84257
84391
|
return context.factory.updateYieldExpression(
|
|
84258
84392
|
node,
|
|
84259
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
84393
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
84260
84394
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
84261
84395
|
);
|
|
84262
84396
|
},
|
|
84263
84397
|
[227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84264
84398
|
return context.factory.updateSpreadElement(
|
|
84265
84399
|
node,
|
|
84266
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84400
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84267
84401
|
);
|
|
84268
84402
|
},
|
|
84269
84403
|
[228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84279,45 +84413,45 @@ ${lanes.join("\n")}
|
|
|
84279
84413
|
[230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84280
84414
|
return context.factory.updateExpressionWithTypeArguments(
|
|
84281
84415
|
node,
|
|
84282
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84416
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84283
84417
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
84284
84418
|
);
|
|
84285
84419
|
},
|
|
84286
84420
|
[231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84287
84421
|
return context.factory.updateAsExpression(
|
|
84288
84422
|
node,
|
|
84289
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84290
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84423
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84424
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84291
84425
|
);
|
|
84292
84426
|
},
|
|
84293
84427
|
[235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84294
84428
|
return context.factory.updateSatisfiesExpression(
|
|
84295
84429
|
node,
|
|
84296
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84297
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84430
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84431
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84298
84432
|
);
|
|
84299
84433
|
},
|
|
84300
84434
|
[232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84301
84435
|
return isOptionalChain(node) ? context.factory.updateNonNullChain(
|
|
84302
84436
|
node,
|
|
84303
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84437
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84304
84438
|
) : context.factory.updateNonNullExpression(
|
|
84305
84439
|
node,
|
|
84306
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84440
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84307
84441
|
);
|
|
84308
84442
|
},
|
|
84309
84443
|
[233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84310
84444
|
return context.factory.updateMetaProperty(
|
|
84311
84445
|
node,
|
|
84312
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84446
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84313
84447
|
);
|
|
84314
84448
|
},
|
|
84315
84449
|
// Misc
|
|
84316
84450
|
[236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84317
84451
|
return context.factory.updateTemplateSpan(
|
|
84318
84452
|
node,
|
|
84319
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84320
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
84453
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84454
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
84321
84455
|
);
|
|
84322
84456
|
},
|
|
84323
84457
|
// Element
|
|
@@ -84331,20 +84465,20 @@ ${lanes.join("\n")}
|
|
|
84331
84465
|
return context.factory.updateVariableStatement(
|
|
84332
84466
|
node,
|
|
84333
84467
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84334
|
-
nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
|
|
84468
|
+
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
84335
84469
|
);
|
|
84336
84470
|
},
|
|
84337
84471
|
[241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84338
84472
|
return context.factory.updateExpressionStatement(
|
|
84339
84473
|
node,
|
|
84340
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84474
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84341
84475
|
);
|
|
84342
84476
|
},
|
|
84343
84477
|
[242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84344
84478
|
return context.factory.updateIfStatement(
|
|
84345
84479
|
node,
|
|
84346
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84347
|
-
nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
|
|
84480
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84481
|
+
Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
|
|
84348
84482
|
nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
|
|
84349
84483
|
);
|
|
84350
84484
|
},
|
|
@@ -84352,13 +84486,13 @@ ${lanes.join("\n")}
|
|
|
84352
84486
|
return context.factory.updateDoStatement(
|
|
84353
84487
|
node,
|
|
84354
84488
|
visitIterationBody(node.statement, visitor, context, nodeVisitor),
|
|
84355
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84489
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84356
84490
|
);
|
|
84357
84491
|
},
|
|
84358
84492
|
[244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84359
84493
|
return context.factory.updateWhileStatement(
|
|
84360
84494
|
node,
|
|
84361
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84495
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84362
84496
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
84363
84497
|
);
|
|
84364
84498
|
},
|
|
@@ -84374,17 +84508,17 @@ ${lanes.join("\n")}
|
|
|
84374
84508
|
[246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84375
84509
|
return context.factory.updateForInStatement(
|
|
84376
84510
|
node,
|
|
84377
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
84378
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84511
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
84512
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84379
84513
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
84380
84514
|
);
|
|
84381
84515
|
},
|
|
84382
84516
|
[247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84383
84517
|
return context.factory.updateForOfStatement(
|
|
84384
84518
|
node,
|
|
84385
|
-
nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
|
|
84386
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
84387
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84519
|
+
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
|
84520
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
84521
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84388
84522
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
84389
84523
|
);
|
|
84390
84524
|
},
|
|
@@ -84409,34 +84543,34 @@ ${lanes.join("\n")}
|
|
|
84409
84543
|
[251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84410
84544
|
return context.factory.updateWithStatement(
|
|
84411
84545
|
node,
|
|
84412
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84413
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
84546
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84547
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
84414
84548
|
);
|
|
84415
84549
|
},
|
|
84416
84550
|
[252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84417
84551
|
return context.factory.updateSwitchStatement(
|
|
84418
84552
|
node,
|
|
84419
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84420
|
-
nodeVisitor(node.caseBlock, visitor, isCaseBlock)
|
|
84553
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84554
|
+
Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
|
|
84421
84555
|
);
|
|
84422
84556
|
},
|
|
84423
84557
|
[253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84424
84558
|
return context.factory.updateLabeledStatement(
|
|
84425
84559
|
node,
|
|
84426
|
-
nodeVisitor(node.label, visitor, isIdentifier),
|
|
84427
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
84560
|
+
Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
|
|
84561
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
84428
84562
|
);
|
|
84429
84563
|
},
|
|
84430
84564
|
[254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84431
84565
|
return context.factory.updateThrowStatement(
|
|
84432
84566
|
node,
|
|
84433
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84567
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84434
84568
|
);
|
|
84435
84569
|
},
|
|
84436
84570
|
[255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84437
84571
|
return context.factory.updateTryStatement(
|
|
84438
84572
|
node,
|
|
84439
|
-
nodeVisitor(node.tryBlock, visitor, isBlock),
|
|
84573
|
+
Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
|
|
84440
84574
|
nodeVisitor(node.catchClause, visitor, isCatchClause),
|
|
84441
84575
|
nodeVisitor(node.finallyBlock, visitor, isBlock)
|
|
84442
84576
|
);
|
|
@@ -84444,8 +84578,8 @@ ${lanes.join("\n")}
|
|
|
84444
84578
|
[257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
84445
84579
|
return context.factory.updateVariableDeclaration(
|
|
84446
84580
|
node,
|
|
84447
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
84448
|
-
nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
|
|
84581
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
84582
|
+
tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
|
|
84449
84583
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
84450
84584
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84451
84585
|
);
|
|
@@ -84460,7 +84594,7 @@ ${lanes.join("\n")}
|
|
|
84460
84594
|
return context.factory.updateFunctionDeclaration(
|
|
84461
84595
|
node,
|
|
84462
84596
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84463
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
84597
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
84464
84598
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84465
84599
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84466
84600
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -84482,7 +84616,7 @@ ${lanes.join("\n")}
|
|
|
84482
84616
|
return context.factory.updateInterfaceDeclaration(
|
|
84483
84617
|
node,
|
|
84484
84618
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84485
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84619
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84486
84620
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84487
84621
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
84488
84622
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
@@ -84492,16 +84626,16 @@ ${lanes.join("\n")}
|
|
|
84492
84626
|
return context.factory.updateTypeAliasDeclaration(
|
|
84493
84627
|
node,
|
|
84494
84628
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84495
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84629
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84496
84630
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
84497
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
84631
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
84498
84632
|
);
|
|
84499
84633
|
},
|
|
84500
84634
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84501
84635
|
return context.factory.updateEnumDeclaration(
|
|
84502
84636
|
node,
|
|
84503
84637
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84504
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84638
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84505
84639
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
84506
84640
|
);
|
|
84507
84641
|
},
|
|
@@ -84509,7 +84643,7 @@ ${lanes.join("\n")}
|
|
|
84509
84643
|
return context.factory.updateModuleDeclaration(
|
|
84510
84644
|
node,
|
|
84511
84645
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84512
|
-
nodeVisitor(node.name, visitor, isModuleName),
|
|
84646
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
84513
84647
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
84514
84648
|
);
|
|
84515
84649
|
},
|
|
@@ -84528,7 +84662,7 @@ ${lanes.join("\n")}
|
|
|
84528
84662
|
[267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84529
84663
|
return context.factory.updateNamespaceExportDeclaration(
|
|
84530
84664
|
node,
|
|
84531
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84665
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84532
84666
|
);
|
|
84533
84667
|
},
|
|
84534
84668
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84536,8 +84670,8 @@ ${lanes.join("\n")}
|
|
|
84536
84670
|
node,
|
|
84537
84671
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84538
84672
|
node.isTypeOnly,
|
|
84539
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84540
|
-
nodeVisitor(node.moduleReference, visitor, isModuleReference)
|
|
84673
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84674
|
+
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
84541
84675
|
);
|
|
84542
84676
|
},
|
|
84543
84677
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84545,7 +84679,7 @@ ${lanes.join("\n")}
|
|
|
84545
84679
|
node,
|
|
84546
84680
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84547
84681
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
84548
|
-
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
84682
|
+
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
84549
84683
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
84550
84684
|
);
|
|
84551
84685
|
},
|
|
@@ -84559,8 +84693,8 @@ ${lanes.join("\n")}
|
|
|
84559
84693
|
[297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84560
84694
|
return context.factory.updateAssertEntry(
|
|
84561
84695
|
node,
|
|
84562
|
-
nodeVisitor(node.name, visitor, isAssertionKey),
|
|
84563
|
-
nodeVisitor(node.value, visitor, isExpression)
|
|
84696
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
|
|
84697
|
+
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
84564
84698
|
);
|
|
84565
84699
|
},
|
|
84566
84700
|
[270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84574,13 +84708,13 @@ ${lanes.join("\n")}
|
|
|
84574
84708
|
[271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84575
84709
|
return context.factory.updateNamespaceImport(
|
|
84576
84710
|
node,
|
|
84577
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84711
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84578
84712
|
);
|
|
84579
84713
|
},
|
|
84580
84714
|
[277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84581
84715
|
return context.factory.updateNamespaceExport(
|
|
84582
84716
|
node,
|
|
84583
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84717
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84584
84718
|
);
|
|
84585
84719
|
},
|
|
84586
84720
|
[272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -84594,14 +84728,14 @@ ${lanes.join("\n")}
|
|
|
84594
84728
|
node,
|
|
84595
84729
|
node.isTypeOnly,
|
|
84596
84730
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
84597
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84731
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84598
84732
|
);
|
|
84599
84733
|
},
|
|
84600
84734
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84601
84735
|
return context.factory.updateExportAssignment(
|
|
84602
84736
|
node,
|
|
84603
84737
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
84604
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84738
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84605
84739
|
);
|
|
84606
84740
|
},
|
|
84607
84741
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -84625,59 +84759,59 @@ ${lanes.join("\n")}
|
|
|
84625
84759
|
node,
|
|
84626
84760
|
node.isTypeOnly,
|
|
84627
84761
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
84628
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
84762
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
84629
84763
|
);
|
|
84630
84764
|
},
|
|
84631
84765
|
// Module references
|
|
84632
84766
|
[280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84633
84767
|
return context.factory.updateExternalModuleReference(
|
|
84634
84768
|
node,
|
|
84635
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84769
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84636
84770
|
);
|
|
84637
84771
|
},
|
|
84638
84772
|
// JSX
|
|
84639
84773
|
[281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84640
84774
|
return context.factory.updateJsxElement(
|
|
84641
84775
|
node,
|
|
84642
|
-
nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
|
|
84776
|
+
Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
|
|
84643
84777
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
84644
|
-
nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
|
|
84778
|
+
Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
|
|
84645
84779
|
);
|
|
84646
84780
|
},
|
|
84647
84781
|
[282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84648
84782
|
return context.factory.updateJsxSelfClosingElement(
|
|
84649
84783
|
node,
|
|
84650
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
84784
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84651
84785
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84652
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
84786
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
84653
84787
|
);
|
|
84654
84788
|
},
|
|
84655
84789
|
[283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84656
84790
|
return context.factory.updateJsxOpeningElement(
|
|
84657
84791
|
node,
|
|
84658
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
84792
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84659
84793
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
84660
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
84794
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
84661
84795
|
);
|
|
84662
84796
|
},
|
|
84663
84797
|
[284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84664
84798
|
return context.factory.updateJsxClosingElement(
|
|
84665
84799
|
node,
|
|
84666
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
|
|
84800
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
|
|
84667
84801
|
);
|
|
84668
84802
|
},
|
|
84669
84803
|
[285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84670
84804
|
return context.factory.updateJsxFragment(
|
|
84671
84805
|
node,
|
|
84672
|
-
nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
|
|
84806
|
+
Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
|
|
84673
84807
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
84674
|
-
nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
|
|
84808
|
+
Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
|
|
84675
84809
|
);
|
|
84676
84810
|
},
|
|
84677
84811
|
[288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84678
84812
|
return context.factory.updateJsxAttribute(
|
|
84679
84813
|
node,
|
|
84680
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84814
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84681
84815
|
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
|
|
84682
84816
|
);
|
|
84683
84817
|
},
|
|
@@ -84690,20 +84824,20 @@ ${lanes.join("\n")}
|
|
|
84690
84824
|
[290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84691
84825
|
return context.factory.updateJsxSpreadAttribute(
|
|
84692
84826
|
node,
|
|
84693
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84827
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84694
84828
|
);
|
|
84695
84829
|
},
|
|
84696
84830
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84697
84831
|
return context.factory.updateJsxExpression(
|
|
84698
84832
|
node,
|
|
84699
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84833
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84700
84834
|
);
|
|
84701
84835
|
},
|
|
84702
84836
|
// Clauses
|
|
84703
84837
|
[292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84704
84838
|
return context.factory.updateCaseClause(
|
|
84705
84839
|
node,
|
|
84706
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
84840
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
84707
84841
|
nodesVisitor(node.statements, visitor, isStatement)
|
|
84708
84842
|
);
|
|
84709
84843
|
},
|
|
@@ -84723,35 +84857,35 @@ ${lanes.join("\n")}
|
|
|
84723
84857
|
return context.factory.updateCatchClause(
|
|
84724
84858
|
node,
|
|
84725
84859
|
nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
|
|
84726
|
-
nodeVisitor(node.block, visitor, isBlock)
|
|
84860
|
+
Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
|
|
84727
84861
|
);
|
|
84728
84862
|
},
|
|
84729
84863
|
// Property assignments
|
|
84730
84864
|
[299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84731
84865
|
return context.factory.updatePropertyAssignment(
|
|
84732
84866
|
node,
|
|
84733
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
84734
|
-
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84867
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
84868
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
|
|
84735
84869
|
);
|
|
84736
84870
|
},
|
|
84737
84871
|
[300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84738
84872
|
return context.factory.updateShorthandPropertyAssignment(
|
|
84739
84873
|
node,
|
|
84740
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
84874
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
84741
84875
|
nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
|
|
84742
84876
|
);
|
|
84743
84877
|
},
|
|
84744
84878
|
[301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84745
84879
|
return context.factory.updateSpreadAssignment(
|
|
84746
84880
|
node,
|
|
84747
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84881
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84748
84882
|
);
|
|
84749
84883
|
},
|
|
84750
84884
|
// Enum
|
|
84751
84885
|
[302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84752
84886
|
return context.factory.updateEnumMember(
|
|
84753
84887
|
node,
|
|
84754
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
84888
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
84755
84889
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
84756
84890
|
);
|
|
84757
84891
|
},
|
|
@@ -84763,13 +84897,13 @@ ${lanes.join("\n")}
|
|
|
84763
84897
|
);
|
|
84764
84898
|
},
|
|
84765
84899
|
// Transformation nodes
|
|
84766
|
-
[
|
|
84900
|
+
[356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
84767
84901
|
return context.factory.updatePartiallyEmittedExpression(
|
|
84768
84902
|
node,
|
|
84769
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
84903
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
84770
84904
|
);
|
|
84771
84905
|
},
|
|
84772
|
-
[
|
|
84906
|
+
[357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
84773
84907
|
return context.factory.updateCommaListExpression(
|
|
84774
84908
|
node,
|
|
84775
84909
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -85725,7 +85859,7 @@ ${lanes.join("\n")}
|
|
|
85725
85859
|
location = node = value;
|
|
85726
85860
|
value = node.right;
|
|
85727
85861
|
} else {
|
|
85728
|
-
return visitNode(value, visitor, isExpression);
|
|
85862
|
+
return Debug.checkDefined(visitNode(value, visitor, isExpression));
|
|
85729
85863
|
}
|
|
85730
85864
|
}
|
|
85731
85865
|
}
|
|
@@ -85744,6 +85878,7 @@ ${lanes.join("\n")}
|
|
|
85744
85878
|
};
|
|
85745
85879
|
if (value) {
|
|
85746
85880
|
value = visitNode(value, visitor, isExpression);
|
|
85881
|
+
Debug.assert(value);
|
|
85747
85882
|
if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
85748
85883
|
value = ensureIdentifier(
|
|
85749
85884
|
flattenContext,
|
|
@@ -85785,7 +85920,7 @@ ${lanes.join("\n")}
|
|
|
85785
85920
|
function emitBindingOrAssignment(target, value2, location2, original) {
|
|
85786
85921
|
Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
|
|
85787
85922
|
const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
|
|
85788
|
-
context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
|
|
85923
|
+
context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
|
|
85789
85924
|
location2
|
|
85790
85925
|
);
|
|
85791
85926
|
expression.original = original;
|
|
@@ -85842,7 +85977,7 @@ ${lanes.join("\n")}
|
|
|
85842
85977
|
if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
|
|
85843
85978
|
initializer = ensureIdentifier(
|
|
85844
85979
|
flattenContext,
|
|
85845
|
-
visitNode(initializer, flattenContext.visitor),
|
|
85980
|
+
Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
|
|
85846
85981
|
/*reuseIdentifierExpressions*/
|
|
85847
85982
|
false,
|
|
85848
85983
|
initializer
|
|
@@ -85963,7 +86098,7 @@ ${lanes.join("\n")}
|
|
|
85963
86098
|
if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
|
|
85964
86099
|
const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
|
|
85965
86100
|
if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
|
|
85966
|
-
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
|
|
86101
|
+
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
|
|
85967
86102
|
} else {
|
|
85968
86103
|
if (bindingElements) {
|
|
85969
86104
|
flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
|
@@ -86101,7 +86236,7 @@ ${lanes.join("\n")}
|
|
|
86101
86236
|
if (isComputedPropertyName(propertyName)) {
|
|
86102
86237
|
const argumentExpression = ensureIdentifier(
|
|
86103
86238
|
flattenContext,
|
|
86104
|
-
visitNode(propertyName.expression, flattenContext.visitor),
|
|
86239
|
+
Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
|
|
86105
86240
|
/*reuseIdentifierExpressions*/
|
|
86106
86241
|
false,
|
|
86107
86242
|
/*location*/
|
|
@@ -86144,6 +86279,7 @@ ${lanes.join("\n")}
|
|
|
86144
86279
|
return factory2.createArrayBindingPattern(elements);
|
|
86145
86280
|
}
|
|
86146
86281
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
86282
|
+
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
86147
86283
|
return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
86148
86284
|
}
|
|
86149
86285
|
function makeObjectBindingPattern(factory2, elements) {
|
|
@@ -86151,6 +86287,7 @@ ${lanes.join("\n")}
|
|
|
86151
86287
|
return factory2.createObjectBindingPattern(elements);
|
|
86152
86288
|
}
|
|
86153
86289
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
86290
|
+
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
86154
86291
|
return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
86155
86292
|
}
|
|
86156
86293
|
function makeBindingElement(factory2, name) {
|
|
@@ -86181,6 +86318,7 @@ ${lanes.join("\n")}
|
|
|
86181
86318
|
// src/compiler/transformers/taggedTemplate.ts
|
|
86182
86319
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
86183
86320
|
const tag = visitNode(node.tag, visitor, isExpression);
|
|
86321
|
+
Debug.assert(tag);
|
|
86184
86322
|
const templateArguments = [void 0];
|
|
86185
86323
|
const cookedStrings = [];
|
|
86186
86324
|
const rawStrings = [];
|
|
@@ -86197,7 +86335,7 @@ ${lanes.join("\n")}
|
|
|
86197
86335
|
for (const templateSpan of template.templateSpans) {
|
|
86198
86336
|
cookedStrings.push(createTemplateCooked(templateSpan.literal));
|
|
86199
86337
|
rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
|
|
86200
|
-
templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
|
|
86338
|
+
templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
|
|
86201
86339
|
}
|
|
86202
86340
|
}
|
|
86203
86341
|
const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
|
|
@@ -86581,7 +86719,7 @@ ${lanes.join("\n")}
|
|
|
86581
86719
|
function visitObjectLiteralExpression(node) {
|
|
86582
86720
|
return factory2.updateObjectLiteralExpression(
|
|
86583
86721
|
node,
|
|
86584
|
-
visitNodes2(node.properties, getObjectLiteralElementVisitor(node),
|
|
86722
|
+
visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
|
|
86585
86723
|
);
|
|
86586
86724
|
}
|
|
86587
86725
|
function getClassFacts(node, staticProperties) {
|
|
@@ -86779,6 +86917,7 @@ ${lanes.join("\n")}
|
|
|
86779
86917
|
const decorators = [];
|
|
86780
86918
|
for (const parameterDecorator of parameterDecorators) {
|
|
86781
86919
|
const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
|
|
86920
|
+
Debug.assert(expression);
|
|
86782
86921
|
const helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
86783
86922
|
setTextRange(helper, parameterDecorator.expression);
|
|
86784
86923
|
setEmitFlags(helper, 3072 /* NoComments */);
|
|
@@ -86902,6 +87041,7 @@ ${lanes.join("\n")}
|
|
|
86902
87041
|
const name = member.name;
|
|
86903
87042
|
if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
|
|
86904
87043
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
87044
|
+
Debug.assert(expression);
|
|
86905
87045
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
86906
87046
|
if (!isSimpleInlineableExpression(innerExpression)) {
|
|
86907
87047
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
@@ -86909,7 +87049,7 @@ ${lanes.join("\n")}
|
|
|
86909
87049
|
return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
|
|
86910
87050
|
}
|
|
86911
87051
|
}
|
|
86912
|
-
return visitNode(name, visitor, isPropertyName);
|
|
87052
|
+
return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
|
|
86913
87053
|
}
|
|
86914
87054
|
function visitHeritageClause(node) {
|
|
86915
87055
|
if (node.token === 117 /* ImplementsKeyword */) {
|
|
@@ -86920,7 +87060,7 @@ ${lanes.join("\n")}
|
|
|
86920
87060
|
function visitExpressionWithTypeArguments(node) {
|
|
86921
87061
|
return factory2.updateExpressionWithTypeArguments(
|
|
86922
87062
|
node,
|
|
86923
|
-
visitNode(node.expression, visitor, isLeftHandSideExpression),
|
|
87063
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
86924
87064
|
/*typeArguments*/
|
|
86925
87065
|
void 0
|
|
86926
87066
|
);
|
|
@@ -86939,7 +87079,7 @@ ${lanes.join("\n")}
|
|
|
86939
87079
|
return factory2.updatePropertyDeclaration(
|
|
86940
87080
|
node,
|
|
86941
87081
|
concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
|
|
86942
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87082
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
86943
87083
|
/*questionOrExclamationToken*/
|
|
86944
87084
|
void 0,
|
|
86945
87085
|
/*type*/
|
|
@@ -86956,7 +87096,7 @@ ${lanes.join("\n")}
|
|
|
86956
87096
|
void 0,
|
|
86957
87097
|
/*type*/
|
|
86958
87098
|
void 0,
|
|
86959
|
-
visitNode(node.initializer, visitor)
|
|
87099
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
86960
87100
|
);
|
|
86961
87101
|
}
|
|
86962
87102
|
function visitConstructor(node) {
|
|
@@ -87175,7 +87315,7 @@ ${lanes.join("\n")}
|
|
|
87175
87315
|
elideNodes(factory2, node.modifiers),
|
|
87176
87316
|
// preserve positions, if available
|
|
87177
87317
|
node.dotDotDotToken,
|
|
87178
|
-
visitNode(node.name, visitor, isBindingName),
|
|
87318
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
87179
87319
|
/*questionToken*/
|
|
87180
87320
|
void 0,
|
|
87181
87321
|
/*type*/
|
|
@@ -87224,7 +87364,7 @@ ${lanes.join("\n")}
|
|
|
87224
87364
|
return setTextRange(
|
|
87225
87365
|
factory2.createAssignment(
|
|
87226
87366
|
getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
|
|
87227
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
87367
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
87228
87368
|
),
|
|
87229
87369
|
/*location*/
|
|
87230
87370
|
node
|
|
@@ -87234,7 +87374,7 @@ ${lanes.join("\n")}
|
|
|
87234
87374
|
function visitVariableDeclaration(node) {
|
|
87235
87375
|
const updated = factory2.updateVariableDeclaration(
|
|
87236
87376
|
node,
|
|
87237
|
-
visitNode(node.name, visitor, isBindingName),
|
|
87377
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
87238
87378
|
/*exclamationToken*/
|
|
87239
87379
|
void 0,
|
|
87240
87380
|
/*type*/
|
|
@@ -87250,26 +87390,30 @@ ${lanes.join("\n")}
|
|
|
87250
87390
|
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
87251
87391
|
if (isAssertionExpression(innerExpression)) {
|
|
87252
87392
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
87393
|
+
Debug.assert(expression);
|
|
87253
87394
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87254
87395
|
}
|
|
87255
87396
|
return visitEachChild(node, visitor, context);
|
|
87256
87397
|
}
|
|
87257
87398
|
function visitAssertionExpression(node) {
|
|
87258
87399
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
87400
|
+
Debug.assert(expression);
|
|
87259
87401
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87260
87402
|
}
|
|
87261
87403
|
function visitNonNullExpression(node) {
|
|
87262
87404
|
const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
|
|
87405
|
+
Debug.assert(expression);
|
|
87263
87406
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87264
87407
|
}
|
|
87265
87408
|
function visitSatisfiesExpression(node) {
|
|
87266
87409
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
87410
|
+
Debug.assert(expression);
|
|
87267
87411
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
87268
87412
|
}
|
|
87269
87413
|
function visitCallExpression(node) {
|
|
87270
87414
|
return factory2.updateCallExpression(
|
|
87271
87415
|
node,
|
|
87272
|
-
visitNode(node.expression, visitor, isExpression),
|
|
87416
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
87273
87417
|
/*typeArguments*/
|
|
87274
87418
|
void 0,
|
|
87275
87419
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -87278,7 +87422,7 @@ ${lanes.join("\n")}
|
|
|
87278
87422
|
function visitNewExpression(node) {
|
|
87279
87423
|
return factory2.updateNewExpression(
|
|
87280
87424
|
node,
|
|
87281
|
-
visitNode(node.expression, visitor, isExpression),
|
|
87425
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
87282
87426
|
/*typeArguments*/
|
|
87283
87427
|
void 0,
|
|
87284
87428
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -87287,28 +87431,28 @@ ${lanes.join("\n")}
|
|
|
87287
87431
|
function visitTaggedTemplateExpression(node) {
|
|
87288
87432
|
return factory2.updateTaggedTemplateExpression(
|
|
87289
87433
|
node,
|
|
87290
|
-
visitNode(node.tag, visitor, isExpression),
|
|
87434
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
87291
87435
|
/*typeArguments*/
|
|
87292
87436
|
void 0,
|
|
87293
|
-
visitNode(node.template, visitor,
|
|
87437
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
87294
87438
|
);
|
|
87295
87439
|
}
|
|
87296
87440
|
function visitJsxSelfClosingElement(node) {
|
|
87297
87441
|
return factory2.updateJsxSelfClosingElement(
|
|
87298
87442
|
node,
|
|
87299
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
87443
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
87300
87444
|
/*typeArguments*/
|
|
87301
87445
|
void 0,
|
|
87302
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
87446
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
87303
87447
|
);
|
|
87304
87448
|
}
|
|
87305
87449
|
function visitJsxJsxOpeningElement(node) {
|
|
87306
87450
|
return factory2.updateJsxOpeningElement(
|
|
87307
87451
|
node,
|
|
87308
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
87452
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
87309
87453
|
/*typeArguments*/
|
|
87310
87454
|
void 0,
|
|
87311
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
87455
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
87312
87456
|
);
|
|
87313
87457
|
}
|
|
87314
87458
|
function shouldEmitEnumDeclaration(node) {
|
|
@@ -87454,7 +87598,7 @@ ${lanes.join("\n")}
|
|
|
87454
87598
|
} else {
|
|
87455
87599
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
87456
87600
|
if (member.initializer) {
|
|
87457
|
-
return visitNode(member.initializer, visitor, isExpression);
|
|
87601
|
+
return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
|
|
87458
87602
|
} else {
|
|
87459
87603
|
return factory2.createVoidZero();
|
|
87460
87604
|
}
|
|
@@ -87735,7 +87879,7 @@ ${lanes.join("\n")}
|
|
|
87735
87879
|
return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
|
|
87736
87880
|
}
|
|
87737
87881
|
function visitNamespaceExports(node) {
|
|
87738
|
-
return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
|
|
87882
|
+
return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
|
|
87739
87883
|
}
|
|
87740
87884
|
function visitNamedExportBindings(node, allowEmpty) {
|
|
87741
87885
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
@@ -88215,6 +88359,7 @@ ${lanes.join("\n")}
|
|
|
88215
88359
|
const info = accessPrivateIdentifier(node.left);
|
|
88216
88360
|
if (info) {
|
|
88217
88361
|
const receiver = visitNode(node.right, visitor, isExpression);
|
|
88362
|
+
Debug.assert(receiver);
|
|
88218
88363
|
return setOriginalNode(
|
|
88219
88364
|
context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
|
|
88220
88365
|
node
|
|
@@ -88232,6 +88377,7 @@ ${lanes.join("\n")}
|
|
|
88232
88377
|
}
|
|
88233
88378
|
function visitComputedPropertyName(node) {
|
|
88234
88379
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
88380
|
+
Debug.assert(expression);
|
|
88235
88381
|
if (some(pendingExpressions)) {
|
|
88236
88382
|
if (isParenthesizedExpression(expression)) {
|
|
88237
88383
|
expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
|
|
@@ -88313,6 +88459,7 @@ ${lanes.join("\n")}
|
|
|
88313
88459
|
const temp = factory2.createTempVariable(hoistVariableDeclaration);
|
|
88314
88460
|
setSourceMapRange(temp, name.expression);
|
|
88315
88461
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
88462
|
+
Debug.assert(expression);
|
|
88316
88463
|
const assignment = factory2.createAssignment(temp, expression);
|
|
88317
88464
|
setSourceMapRange(assignment, name.expression);
|
|
88318
88465
|
getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
|
|
@@ -88395,7 +88542,7 @@ ${lanes.join("\n")}
|
|
|
88395
88542
|
return transformFieldInitializer(node);
|
|
88396
88543
|
}
|
|
88397
88544
|
function createPrivateIdentifierAccess(info, receiver) {
|
|
88398
|
-
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
|
|
88545
|
+
return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
|
|
88399
88546
|
}
|
|
88400
88547
|
function createPrivateIdentifierAccessHelper(info, receiver) {
|
|
88401
88548
|
setCommentRange(receiver, moveRangePos(receiver, -1));
|
|
@@ -88465,7 +88612,7 @@ ${lanes.join("\n")}
|
|
|
88465
88612
|
if (classConstructor && superClassReference) {
|
|
88466
88613
|
const superProperty = factory2.createReflectGetCall(
|
|
88467
88614
|
superClassReference,
|
|
88468
|
-
visitNode(node.argumentExpression, visitor, isExpression),
|
|
88615
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
|
|
88469
88616
|
classConstructor
|
|
88470
88617
|
);
|
|
88471
88618
|
setOriginalNode(superProperty, node.expression);
|
|
@@ -88482,6 +88629,7 @@ ${lanes.join("\n")}
|
|
|
88482
88629
|
let info;
|
|
88483
88630
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
88484
88631
|
const receiver = visitNode(operand.expression, visitor, isExpression);
|
|
88632
|
+
Debug.assert(receiver);
|
|
88485
88633
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
88486
88634
|
let expression = createPrivateIdentifierAccess(info, readExpression);
|
|
88487
88635
|
const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
@@ -88518,7 +88666,7 @@ ${lanes.join("\n")}
|
|
|
88518
88666
|
getterName = setterName = operand.argumentExpression;
|
|
88519
88667
|
} else {
|
|
88520
88668
|
getterName = factory2.createTempVariable(hoistVariableDeclaration);
|
|
88521
|
-
setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
|
|
88669
|
+
setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
|
|
88522
88670
|
}
|
|
88523
88671
|
}
|
|
88524
88672
|
if (setterName && getterName) {
|
|
@@ -88552,7 +88700,7 @@ ${lanes.join("\n")}
|
|
|
88552
88700
|
function visitExpressionStatement(node) {
|
|
88553
88701
|
return factory2.updateExpressionStatement(
|
|
88554
88702
|
node,
|
|
88555
|
-
visitNode(node.expression, discardedValueVisitor, isExpression)
|
|
88703
|
+
Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
|
|
88556
88704
|
);
|
|
88557
88705
|
}
|
|
88558
88706
|
function createCopiableReceiverExpr(receiver) {
|
|
@@ -88570,25 +88718,25 @@ ${lanes.join("\n")}
|
|
|
88570
88718
|
if (isCallChain(node)) {
|
|
88571
88719
|
return factory2.updateCallChain(
|
|
88572
88720
|
node,
|
|
88573
|
-
factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
|
|
88721
|
+
factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
|
|
88574
88722
|
/*questionDotToken*/
|
|
88575
88723
|
void 0,
|
|
88576
88724
|
/*typeArguments*/
|
|
88577
88725
|
void 0,
|
|
88578
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88726
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88579
88727
|
);
|
|
88580
88728
|
}
|
|
88581
88729
|
return factory2.updateCallExpression(
|
|
88582
88730
|
node,
|
|
88583
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
|
|
88731
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
|
|
88584
88732
|
/*typeArguments*/
|
|
88585
88733
|
void 0,
|
|
88586
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88734
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
88587
88735
|
);
|
|
88588
88736
|
}
|
|
88589
88737
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
88590
88738
|
const invocation = factory2.createFunctionCallCall(
|
|
88591
|
-
visitNode(node.expression, visitor, isExpression),
|
|
88739
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
88592
88740
|
currentClassLexicalEnvironment.classConstructor,
|
|
88593
88741
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
88594
88742
|
);
|
|
@@ -88604,19 +88752,19 @@ ${lanes.join("\n")}
|
|
|
88604
88752
|
return factory2.updateTaggedTemplateExpression(
|
|
88605
88753
|
node,
|
|
88606
88754
|
factory2.createCallExpression(
|
|
88607
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
|
|
88755
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
|
|
88608
88756
|
/*typeArguments*/
|
|
88609
88757
|
void 0,
|
|
88610
|
-
[visitNode(thisArg, visitor, isExpression)]
|
|
88758
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
|
|
88611
88759
|
),
|
|
88612
88760
|
/*typeArguments*/
|
|
88613
88761
|
void 0,
|
|
88614
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
88762
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
88615
88763
|
);
|
|
88616
88764
|
}
|
|
88617
88765
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
88618
88766
|
const invocation = factory2.createFunctionBindCall(
|
|
88619
|
-
visitNode(node.tag, visitor, isExpression),
|
|
88767
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
88620
88768
|
currentClassLexicalEnvironment.classConstructor,
|
|
88621
88769
|
[]
|
|
88622
88770
|
);
|
|
@@ -88627,7 +88775,7 @@ ${lanes.join("\n")}
|
|
|
88627
88775
|
invocation,
|
|
88628
88776
|
/*typeArguments*/
|
|
88629
88777
|
void 0,
|
|
88630
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
88778
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
88631
88779
|
);
|
|
88632
88780
|
}
|
|
88633
88781
|
return visitEachChild(node, visitor, context);
|
|
@@ -88657,9 +88805,9 @@ ${lanes.join("\n")}
|
|
|
88657
88805
|
pendingExpressions = void 0;
|
|
88658
88806
|
node = factory2.updateBinaryExpression(
|
|
88659
88807
|
node,
|
|
88660
|
-
visitNode(node.left, assignmentTargetVisitor),
|
|
88808
|
+
Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
|
|
88661
88809
|
node.operatorToken,
|
|
88662
|
-
visitNode(node.right, visitor)
|
|
88810
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
88663
88811
|
);
|
|
88664
88812
|
const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
|
|
88665
88813
|
pendingExpressions = savedPendingExpressions;
|
|
@@ -88684,7 +88832,7 @@ ${lanes.join("\n")}
|
|
|
88684
88832
|
node,
|
|
88685
88833
|
visitInvalidSuperProperty(node.left),
|
|
88686
88834
|
node.operatorToken,
|
|
88687
|
-
visitNode(node.right, visitor, isExpression)
|
|
88835
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
88688
88836
|
);
|
|
88689
88837
|
}
|
|
88690
88838
|
if (classConstructor && superClassReference) {
|
|
@@ -88704,6 +88852,7 @@ ${lanes.join("\n")}
|
|
|
88704
88852
|
);
|
|
88705
88853
|
setOriginalNode(superPropertyGet, node.left);
|
|
88706
88854
|
setTextRange(superPropertyGet, node.left);
|
|
88855
|
+
Debug.assert(expression);
|
|
88707
88856
|
expression = factory2.createBinaryExpression(
|
|
88708
88857
|
superPropertyGet,
|
|
88709
88858
|
getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
|
|
@@ -88713,9 +88862,11 @@ ${lanes.join("\n")}
|
|
|
88713
88862
|
}
|
|
88714
88863
|
const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
88715
88864
|
if (temp) {
|
|
88865
|
+
Debug.assert(expression);
|
|
88716
88866
|
expression = factory2.createAssignment(temp, expression);
|
|
88717
88867
|
setTextRange(temp, node);
|
|
88718
88868
|
}
|
|
88869
|
+
Debug.assert(expression);
|
|
88719
88870
|
expression = factory2.createReflectSetCall(
|
|
88720
88871
|
superClassReference,
|
|
88721
88872
|
setterName,
|
|
@@ -88739,8 +88890,8 @@ ${lanes.join("\n")}
|
|
|
88739
88890
|
return visitEachChild(node, visitor, context);
|
|
88740
88891
|
}
|
|
88741
88892
|
function createPrivateIdentifierAssignment(info, receiver, right, operator) {
|
|
88742
|
-
receiver = visitNode(receiver, visitor, isExpression);
|
|
88743
|
-
right = visitNode(right, visitor, isExpression);
|
|
88893
|
+
receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
|
|
88894
|
+
right = Debug.checkDefined(visitNode(right, visitor, isExpression));
|
|
88744
88895
|
if (isCompoundAssignment(operator)) {
|
|
88745
88896
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
88746
88897
|
receiver = initializeExpression || readExpression;
|
|
@@ -88843,7 +88994,7 @@ ${lanes.join("\n")}
|
|
|
88843
88994
|
node,
|
|
88844
88995
|
factory2.createAssignment(
|
|
88845
88996
|
temp,
|
|
88846
|
-
visitNode(node.expression, visitor, isExpression)
|
|
88997
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
88847
88998
|
),
|
|
88848
88999
|
/*typeArguments*/
|
|
88849
89000
|
void 0
|
|
@@ -89405,7 +89556,7 @@ ${lanes.join("\n")}
|
|
|
89405
89556
|
) : factory2.updateElementAccessExpression(
|
|
89406
89557
|
node,
|
|
89407
89558
|
factory2.createVoidZero(),
|
|
89408
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
89559
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
89409
89560
|
);
|
|
89410
89561
|
}
|
|
89411
89562
|
function onEmitNode(hint, node, emitCallback) {
|
|
@@ -89522,6 +89673,7 @@ ${lanes.join("\n")}
|
|
|
89522
89673
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
89523
89674
|
if (isComputedPropertyName(name)) {
|
|
89524
89675
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
89676
|
+
Debug.assert(expression);
|
|
89525
89677
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
89526
89678
|
const inlinable = isSimpleInlineableExpression(innerExpression);
|
|
89527
89679
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
@@ -89743,7 +89895,7 @@ ${lanes.join("\n")}
|
|
|
89743
89895
|
/*reservedInNestedScopes*/
|
|
89744
89896
|
true
|
|
89745
89897
|
);
|
|
89746
|
-
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
|
|
89898
|
+
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
89747
89899
|
}
|
|
89748
89900
|
return factory2.createAssignmentTargetWrapper(
|
|
89749
89901
|
parameter,
|
|
@@ -89756,6 +89908,7 @@ ${lanes.join("\n")}
|
|
|
89756
89908
|
);
|
|
89757
89909
|
}
|
|
89758
89910
|
function visitArrayAssignmentTarget(node) {
|
|
89911
|
+
Debug.assertNode(node, isBindingOrAssignmentElement);
|
|
89759
89912
|
const target = getTargetOfBindingOrAssignmentElement(node);
|
|
89760
89913
|
if (target) {
|
|
89761
89914
|
let wrapped;
|
|
@@ -89790,7 +89943,7 @@ ${lanes.join("\n")}
|
|
|
89790
89943
|
node,
|
|
89791
89944
|
wrapped,
|
|
89792
89945
|
node.operatorToken,
|
|
89793
|
-
visitNode(node.right, visitor, isExpression)
|
|
89946
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
89794
89947
|
);
|
|
89795
89948
|
} else if (isSpreadElement(node)) {
|
|
89796
89949
|
return factory2.updateSpreadElement(node, wrapped);
|
|
@@ -89836,14 +89989,14 @@ ${lanes.join("\n")}
|
|
|
89836
89989
|
const initializer = getInitializerOfBindingOrAssignmentElement(node);
|
|
89837
89990
|
return factory2.updatePropertyAssignment(
|
|
89838
89991
|
node,
|
|
89839
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
89840
|
-
wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
|
|
89992
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
89993
|
+
wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
|
|
89841
89994
|
);
|
|
89842
89995
|
}
|
|
89843
89996
|
if (isSpreadAssignment(node)) {
|
|
89844
89997
|
return factory2.updateSpreadAssignment(
|
|
89845
89998
|
node,
|
|
89846
|
-
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
|
|
89999
|
+
wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
|
|
89847
90000
|
);
|
|
89848
90001
|
}
|
|
89849
90002
|
Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
|
|
@@ -90476,7 +90629,7 @@ ${lanes.join("\n")}
|
|
|
90476
90629
|
return factory2.updateConstructorDeclaration(
|
|
90477
90630
|
node,
|
|
90478
90631
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90479
|
-
visitNodes2(node.parameters, visitor,
|
|
90632
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90480
90633
|
visitNode(node.body, visitor, isBlock)
|
|
90481
90634
|
);
|
|
90482
90635
|
}
|
|
@@ -90492,12 +90645,12 @@ ${lanes.join("\n")}
|
|
|
90492
90645
|
node,
|
|
90493
90646
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90494
90647
|
node.asteriskToken,
|
|
90495
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90648
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90496
90649
|
/*questionToken*/
|
|
90497
90650
|
void 0,
|
|
90498
90651
|
/*typeParameters*/
|
|
90499
90652
|
void 0,
|
|
90500
|
-
visitNodes2(node.parameters, visitor,
|
|
90653
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90501
90654
|
/*type*/
|
|
90502
90655
|
void 0,
|
|
90503
90656
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -90507,8 +90660,8 @@ ${lanes.join("\n")}
|
|
|
90507
90660
|
return finishClassElement(factory2.updateGetAccessorDeclaration(
|
|
90508
90661
|
node,
|
|
90509
90662
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90510
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90511
|
-
visitNodes2(node.parameters, visitor,
|
|
90663
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90664
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90512
90665
|
/*type*/
|
|
90513
90666
|
void 0,
|
|
90514
90667
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -90518,8 +90671,8 @@ ${lanes.join("\n")}
|
|
|
90518
90671
|
return finishClassElement(factory2.updateSetAccessorDeclaration(
|
|
90519
90672
|
node,
|
|
90520
90673
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90521
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90522
|
-
visitNodes2(node.parameters, visitor,
|
|
90674
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90675
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
90523
90676
|
visitNode(node.body, visitor, isBlock)
|
|
90524
90677
|
), node);
|
|
90525
90678
|
}
|
|
@@ -90530,7 +90683,7 @@ ${lanes.join("\n")}
|
|
|
90530
90683
|
return finishClassElement(factory2.updatePropertyDeclaration(
|
|
90531
90684
|
node,
|
|
90532
90685
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
90533
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
90686
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
90534
90687
|
/*questionOrExclamationToken*/
|
|
90535
90688
|
void 0,
|
|
90536
90689
|
/*type*/
|
|
@@ -90543,7 +90696,7 @@ ${lanes.join("\n")}
|
|
|
90543
90696
|
node,
|
|
90544
90697
|
elideNodes(factory2, node.modifiers),
|
|
90545
90698
|
node.dotDotDotToken,
|
|
90546
|
-
visitNode(node.name, visitor, isBindingName),
|
|
90699
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
90547
90700
|
/*questionToken*/
|
|
90548
90701
|
void 0,
|
|
90549
90702
|
/*type*/
|
|
@@ -90640,7 +90793,7 @@ ${lanes.join("\n")}
|
|
|
90640
90793
|
return expression;
|
|
90641
90794
|
}
|
|
90642
90795
|
function transformDecorator(decorator) {
|
|
90643
|
-
return visitNode(decorator.expression, visitor, isExpression);
|
|
90796
|
+
return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
|
|
90644
90797
|
}
|
|
90645
90798
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
90646
90799
|
let expressions;
|
|
@@ -90912,21 +91065,21 @@ ${lanes.join("\n")}
|
|
|
90912
91065
|
node.initializer,
|
|
90913
91066
|
/*hasReceiver*/
|
|
90914
91067
|
true
|
|
90915
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
90916
|
-
visitNode(node.expression, visitor, isExpression),
|
|
91068
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
91069
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
90917
91070
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
90918
91071
|
);
|
|
90919
91072
|
}
|
|
90920
91073
|
function visitForOfStatementInAsyncBody(node) {
|
|
90921
91074
|
return factory2.updateForOfStatement(
|
|
90922
91075
|
node,
|
|
90923
|
-
visitNode(node.awaitModifier, visitor,
|
|
91076
|
+
visitNode(node.awaitModifier, visitor, isAwaitKeyword),
|
|
90924
91077
|
isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
|
|
90925
91078
|
node.initializer,
|
|
90926
91079
|
/*hasReceiver*/
|
|
90927
91080
|
true
|
|
90928
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
90929
|
-
visitNode(node.expression, visitor, isExpression),
|
|
91081
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
91082
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
90930
91083
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
90931
91084
|
);
|
|
90932
91085
|
}
|
|
@@ -90963,7 +91116,7 @@ ${lanes.join("\n")}
|
|
|
90963
91116
|
function visitConstructorDeclaration(node) {
|
|
90964
91117
|
return factory2.updateConstructorDeclaration(
|
|
90965
91118
|
node,
|
|
90966
|
-
visitNodes2(node.modifiers, visitor,
|
|
91119
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
90967
91120
|
visitParameterList(node.parameters, visitor, context),
|
|
90968
91121
|
transformMethodBody(node)
|
|
90969
91122
|
);
|
|
@@ -91021,7 +91174,7 @@ ${lanes.join("\n")}
|
|
|
91021
91174
|
function visitFunctionExpression(node) {
|
|
91022
91175
|
return factory2.updateFunctionExpression(
|
|
91023
91176
|
node,
|
|
91024
|
-
visitNodes2(node.modifiers, visitor,
|
|
91177
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
91025
91178
|
node.asteriskToken,
|
|
91026
91179
|
node.name,
|
|
91027
91180
|
/*typeParameters*/
|
|
@@ -91035,7 +91188,7 @@ ${lanes.join("\n")}
|
|
|
91035
91188
|
function visitArrowFunction(node) {
|
|
91036
91189
|
return factory2.updateArrowFunction(
|
|
91037
91190
|
node,
|
|
91038
|
-
visitNodes2(node.modifiers, visitor,
|
|
91191
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
91039
91192
|
/*typeParameters*/
|
|
91040
91193
|
void 0,
|
|
91041
91194
|
visitParameterList(node.parameters, visitor, context),
|
|
@@ -91092,7 +91245,7 @@ ${lanes.join("\n")}
|
|
|
91092
91245
|
),
|
|
91093
91246
|
node
|
|
91094
91247
|
);
|
|
91095
|
-
return visitNode(converted, visitor, isExpression);
|
|
91248
|
+
return Debug.checkDefined(visitNode(converted, visitor, isExpression));
|
|
91096
91249
|
}
|
|
91097
91250
|
function collidesWithParameterName({ name }) {
|
|
91098
91251
|
if (isIdentifier(name)) {
|
|
@@ -91224,7 +91377,7 @@ ${lanes.join("\n")}
|
|
|
91224
91377
|
if (isBlock(body)) {
|
|
91225
91378
|
return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start));
|
|
91226
91379
|
} else {
|
|
91227
|
-
return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
|
|
91380
|
+
return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
|
|
91228
91381
|
}
|
|
91229
91382
|
}
|
|
91230
91383
|
function getPromiseConstructor(type) {
|
|
@@ -91585,7 +91738,7 @@ ${lanes.join("\n")}
|
|
|
91585
91738
|
return visitObjectLiteralExpression(node);
|
|
91586
91739
|
case 223 /* BinaryExpression */:
|
|
91587
91740
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
91588
|
-
case
|
|
91741
|
+
case 357 /* CommaListExpression */:
|
|
91589
91742
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
91590
91743
|
case 295 /* CatchClause */:
|
|
91591
91744
|
return visitCatchClause(node);
|
|
@@ -92343,7 +92496,7 @@ ${lanes.join("\n")}
|
|
|
92343
92496
|
/*questionToken*/
|
|
92344
92497
|
void 0,
|
|
92345
92498
|
visitor,
|
|
92346
|
-
|
|
92499
|
+
isQuestionToken
|
|
92347
92500
|
),
|
|
92348
92501
|
/*typeParameters*/
|
|
92349
92502
|
void 0,
|
|
@@ -93035,15 +93188,10 @@ ${lanes.join("\n")}
|
|
|
93035
93188
|
if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
|
|
93036
93189
|
return node;
|
|
93037
93190
|
}
|
|
93038
|
-
|
|
93039
|
-
|
|
93040
|
-
const binaryExpression = node;
|
|
93041
|
-
if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
|
|
93042
|
-
return transformLogicalAssignment(binaryExpression);
|
|
93043
|
-
}
|
|
93044
|
-
default:
|
|
93045
|
-
return visitEachChild(node, visitor, context);
|
|
93191
|
+
if (isLogicalOrCoalescingAssignmentExpression(node)) {
|
|
93192
|
+
return transformLogicalAssignment(node);
|
|
93046
93193
|
}
|
|
93194
|
+
return visitEachChild(node, visitor, context);
|
|
93047
93195
|
}
|
|
93048
93196
|
function transformLogicalAssignment(binaryExpression) {
|
|
93049
93197
|
const operator = binaryExpression.operatorToken;
|
|
@@ -93501,7 +93649,7 @@ ${lanes.join("\n")}
|
|
|
93501
93649
|
return element;
|
|
93502
93650
|
}
|
|
93503
93651
|
function transformJsxSpreadAttributeToSpreadAssignment(node) {
|
|
93504
|
-
return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
|
|
93652
|
+
return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
93505
93653
|
}
|
|
93506
93654
|
function transformJsxAttributesToObjectProps(attrs, children) {
|
|
93507
93655
|
const target = getEmitScriptTarget(compilerOptions);
|
|
@@ -93531,7 +93679,7 @@ ${lanes.join("\n")}
|
|
|
93531
93679
|
return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
93532
93680
|
}
|
|
93533
93681
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
93534
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
93682
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
93535
93683
|
}
|
|
93536
93684
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
93537
93685
|
const name = getAttributeName(node);
|
|
@@ -93551,7 +93699,7 @@ ${lanes.join("\n")}
|
|
|
93551
93699
|
if (node.expression === void 0) {
|
|
93552
93700
|
return factory2.createTrue();
|
|
93553
93701
|
}
|
|
93554
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
93702
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
93555
93703
|
}
|
|
93556
93704
|
if (isJsxElement(node)) {
|
|
93557
93705
|
return visitJsxElement(
|
|
@@ -94206,7 +94354,7 @@ ${lanes.join("\n")}
|
|
|
94206
94354
|
return visitParenthesizedExpression(node, expressionResultIsUnused2);
|
|
94207
94355
|
case 223 /* BinaryExpression */:
|
|
94208
94356
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
94209
|
-
case
|
|
94357
|
+
case 357 /* CommaListExpression */:
|
|
94210
94358
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
94211
94359
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
94212
94360
|
case 15 /* TemplateHead */:
|
|
@@ -94309,7 +94457,7 @@ ${lanes.join("\n")}
|
|
|
94309
94457
|
[
|
|
94310
94458
|
factory2.createPropertyAssignment(
|
|
94311
94459
|
factory2.createIdentifier("value"),
|
|
94312
|
-
node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
|
|
94460
|
+
node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
|
|
94313
94461
|
)
|
|
94314
94462
|
]
|
|
94315
94463
|
)
|
|
@@ -94480,7 +94628,7 @@ ${lanes.join("\n")}
|
|
|
94480
94628
|
outer,
|
|
94481
94629
|
/*typeArguments*/
|
|
94482
94630
|
void 0,
|
|
94483
|
-
extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
|
|
94631
|
+
extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
|
|
94484
94632
|
)
|
|
94485
94633
|
);
|
|
94486
94634
|
addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
|
|
@@ -94822,7 +94970,7 @@ ${lanes.join("\n")}
|
|
|
94822
94970
|
factory2.createExpressionStatement(
|
|
94823
94971
|
factory2.createAssignment(
|
|
94824
94972
|
factory2.getGeneratedNameForNode(parameter),
|
|
94825
|
-
visitNode(initializer, visitor, isExpression)
|
|
94973
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
94826
94974
|
)
|
|
94827
94975
|
),
|
|
94828
94976
|
2097152 /* CustomPrologue */
|
|
@@ -94833,7 +94981,7 @@ ${lanes.join("\n")}
|
|
|
94833
94981
|
return false;
|
|
94834
94982
|
}
|
|
94835
94983
|
function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
|
|
94836
|
-
initializer = visitNode(initializer, visitor, isExpression);
|
|
94984
|
+
initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
94837
94985
|
const statement = factory2.createIfStatement(
|
|
94838
94986
|
factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
|
|
94839
94987
|
setEmitFlags(
|
|
@@ -95109,6 +95257,7 @@ ${lanes.join("\n")}
|
|
|
95109
95257
|
container
|
|
95110
95258
|
);
|
|
95111
95259
|
const propertyName = visitNode(member.name, visitor, isPropertyName);
|
|
95260
|
+
Debug.assert(propertyName);
|
|
95112
95261
|
let e;
|
|
95113
95262
|
if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
95114
95263
|
const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
|
|
@@ -95152,6 +95301,7 @@ ${lanes.join("\n")}
|
|
|
95152
95301
|
setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
|
|
95153
95302
|
setSourceMapRange(target, firstAccessor.name);
|
|
95154
95303
|
const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
|
|
95304
|
+
Debug.assert(visitedAccessorName);
|
|
95155
95305
|
if (isPrivateIdentifier(visitedAccessorName)) {
|
|
95156
95306
|
return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
95157
95307
|
}
|
|
@@ -95424,9 +95574,9 @@ ${lanes.join("\n")}
|
|
|
95424
95574
|
if (node.operatorToken.kind === 27 /* CommaToken */) {
|
|
95425
95575
|
return factory2.updateBinaryExpression(
|
|
95426
95576
|
node,
|
|
95427
|
-
visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
|
|
95577
|
+
Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
|
|
95428
95578
|
node.operatorToken,
|
|
95429
|
-
visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
|
|
95579
|
+
Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
|
|
95430
95580
|
);
|
|
95431
95581
|
}
|
|
95432
95582
|
return visitEachChild(node, visitor, context);
|
|
@@ -95441,6 +95591,7 @@ ${lanes.join("\n")}
|
|
|
95441
95591
|
const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
|
|
95442
95592
|
if (result || visited !== element) {
|
|
95443
95593
|
result || (result = node.elements.slice(0, i));
|
|
95594
|
+
Debug.assert(visited);
|
|
95444
95595
|
result.push(visited);
|
|
95445
95596
|
}
|
|
95446
95597
|
}
|
|
@@ -95467,7 +95618,7 @@ ${lanes.join("\n")}
|
|
|
95467
95618
|
0 /* All */
|
|
95468
95619
|
);
|
|
95469
95620
|
} else {
|
|
95470
|
-
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
|
|
95621
|
+
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
|
|
95471
95622
|
setTextRange(assignment, decl);
|
|
95472
95623
|
}
|
|
95473
95624
|
assignments = append(assignments, assignment);
|
|
@@ -95489,7 +95640,7 @@ ${lanes.join("\n")}
|
|
|
95489
95640
|
if (node.flags & 3 /* BlockScoped */) {
|
|
95490
95641
|
enableSubstitutionsForBlockScopedBindings();
|
|
95491
95642
|
}
|
|
95492
|
-
const declarations =
|
|
95643
|
+
const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
|
|
95493
95644
|
const declarationList = factory2.createVariableDeclarationList(declarations);
|
|
95494
95645
|
setOriginalNode(declarationList, node);
|
|
95495
95646
|
setTextRange(declarationList, node);
|
|
@@ -95573,7 +95724,7 @@ ${lanes.join("\n")}
|
|
|
95573
95724
|
statement,
|
|
95574
95725
|
/*outermostLabeledStatement*/
|
|
95575
95726
|
node
|
|
95576
|
-
) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
|
|
95727
|
+
) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
|
|
95577
95728
|
}
|
|
95578
95729
|
function visitIterationStatement(node, outermostLabeledStatement) {
|
|
95579
95730
|
switch (node.kind) {
|
|
@@ -95616,7 +95767,7 @@ ${lanes.join("\n")}
|
|
|
95616
95767
|
visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
|
|
95617
95768
|
visitNode(node.condition, visitor, isExpression),
|
|
95618
95769
|
visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
|
|
95619
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
95770
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
95620
95771
|
);
|
|
95621
95772
|
}
|
|
95622
95773
|
function visitForInStatement(node, outermostLabeledStatement) {
|
|
@@ -95702,13 +95853,14 @@ ${lanes.join("\n")}
|
|
|
95702
95853
|
)));
|
|
95703
95854
|
} else {
|
|
95704
95855
|
setTextRangeEnd(assignment, initializer.end);
|
|
95705
|
-
statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
|
|
95856
|
+
statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
|
|
95706
95857
|
}
|
|
95707
95858
|
}
|
|
95708
95859
|
if (convertedLoopBodyStatements) {
|
|
95709
95860
|
return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
|
|
95710
95861
|
} else {
|
|
95711
95862
|
const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
|
|
95863
|
+
Debug.assert(statement);
|
|
95712
95864
|
if (isBlock(statement)) {
|
|
95713
95865
|
return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
|
|
95714
95866
|
} else {
|
|
@@ -95729,6 +95881,7 @@ ${lanes.join("\n")}
|
|
|
95729
95881
|
}
|
|
95730
95882
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
95731
95883
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
95884
|
+
Debug.assert(expression);
|
|
95732
95885
|
const counter = factory2.createLoopVariable();
|
|
95733
95886
|
const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
95734
95887
|
/*recordTempVariable*/
|
|
@@ -95788,6 +95941,7 @@ ${lanes.join("\n")}
|
|
|
95788
95941
|
}
|
|
95789
95942
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
95790
95943
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
95944
|
+
Debug.assert(expression);
|
|
95791
95945
|
const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
95792
95946
|
/*recordTempVariable*/
|
|
95793
95947
|
void 0
|
|
@@ -96045,7 +96199,7 @@ ${lanes.join("\n")}
|
|
|
96045
96199
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
96046
96200
|
}
|
|
96047
96201
|
} else {
|
|
96048
|
-
const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
|
|
96202
|
+
const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
|
|
96049
96203
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
96050
96204
|
}
|
|
96051
96205
|
statements.push(loop);
|
|
@@ -96083,16 +96237,16 @@ ${lanes.join("\n")}
|
|
|
96083
96237
|
node,
|
|
96084
96238
|
/*awaitModifier*/
|
|
96085
96239
|
void 0,
|
|
96086
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
96087
|
-
visitNode(node.expression, visitor, isExpression),
|
|
96240
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
96241
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
96088
96242
|
convertedLoopBody
|
|
96089
96243
|
);
|
|
96090
96244
|
}
|
|
96091
96245
|
function convertForInStatement(node, convertedLoopBody) {
|
|
96092
96246
|
return factory2.updateForInStatement(
|
|
96093
96247
|
node,
|
|
96094
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
96095
|
-
visitNode(node.expression, visitor, isExpression),
|
|
96248
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
96249
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
96096
96250
|
convertedLoopBody
|
|
96097
96251
|
);
|
|
96098
96252
|
}
|
|
@@ -96100,13 +96254,13 @@ ${lanes.join("\n")}
|
|
|
96100
96254
|
return factory2.updateDoStatement(
|
|
96101
96255
|
node,
|
|
96102
96256
|
convertedLoopBody,
|
|
96103
|
-
visitNode(node.expression, visitor, isExpression)
|
|
96257
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
96104
96258
|
);
|
|
96105
96259
|
}
|
|
96106
96260
|
function convertWhileStatement(node, convertedLoopBody) {
|
|
96107
96261
|
return factory2.updateWhileStatement(
|
|
96108
96262
|
node,
|
|
96109
|
-
visitNode(node.expression, visitor, isExpression),
|
|
96263
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
96110
96264
|
convertedLoopBody
|
|
96111
96265
|
);
|
|
96112
96266
|
}
|
|
@@ -96268,7 +96422,7 @@ ${lanes.join("\n")}
|
|
|
96268
96422
|
void 0,
|
|
96269
96423
|
/*type*/
|
|
96270
96424
|
void 0,
|
|
96271
|
-
visitNode(
|
|
96425
|
+
Debug.checkDefined(visitNode(
|
|
96272
96426
|
factory2.createBlock(
|
|
96273
96427
|
statements,
|
|
96274
96428
|
/*multiLine*/
|
|
@@ -96276,7 +96430,7 @@ ${lanes.join("\n")}
|
|
|
96276
96430
|
),
|
|
96277
96431
|
visitor,
|
|
96278
96432
|
isBlock
|
|
96279
|
-
)
|
|
96433
|
+
))
|
|
96280
96434
|
),
|
|
96281
96435
|
emitFlags
|
|
96282
96436
|
)
|
|
@@ -96299,7 +96453,7 @@ ${lanes.join("\n")}
|
|
|
96299
96453
|
if (node.incrementor) {
|
|
96300
96454
|
statements.push(factory2.createIfStatement(
|
|
96301
96455
|
currentState.conditionVariable,
|
|
96302
|
-
factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
|
|
96456
|
+
factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
|
|
96303
96457
|
factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
|
|
96304
96458
|
));
|
|
96305
96459
|
} else {
|
|
@@ -96310,11 +96464,12 @@ ${lanes.join("\n")}
|
|
|
96310
96464
|
}
|
|
96311
96465
|
if (shouldConvertConditionOfForStatement(node)) {
|
|
96312
96466
|
statements.push(factory2.createIfStatement(
|
|
96313
|
-
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
|
|
96314
|
-
visitNode(factory2.createBreakStatement(), visitor, isStatement)
|
|
96467
|
+
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
|
|
96468
|
+
Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
|
|
96315
96469
|
));
|
|
96316
96470
|
}
|
|
96317
96471
|
}
|
|
96472
|
+
Debug.assert(statement);
|
|
96318
96473
|
if (isBlock(statement)) {
|
|
96319
96474
|
addRange(statements, statement.statements);
|
|
96320
96475
|
} else {
|
|
@@ -96582,9 +96737,9 @@ ${lanes.join("\n")}
|
|
|
96582
96737
|
createMemberAccessForPropertyName(
|
|
96583
96738
|
factory2,
|
|
96584
96739
|
receiver,
|
|
96585
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
96740
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
96586
96741
|
),
|
|
96587
|
-
visitNode(property.initializer, visitor, isExpression)
|
|
96742
|
+
Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
|
|
96588
96743
|
);
|
|
96589
96744
|
setTextRange(expression, property);
|
|
96590
96745
|
if (startsOnNewLine) {
|
|
@@ -96597,7 +96752,7 @@ ${lanes.join("\n")}
|
|
|
96597
96752
|
createMemberAccessForPropertyName(
|
|
96598
96753
|
factory2,
|
|
96599
96754
|
receiver,
|
|
96600
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
96755
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
96601
96756
|
),
|
|
96602
96757
|
factory2.cloneNode(property.name)
|
|
96603
96758
|
);
|
|
@@ -96612,7 +96767,7 @@ ${lanes.join("\n")}
|
|
|
96612
96767
|
createMemberAccessForPropertyName(
|
|
96613
96768
|
factory2,
|
|
96614
96769
|
receiver,
|
|
96615
|
-
visitNode(method.name, visitor, isPropertyName)
|
|
96770
|
+
Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
|
|
96616
96771
|
),
|
|
96617
96772
|
transformFunctionLikeToExpression(
|
|
96618
96773
|
method,
|
|
@@ -96746,7 +96901,7 @@ ${lanes.join("\n")}
|
|
|
96746
96901
|
}
|
|
96747
96902
|
return factory2.updateCallExpression(
|
|
96748
96903
|
node,
|
|
96749
|
-
visitNode(node.expression, callExpressionVisitor, isExpression),
|
|
96904
|
+
Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
|
|
96750
96905
|
/*typeArguments*/
|
|
96751
96906
|
void 0,
|
|
96752
96907
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -96858,8 +97013,8 @@ ${lanes.join("\n")}
|
|
|
96858
97013
|
let resultingCall;
|
|
96859
97014
|
if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
|
|
96860
97015
|
resultingCall = factory2.createFunctionApplyCall(
|
|
96861
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
96862
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
97016
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
97017
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
96863
97018
|
transformAndSpreadElements(
|
|
96864
97019
|
node.arguments,
|
|
96865
97020
|
/*isArgumentList*/
|
|
@@ -96873,8 +97028,8 @@ ${lanes.join("\n")}
|
|
|
96873
97028
|
} else {
|
|
96874
97029
|
resultingCall = setTextRange(
|
|
96875
97030
|
factory2.createFunctionCallCall(
|
|
96876
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
96877
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
97031
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
97032
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
96878
97033
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
96879
97034
|
),
|
|
96880
97035
|
node
|
|
@@ -96896,7 +97051,7 @@ ${lanes.join("\n")}
|
|
|
96896
97051
|
const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
|
|
96897
97052
|
return factory2.createNewExpression(
|
|
96898
97053
|
factory2.createFunctionApplyCall(
|
|
96899
|
-
visitNode(target, visitor, isExpression),
|
|
97054
|
+
Debug.checkDefined(visitNode(target, visitor, isExpression)),
|
|
96900
97055
|
thisArg,
|
|
96901
97056
|
transformAndSpreadElements(
|
|
96902
97057
|
factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
|
|
@@ -96953,7 +97108,9 @@ ${lanes.join("\n")}
|
|
|
96953
97108
|
return map(chunk, visitExpressionOfSpread);
|
|
96954
97109
|
}
|
|
96955
97110
|
function visitExpressionOfSpread(node) {
|
|
97111
|
+
Debug.assertNode(node, isSpreadElement);
|
|
96956
97112
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
97113
|
+
Debug.assert(expression);
|
|
96957
97114
|
const isCallToReadHelper = isCallToHelper(expression, "___read");
|
|
96958
97115
|
let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
|
|
96959
97116
|
if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -97004,7 +97161,7 @@ ${lanes.join("\n")}
|
|
|
97004
97161
|
function visitTemplateExpression(node) {
|
|
97005
97162
|
let expression = factory2.createStringLiteral(node.head.text);
|
|
97006
97163
|
for (const span of node.templateSpans) {
|
|
97007
|
-
const args = [visitNode(span.expression, visitor, isExpression)];
|
|
97164
|
+
const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
|
|
97008
97165
|
if (span.literal.text.length > 0) {
|
|
97009
97166
|
args.push(factory2.createStringLiteral(span.literal.text));
|
|
97010
97167
|
}
|
|
@@ -97370,7 +97527,7 @@ ${lanes.join("\n")}
|
|
|
97370
97527
|
switch (node.kind) {
|
|
97371
97528
|
case 223 /* BinaryExpression */:
|
|
97372
97529
|
return visitBinaryExpression(node);
|
|
97373
|
-
case
|
|
97530
|
+
case 357 /* CommaListExpression */:
|
|
97374
97531
|
return visitCommaListExpression(node);
|
|
97375
97532
|
case 224 /* ConditionalExpression */:
|
|
97376
97533
|
return visitConditionalExpression(node);
|
|
@@ -97582,19 +97739,19 @@ ${lanes.join("\n")}
|
|
|
97582
97739
|
case 208 /* PropertyAccessExpression */:
|
|
97583
97740
|
target = factory2.updatePropertyAccessExpression(
|
|
97584
97741
|
left,
|
|
97585
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
97742
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
97586
97743
|
left.name
|
|
97587
97744
|
);
|
|
97588
97745
|
break;
|
|
97589
97746
|
case 209 /* ElementAccessExpression */:
|
|
97590
97747
|
target = factory2.updateElementAccessExpression(
|
|
97591
97748
|
left,
|
|
97592
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
97593
|
-
cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
|
|
97749
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
97750
|
+
cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
|
|
97594
97751
|
);
|
|
97595
97752
|
break;
|
|
97596
97753
|
default:
|
|
97597
|
-
target = visitNode(left, visitor, isExpression);
|
|
97754
|
+
target = Debug.checkDefined(visitNode(left, visitor, isExpression));
|
|
97598
97755
|
break;
|
|
97599
97756
|
}
|
|
97600
97757
|
const operator = node.operatorToken.kind;
|
|
@@ -97606,7 +97763,7 @@ ${lanes.join("\n")}
|
|
|
97606
97763
|
factory2.createBinaryExpression(
|
|
97607
97764
|
cacheExpression(target),
|
|
97608
97765
|
getNonAssignmentOperatorForCompoundAssignment(operator),
|
|
97609
|
-
visitNode(right, visitor, isExpression)
|
|
97766
|
+
Debug.checkDefined(visitNode(right, visitor, isExpression))
|
|
97610
97767
|
),
|
|
97611
97768
|
node
|
|
97612
97769
|
)
|
|
@@ -97614,7 +97771,7 @@ ${lanes.join("\n")}
|
|
|
97614
97771
|
node
|
|
97615
97772
|
);
|
|
97616
97773
|
} else {
|
|
97617
|
-
return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
|
|
97774
|
+
return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
|
|
97618
97775
|
}
|
|
97619
97776
|
}
|
|
97620
97777
|
return visitEachChild(node, visitor, context);
|
|
@@ -97628,9 +97785,9 @@ ${lanes.join("\n")}
|
|
|
97628
97785
|
}
|
|
97629
97786
|
return factory2.updateBinaryExpression(
|
|
97630
97787
|
node,
|
|
97631
|
-
cacheExpression(visitNode(node.left, visitor, isExpression)),
|
|
97788
|
+
cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
|
|
97632
97789
|
node.operatorToken,
|
|
97633
|
-
visitNode(node.right, visitor, isExpression)
|
|
97790
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
97634
97791
|
);
|
|
97635
97792
|
}
|
|
97636
97793
|
return visitEachChild(node, visitor, context);
|
|
@@ -97649,7 +97806,7 @@ ${lanes.join("\n")}
|
|
|
97649
97806
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
97650
97807
|
pendingExpressions = [];
|
|
97651
97808
|
}
|
|
97652
|
-
pendingExpressions.push(visitNode(node2, visitor, isExpression));
|
|
97809
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
|
|
97653
97810
|
}
|
|
97654
97811
|
}
|
|
97655
97812
|
}
|
|
@@ -97663,7 +97820,7 @@ ${lanes.join("\n")}
|
|
|
97663
97820
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
97664
97821
|
pendingExpressions = [];
|
|
97665
97822
|
}
|
|
97666
|
-
pendingExpressions.push(visitNode(elem, visitor, isExpression));
|
|
97823
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
|
|
97667
97824
|
}
|
|
97668
97825
|
}
|
|
97669
97826
|
return factory2.inlineExpressions(pendingExpressions);
|
|
@@ -97673,7 +97830,7 @@ ${lanes.join("\n")}
|
|
|
97673
97830
|
const resultLocal = declareLocal();
|
|
97674
97831
|
emitAssignment(
|
|
97675
97832
|
resultLocal,
|
|
97676
|
-
visitNode(node.left, visitor, isExpression),
|
|
97833
|
+
Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
|
|
97677
97834
|
/*location*/
|
|
97678
97835
|
node.left
|
|
97679
97836
|
);
|
|
@@ -97694,7 +97851,7 @@ ${lanes.join("\n")}
|
|
|
97694
97851
|
}
|
|
97695
97852
|
emitAssignment(
|
|
97696
97853
|
resultLocal,
|
|
97697
|
-
visitNode(node.right, visitor, isExpression),
|
|
97854
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
|
|
97698
97855
|
/*location*/
|
|
97699
97856
|
node.right
|
|
97700
97857
|
);
|
|
@@ -97708,13 +97865,13 @@ ${lanes.join("\n")}
|
|
|
97708
97865
|
const resultLocal = declareLocal();
|
|
97709
97866
|
emitBreakWhenFalse(
|
|
97710
97867
|
whenFalseLabel,
|
|
97711
|
-
visitNode(node.condition, visitor, isExpression),
|
|
97868
|
+
Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
|
|
97712
97869
|
/*location*/
|
|
97713
97870
|
node.condition
|
|
97714
97871
|
);
|
|
97715
97872
|
emitAssignment(
|
|
97716
97873
|
resultLocal,
|
|
97717
|
-
visitNode(node.whenTrue, visitor, isExpression),
|
|
97874
|
+
Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
|
|
97718
97875
|
/*location*/
|
|
97719
97876
|
node.whenTrue
|
|
97720
97877
|
);
|
|
@@ -97722,7 +97879,7 @@ ${lanes.join("\n")}
|
|
|
97722
97879
|
markLabel(whenFalseLabel);
|
|
97723
97880
|
emitAssignment(
|
|
97724
97881
|
resultLocal,
|
|
97725
|
-
visitNode(node.whenFalse, visitor, isExpression),
|
|
97882
|
+
Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
|
|
97726
97883
|
/*location*/
|
|
97727
97884
|
node.whenFalse
|
|
97728
97885
|
);
|
|
@@ -97802,7 +97959,7 @@ ${lanes.join("\n")}
|
|
|
97802
97959
|
leadingElement = void 0;
|
|
97803
97960
|
expressions2 = [];
|
|
97804
97961
|
}
|
|
97805
|
-
expressions2.push(visitNode(element, visitor, isExpression));
|
|
97962
|
+
expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
|
|
97806
97963
|
return expressions2;
|
|
97807
97964
|
}
|
|
97808
97965
|
}
|
|
@@ -97841,8 +97998,8 @@ ${lanes.join("\n")}
|
|
|
97841
97998
|
if (containsYield(node.argumentExpression)) {
|
|
97842
97999
|
return factory2.updateElementAccessExpression(
|
|
97843
98000
|
node,
|
|
97844
|
-
cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
97845
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
98001
|
+
cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
|
|
98002
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
97846
98003
|
);
|
|
97847
98004
|
}
|
|
97848
98005
|
return visitEachChild(node, visitor, context);
|
|
@@ -97859,7 +98016,7 @@ ${lanes.join("\n")}
|
|
|
97859
98016
|
return setOriginalNode(
|
|
97860
98017
|
setTextRange(
|
|
97861
98018
|
factory2.createFunctionApplyCall(
|
|
97862
|
-
cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
|
|
98019
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
|
|
97863
98020
|
thisArg,
|
|
97864
98021
|
visitElements(node.arguments)
|
|
97865
98022
|
),
|
|
@@ -97877,7 +98034,7 @@ ${lanes.join("\n")}
|
|
|
97877
98034
|
setTextRange(
|
|
97878
98035
|
factory2.createNewExpression(
|
|
97879
98036
|
factory2.createFunctionApplyCall(
|
|
97880
|
-
cacheExpression(visitNode(target, visitor, isExpression)),
|
|
98037
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
|
|
97881
98038
|
thisArg,
|
|
97882
98039
|
visitElements(
|
|
97883
98040
|
node.arguments,
|
|
@@ -97993,7 +98150,7 @@ ${lanes.join("\n")}
|
|
|
97993
98150
|
return setSourceMapRange(
|
|
97994
98151
|
factory2.createAssignment(
|
|
97995
98152
|
setSourceMapRange(factory2.cloneNode(node.name), node.name),
|
|
97996
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
98153
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
97997
98154
|
),
|
|
97998
98155
|
node
|
|
97999
98156
|
);
|
|
@@ -98005,7 +98162,7 @@ ${lanes.join("\n")}
|
|
|
98005
98162
|
const elseLabel = node.elseStatement ? defineLabel() : void 0;
|
|
98006
98163
|
emitBreakWhenFalse(
|
|
98007
98164
|
node.elseStatement ? elseLabel : endLabel,
|
|
98008
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98165
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98009
98166
|
/*location*/
|
|
98010
98167
|
node.expression
|
|
98011
98168
|
);
|
|
@@ -98034,7 +98191,7 @@ ${lanes.join("\n")}
|
|
|
98034
98191
|
markLabel(loopLabel);
|
|
98035
98192
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98036
98193
|
markLabel(conditionLabel);
|
|
98037
|
-
emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
|
|
98194
|
+
emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98038
98195
|
endLoopBlock();
|
|
98039
98196
|
} else {
|
|
98040
98197
|
emitStatement(visitNode(node, visitor, isStatement));
|
|
@@ -98055,7 +98212,7 @@ ${lanes.join("\n")}
|
|
|
98055
98212
|
const loopLabel = defineLabel();
|
|
98056
98213
|
const endLabel = beginLoopBlock(loopLabel);
|
|
98057
98214
|
markLabel(loopLabel);
|
|
98058
|
-
emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
|
|
98215
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98059
98216
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98060
98217
|
emitBreak(loopLabel);
|
|
98061
98218
|
endLoopBlock();
|
|
@@ -98086,7 +98243,7 @@ ${lanes.join("\n")}
|
|
|
98086
98243
|
emitStatement(
|
|
98087
98244
|
setTextRange(
|
|
98088
98245
|
factory2.createExpressionStatement(
|
|
98089
|
-
visitNode(initializer, visitor, isExpression)
|
|
98246
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
98090
98247
|
),
|
|
98091
98248
|
initializer
|
|
98092
98249
|
)
|
|
@@ -98095,7 +98252,7 @@ ${lanes.join("\n")}
|
|
|
98095
98252
|
}
|
|
98096
98253
|
markLabel(conditionLabel);
|
|
98097
98254
|
if (node.condition) {
|
|
98098
|
-
emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
|
|
98255
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
|
|
98099
98256
|
}
|
|
98100
98257
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98101
98258
|
markLabel(incrementLabel);
|
|
@@ -98103,7 +98260,7 @@ ${lanes.join("\n")}
|
|
|
98103
98260
|
emitStatement(
|
|
98104
98261
|
setTextRange(
|
|
98105
98262
|
factory2.createExpressionStatement(
|
|
98106
|
-
visitNode(node.incrementor, visitor, isExpression)
|
|
98263
|
+
Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
|
|
98107
98264
|
),
|
|
98108
98265
|
node.incrementor
|
|
98109
98266
|
)
|
|
@@ -98148,7 +98305,7 @@ ${lanes.join("\n")}
|
|
|
98148
98305
|
const keysIndex = factory2.createLoopVariable();
|
|
98149
98306
|
const initializer = node.initializer;
|
|
98150
98307
|
hoistVariableDeclaration(keysIndex);
|
|
98151
|
-
emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
|
|
98308
|
+
emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98152
98309
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
98153
98310
|
emitStatement(
|
|
98154
98311
|
factory2.createForInStatement(
|
|
@@ -98179,7 +98336,7 @@ ${lanes.join("\n")}
|
|
|
98179
98336
|
}
|
|
98180
98337
|
variable = factory2.cloneNode(initializer.declarations[0].name);
|
|
98181
98338
|
} else {
|
|
98182
|
-
variable = visitNode(initializer, visitor, isExpression);
|
|
98339
|
+
variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
98183
98340
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
98184
98341
|
}
|
|
98185
98342
|
emitAssignment(variable, key);
|
|
@@ -98204,8 +98361,8 @@ ${lanes.join("\n")}
|
|
|
98204
98361
|
node = factory2.updateForInStatement(
|
|
98205
98362
|
node,
|
|
98206
98363
|
initializer.declarations[0].name,
|
|
98207
|
-
visitNode(node.expression, visitor, isExpression),
|
|
98208
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
98364
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
98365
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
98209
98366
|
);
|
|
98210
98367
|
} else {
|
|
98211
98368
|
node = visitEachChild(node, visitor, context);
|
|
@@ -98281,7 +98438,7 @@ ${lanes.join("\n")}
|
|
|
98281
98438
|
}
|
|
98282
98439
|
function transformAndEmitWithStatement(node) {
|
|
98283
98440
|
if (containsYield(node)) {
|
|
98284
|
-
beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
|
|
98441
|
+
beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
98285
98442
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
98286
98443
|
endWithBlock();
|
|
98287
98444
|
} else {
|
|
@@ -98293,7 +98450,7 @@ ${lanes.join("\n")}
|
|
|
98293
98450
|
const caseBlock = node.caseBlock;
|
|
98294
98451
|
const numClauses = caseBlock.clauses.length;
|
|
98295
98452
|
const endLabel = beginSwitchBlock();
|
|
98296
|
-
const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
|
|
98453
|
+
const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
98297
98454
|
const clauseLabels = [];
|
|
98298
98455
|
let defaultClauseIndex = -1;
|
|
98299
98456
|
for (let i = 0; i < numClauses; i++) {
|
|
@@ -98315,7 +98472,7 @@ ${lanes.join("\n")}
|
|
|
98315
98472
|
}
|
|
98316
98473
|
pendingClauses.push(
|
|
98317
98474
|
factory2.createCaseClause(
|
|
98318
|
-
visitNode(clause.expression, visitor, isExpression),
|
|
98475
|
+
Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
|
|
98319
98476
|
[
|
|
98320
98477
|
createInlineBreak(
|
|
98321
98478
|
clauseLabels[i],
|
|
@@ -98385,7 +98542,7 @@ ${lanes.join("\n")}
|
|
|
98385
98542
|
function transformAndEmitThrowStatement(node) {
|
|
98386
98543
|
var _a2;
|
|
98387
98544
|
emitThrow(
|
|
98388
|
-
visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
|
|
98545
|
+
Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
|
|
98389
98546
|
/*location*/
|
|
98390
98547
|
node
|
|
98391
98548
|
);
|
|
@@ -99675,7 +99832,7 @@ ${lanes.join("\n")}
|
|
|
99675
99832
|
}
|
|
99676
99833
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
99677
99834
|
if (currentModuleInfo.exportEquals) {
|
|
99678
|
-
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
99835
|
+
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
|
|
99679
99836
|
if (expressionResult) {
|
|
99680
99837
|
if (emitAsReturn) {
|
|
99681
99838
|
const statement = factory2.createReturnStatement(expressionResult);
|
|
@@ -99715,9 +99872,9 @@ ${lanes.join("\n")}
|
|
|
99715
99872
|
return visitFunctionDeclaration(node);
|
|
99716
99873
|
case 260 /* ClassDeclaration */:
|
|
99717
99874
|
return visitClassDeclaration(node);
|
|
99718
|
-
case
|
|
99875
|
+
case 358 /* MergeDeclarationMarker */:
|
|
99719
99876
|
return visitMergeDeclarationMarker(node);
|
|
99720
|
-
case
|
|
99877
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
99721
99878
|
return visitEndOfDeclarationMarker(node);
|
|
99722
99879
|
default:
|
|
99723
99880
|
return visitor(node);
|
|
@@ -99734,7 +99891,7 @@ ${lanes.join("\n")}
|
|
|
99734
99891
|
return visitExpressionStatement(node);
|
|
99735
99892
|
case 214 /* ParenthesizedExpression */:
|
|
99736
99893
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
99737
|
-
case
|
|
99894
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
99738
99895
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
99739
99896
|
case 210 /* CallExpression */:
|
|
99740
99897
|
if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
|
|
@@ -99870,7 +100027,7 @@ ${lanes.join("\n")}
|
|
|
99870
100027
|
}
|
|
99871
100028
|
function visitImportCallExpression(node) {
|
|
99872
100029
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
99873
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
100030
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
99874
100031
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
99875
100032
|
const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
|
|
99876
100033
|
switch (compilerOptions.module) {
|
|
@@ -100399,7 +100556,7 @@ ${lanes.join("\n")}
|
|
|
100399
100556
|
deferredExports[id] = appendExportStatement(
|
|
100400
100557
|
deferredExports[id],
|
|
100401
100558
|
factory2.createIdentifier("default"),
|
|
100402
|
-
visitNode(node.expression, visitor),
|
|
100559
|
+
visitNode(node.expression, visitor, isExpression),
|
|
100403
100560
|
/*location*/
|
|
100404
100561
|
node,
|
|
100405
100562
|
/*allowComments*/
|
|
@@ -100409,7 +100566,7 @@ ${lanes.join("\n")}
|
|
|
100409
100566
|
statements = appendExportStatement(
|
|
100410
100567
|
statements,
|
|
100411
100568
|
factory2.createIdentifier("default"),
|
|
100412
|
-
visitNode(node.expression, visitor),
|
|
100569
|
+
visitNode(node.expression, visitor, isExpression),
|
|
100413
100570
|
/*location*/
|
|
100414
100571
|
node,
|
|
100415
100572
|
/*allowComments*/
|
|
@@ -100437,7 +100594,7 @@ ${lanes.join("\n")}
|
|
|
100437
100594
|
),
|
|
100438
100595
|
/*typeParameters*/
|
|
100439
100596
|
void 0,
|
|
100440
|
-
visitNodes2(node.parameters, visitor),
|
|
100597
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
100441
100598
|
/*type*/
|
|
100442
100599
|
void 0,
|
|
100443
100600
|
visitEachChild(node.body, visitor, context)
|
|
@@ -100478,8 +100635,8 @@ ${lanes.join("\n")}
|
|
|
100478
100635
|
),
|
|
100479
100636
|
/*typeParameters*/
|
|
100480
100637
|
void 0,
|
|
100481
|
-
visitNodes2(node.heritageClauses, visitor),
|
|
100482
|
-
visitNodes2(node.members, visitor)
|
|
100638
|
+
visitNodes2(node.heritageClauses, visitor, isHeritageClause),
|
|
100639
|
+
visitNodes2(node.members, visitor, isClassElement)
|
|
100483
100640
|
),
|
|
100484
100641
|
node
|
|
100485
100642
|
),
|
|
@@ -100527,7 +100684,7 @@ ${lanes.join("\n")}
|
|
|
100527
100684
|
variable.name,
|
|
100528
100685
|
variable.exclamationToken,
|
|
100529
100686
|
variable.type,
|
|
100530
|
-
visitNode(variable.initializer, visitor)
|
|
100687
|
+
visitNode(variable.initializer, visitor, isExpression)
|
|
100531
100688
|
);
|
|
100532
100689
|
variables = append(variables, updatedVariable);
|
|
100533
100690
|
expressions = append(expressions, expression);
|
|
@@ -100578,9 +100735,8 @@ ${lanes.join("\n")}
|
|
|
100578
100735
|
function transformInitializedVariable(node) {
|
|
100579
100736
|
if (isBindingPattern(node.name)) {
|
|
100580
100737
|
return flattenDestructuringAssignment(
|
|
100581
|
-
visitNode(node, visitor),
|
|
100582
|
-
|
|
100583
|
-
void 0,
|
|
100738
|
+
visitNode(node, visitor, isInitializedVariable),
|
|
100739
|
+
visitor,
|
|
100584
100740
|
context,
|
|
100585
100741
|
0 /* All */,
|
|
100586
100742
|
/*needsValue*/
|
|
@@ -100597,7 +100753,7 @@ ${lanes.join("\n")}
|
|
|
100597
100753
|
/*location*/
|
|
100598
100754
|
node.name
|
|
100599
100755
|
),
|
|
100600
|
-
node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
|
|
100756
|
+
node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
|
|
100601
100757
|
);
|
|
100602
100758
|
}
|
|
100603
100759
|
}
|
|
@@ -101547,7 +101703,7 @@ ${lanes.join("\n")}
|
|
|
101547
101703
|
),
|
|
101548
101704
|
/*typeParameters*/
|
|
101549
101705
|
void 0,
|
|
101550
|
-
visitNodes2(node.parameters, visitor,
|
|
101706
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
101551
101707
|
/*type*/
|
|
101552
101708
|
void 0,
|
|
101553
101709
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -101857,9 +102013,9 @@ ${lanes.join("\n")}
|
|
|
101857
102013
|
return visitCatchClause(node);
|
|
101858
102014
|
case 238 /* Block */:
|
|
101859
102015
|
return visitBlock(node);
|
|
101860
|
-
case
|
|
102016
|
+
case 358 /* MergeDeclarationMarker */:
|
|
101861
102017
|
return visitMergeDeclarationMarker(node);
|
|
101862
|
-
case
|
|
102018
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
101863
102019
|
return visitEndOfDeclarationMarker(node);
|
|
101864
102020
|
default:
|
|
101865
102021
|
return visitor(node);
|
|
@@ -101921,7 +102077,7 @@ ${lanes.join("\n")}
|
|
|
101921
102077
|
}
|
|
101922
102078
|
return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
|
|
101923
102079
|
} else {
|
|
101924
|
-
return visitNode(node, discardedValueVisitor,
|
|
102080
|
+
return visitNode(node, discardedValueVisitor, isForInitializer);
|
|
101925
102081
|
}
|
|
101926
102082
|
}
|
|
101927
102083
|
function visitDoStatement(node) {
|
|
@@ -101942,21 +102098,21 @@ ${lanes.join("\n")}
|
|
|
101942
102098
|
return factory2.updateLabeledStatement(
|
|
101943
102099
|
node,
|
|
101944
102100
|
node.label,
|
|
101945
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
102101
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
101946
102102
|
);
|
|
101947
102103
|
}
|
|
101948
102104
|
function visitWithStatement(node) {
|
|
101949
102105
|
return factory2.updateWithStatement(
|
|
101950
102106
|
node,
|
|
101951
102107
|
visitNode(node.expression, visitor, isExpression),
|
|
101952
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
102108
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
101953
102109
|
);
|
|
101954
102110
|
}
|
|
101955
102111
|
function visitSwitchStatement(node) {
|
|
101956
102112
|
return factory2.updateSwitchStatement(
|
|
101957
102113
|
node,
|
|
101958
102114
|
visitNode(node.expression, visitor, isExpression),
|
|
101959
|
-
visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
|
|
102115
|
+
Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
|
|
101960
102116
|
);
|
|
101961
102117
|
}
|
|
101962
102118
|
function visitCaseBlock(node) {
|
|
@@ -101988,7 +102144,7 @@ ${lanes.join("\n")}
|
|
|
101988
102144
|
node = factory2.updateCatchClause(
|
|
101989
102145
|
node,
|
|
101990
102146
|
node.variableDeclaration,
|
|
101991
|
-
visitNode(node.block, topLevelNestedVisitor, isBlock)
|
|
102147
|
+
Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
|
|
101992
102148
|
);
|
|
101993
102149
|
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
|
|
101994
102150
|
return node;
|
|
@@ -102015,7 +102171,7 @@ ${lanes.join("\n")}
|
|
|
102015
102171
|
return visitExpressionStatement(node);
|
|
102016
102172
|
case 214 /* ParenthesizedExpression */:
|
|
102017
102173
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
102018
|
-
case
|
|
102174
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
102019
102175
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
102020
102176
|
case 223 /* BinaryExpression */:
|
|
102021
102177
|
if (isDestructuringAssignment(node)) {
|
|
@@ -102058,7 +102214,7 @@ ${lanes.join("\n")}
|
|
|
102058
102214
|
}
|
|
102059
102215
|
function visitImportCallExpression(node) {
|
|
102060
102216
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
102061
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
102217
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
102062
102218
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
102063
102219
|
return factory2.createCallExpression(
|
|
102064
102220
|
factory2.createPropertyAccessExpression(
|
|
@@ -103202,7 +103358,7 @@ ${lanes.join("\n")}
|
|
|
103202
103358
|
sourceFile,
|
|
103203
103359
|
/*bundled*/
|
|
103204
103360
|
true
|
|
103205
|
-
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
103361
|
+
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
103206
103362
|
const newFile = factory2.updateSourceFile(
|
|
103207
103363
|
sourceFile,
|
|
103208
103364
|
[factory2.createModuleDeclaration(
|
|
@@ -103224,7 +103380,7 @@ ${lanes.join("\n")}
|
|
|
103224
103380
|
return newFile;
|
|
103225
103381
|
}
|
|
103226
103382
|
needsDeclare = true;
|
|
103227
|
-
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
103383
|
+
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
103228
103384
|
return factory2.updateSourceFile(
|
|
103229
103385
|
sourceFile,
|
|
103230
103386
|
transformAndReplaceLatePaintedStatements(updated2),
|
|
@@ -103293,7 +103449,7 @@ ${lanes.join("\n")}
|
|
|
103293
103449
|
refs.forEach(referenceVisitor);
|
|
103294
103450
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
103295
103451
|
} else {
|
|
103296
|
-
const statements = visitNodes2(node.statements, visitDeclarationStatements);
|
|
103452
|
+
const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
|
|
103297
103453
|
combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
103298
103454
|
refs.forEach(referenceVisitor);
|
|
103299
103455
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
@@ -103410,9 +103566,9 @@ ${lanes.join("\n")}
|
|
|
103410
103566
|
return name;
|
|
103411
103567
|
} else {
|
|
103412
103568
|
if (name.kind === 204 /* ArrayBindingPattern */) {
|
|
103413
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
103569
|
+
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
|
|
103414
103570
|
} else {
|
|
103415
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
103571
|
+
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
|
|
103416
103572
|
}
|
|
103417
103573
|
}
|
|
103418
103574
|
function visitBindingElement(elem) {
|
|
@@ -103482,10 +103638,10 @@ ${lanes.join("\n")}
|
|
|
103482
103638
|
}
|
|
103483
103639
|
const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
|
|
103484
103640
|
if (type && !shouldUseResolverType) {
|
|
103485
|
-
return visitNode(type, visitDeclarationSubtree);
|
|
103641
|
+
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
103486
103642
|
}
|
|
103487
103643
|
if (!getParseTreeNode(node)) {
|
|
103488
|
-
return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
103644
|
+
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
103489
103645
|
}
|
|
103490
103646
|
if (node.kind === 175 /* SetAccessor */) {
|
|
103491
103647
|
return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
@@ -103599,7 +103755,7 @@ ${lanes.join("\n")}
|
|
|
103599
103755
|
return factory2.createNodeArray(newParams || emptyArray);
|
|
103600
103756
|
}
|
|
103601
103757
|
function ensureTypeParams(node, params) {
|
|
103602
|
-
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
|
|
103758
|
+
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
|
|
103603
103759
|
}
|
|
103604
103760
|
function isEnclosingDeclaration(node) {
|
|
103605
103761
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
@@ -103734,7 +103890,7 @@ ${lanes.join("\n")}
|
|
|
103734
103890
|
needsDeclare = priorNeedsDeclare;
|
|
103735
103891
|
lateStatementReplacementMap.set(getOriginalNodeId(i), result);
|
|
103736
103892
|
}
|
|
103737
|
-
return visitNodes2(statements, visitLateVisibilityMarkedStatements);
|
|
103893
|
+
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
103738
103894
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
103739
103895
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
103740
103896
|
const key = getOriginalNodeId(statement);
|
|
@@ -103948,7 +104104,7 @@ ${lanes.join("\n")}
|
|
|
103948
104104
|
input,
|
|
103949
104105
|
ensureModifiers(input),
|
|
103950
104106
|
updateParamsList(input, input.parameters),
|
|
103951
|
-
visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
104107
|
+
visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
103952
104108
|
));
|
|
103953
104109
|
}
|
|
103954
104110
|
case 257 /* VariableDeclaration */: {
|
|
@@ -103981,20 +104137,24 @@ ${lanes.join("\n")}
|
|
|
103981
104137
|
return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
|
|
103982
104138
|
}
|
|
103983
104139
|
case 191 /* ConditionalType */: {
|
|
103984
|
-
const checkType = visitNode(input.checkType, visitDeclarationSubtree);
|
|
103985
|
-
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
|
|
104140
|
+
const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
|
|
104141
|
+
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
|
|
103986
104142
|
const oldEnclosingDecl = enclosingDeclaration;
|
|
103987
104143
|
enclosingDeclaration = input.trueType;
|
|
103988
|
-
const trueType = visitNode(input.trueType, visitDeclarationSubtree);
|
|
104144
|
+
const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
|
|
103989
104145
|
enclosingDeclaration = oldEnclosingDecl;
|
|
103990
|
-
const falseType = visitNode(input.falseType, visitDeclarationSubtree);
|
|
104146
|
+
const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
|
|
104147
|
+
Debug.assert(checkType);
|
|
104148
|
+
Debug.assert(extendsType);
|
|
104149
|
+
Debug.assert(trueType);
|
|
104150
|
+
Debug.assert(falseType);
|
|
103991
104151
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
103992
104152
|
}
|
|
103993
104153
|
case 181 /* FunctionType */: {
|
|
103994
|
-
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
104154
|
+
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
103995
104155
|
}
|
|
103996
104156
|
case 182 /* ConstructorType */: {
|
|
103997
|
-
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
104157
|
+
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
103998
104158
|
}
|
|
103999
104159
|
case 202 /* ImportType */: {
|
|
104000
104160
|
if (!isLiteralImportTypeNode(input))
|
|
@@ -104138,7 +104298,7 @@ ${lanes.join("\n")}
|
|
|
104138
104298
|
ensureModifiers(input),
|
|
104139
104299
|
input.name,
|
|
104140
104300
|
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
104141
|
-
visitNode(input.type, visitDeclarationSubtree, isTypeNode)
|
|
104301
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
104142
104302
|
));
|
|
104143
104303
|
needsDeclare = previousNeedsDeclare;
|
|
104144
104304
|
return clean2;
|
|
@@ -104150,7 +104310,7 @@ ${lanes.join("\n")}
|
|
|
104150
104310
|
input.name,
|
|
104151
104311
|
ensureTypeParams(input, input.typeParameters),
|
|
104152
104312
|
transformHeritageClauses(input.heritageClauses),
|
|
104153
|
-
visitNodes2(input.members, visitDeclarationSubtree)
|
|
104313
|
+
visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
|
|
104154
104314
|
));
|
|
104155
104315
|
}
|
|
104156
104316
|
case 259 /* FunctionDeclaration */: {
|
|
@@ -104267,7 +104427,7 @@ ${lanes.join("\n")}
|
|
|
104267
104427
|
const oldHasScopeFix = resultHasScopeMarker;
|
|
104268
104428
|
resultHasScopeMarker = false;
|
|
104269
104429
|
needsScopeFixMarker = false;
|
|
104270
|
-
const statements = visitNodes2(inner.statements, visitDeclarationStatements);
|
|
104430
|
+
const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
|
|
104271
104431
|
let lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
104272
104432
|
if (input.flags & 16777216 /* Ambient */) {
|
|
104273
104433
|
needsScopeFixMarker = false;
|
|
@@ -104276,7 +104436,7 @@ ${lanes.join("\n")}
|
|
|
104276
104436
|
if (needsScopeFixMarker) {
|
|
104277
104437
|
lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
|
|
104278
104438
|
} else {
|
|
104279
|
-
lateStatements = visitNodes2(lateStatements, stripExportModifiers);
|
|
104439
|
+
lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
|
|
104280
104440
|
}
|
|
104281
104441
|
}
|
|
104282
104442
|
const body = factory2.updateModuleBlock(inner, lateStatements);
|
|
@@ -104372,7 +104532,7 @@ ${lanes.join("\n")}
|
|
|
104372
104532
|
void 0
|
|
104373
104533
|
)
|
|
104374
104534
|
] : void 0;
|
|
104375
|
-
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
|
|
104535
|
+
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
|
|
104376
104536
|
const members = factory2.createNodeArray(memberNodes);
|
|
104377
104537
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
104378
104538
|
if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
|
|
@@ -104396,11 +104556,11 @@ ${lanes.join("\n")}
|
|
|
104396
104556
|
if (clause.token === 94 /* ExtendsKeyword */) {
|
|
104397
104557
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
104398
104558
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
104399
|
-
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
|
|
104559
|
+
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
104400
104560
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
104401
104561
|
return newClause;
|
|
104402
104562
|
}
|
|
104403
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
|
|
104563
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
|
|
104404
104564
|
}));
|
|
104405
104565
|
return [statement, cleanup(factory2.updateClassDeclaration(
|
|
104406
104566
|
input,
|
|
@@ -104456,7 +104616,7 @@ ${lanes.join("\n")}
|
|
|
104456
104616
|
function transformVariableStatement(input) {
|
|
104457
104617
|
if (!forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
104458
104618
|
return;
|
|
104459
|
-
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
|
|
104619
|
+
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
|
|
104460
104620
|
if (!length(nodes))
|
|
104461
104621
|
return;
|
|
104462
104622
|
return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -104547,7 +104707,7 @@ ${lanes.join("\n")}
|
|
|
104547
104707
|
function transformHeritageClauses(nodes) {
|
|
104548
104708
|
return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
|
|
104549
104709
|
return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
|
|
104550
|
-
})), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
|
|
104710
|
+
})), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
|
|
104551
104711
|
}
|
|
104552
104712
|
}
|
|
104553
104713
|
function isAlwaysType(node) {
|
|
@@ -104733,7 +104893,7 @@ ${lanes.join("\n")}
|
|
|
104733
104893
|
}
|
|
104734
104894
|
function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
104735
104895
|
var _a2, _b;
|
|
104736
|
-
const enabledSyntaxKindFeatures = new Array(
|
|
104896
|
+
const enabledSyntaxKindFeatures = new Array(361 /* Count */);
|
|
104737
104897
|
let lexicalEnvironmentVariableDeclarations;
|
|
104738
104898
|
let lexicalEnvironmentFunctionDeclarations;
|
|
104739
104899
|
let lexicalEnvironmentStatements;
|
|
@@ -106583,6 +106743,7 @@ ${lanes.join("\n")}
|
|
|
106583
106743
|
case 346 /* JSDocThisTag */:
|
|
106584
106744
|
case 347 /* JSDocTypeTag */:
|
|
106585
106745
|
case 352 /* JSDocThrowsTag */:
|
|
106746
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
106586
106747
|
return emitJSDocSimpleTypedTag(node);
|
|
106587
106748
|
case 348 /* JSDocTemplateTag */:
|
|
106588
106749
|
return emitJSDocTemplateTag(node);
|
|
@@ -106590,9 +106751,9 @@ ${lanes.join("\n")}
|
|
|
106590
106751
|
return emitJSDocTypedefTag(node);
|
|
106591
106752
|
case 350 /* JSDocSeeTag */:
|
|
106592
106753
|
return emitJSDocSeeTag(node);
|
|
106593
|
-
case
|
|
106594
|
-
case
|
|
106595
|
-
case
|
|
106754
|
+
case 355 /* NotEmittedStatement */:
|
|
106755
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
106756
|
+
case 358 /* MergeDeclarationMarker */:
|
|
106596
106757
|
return;
|
|
106597
106758
|
}
|
|
106598
106759
|
if (isExpression(node)) {
|
|
@@ -106691,18 +106852,18 @@ ${lanes.join("\n")}
|
|
|
106691
106852
|
return emitJsxSelfClosingElement(node);
|
|
106692
106853
|
case 285 /* JsxFragment */:
|
|
106693
106854
|
return emitJsxFragment(node);
|
|
106694
|
-
case
|
|
106855
|
+
case 354 /* SyntaxList */:
|
|
106695
106856
|
return Debug.fail("SyntaxList should not be printed");
|
|
106696
|
-
case
|
|
106857
|
+
case 355 /* NotEmittedStatement */:
|
|
106697
106858
|
return;
|
|
106698
|
-
case
|
|
106859
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
106699
106860
|
return emitPartiallyEmittedExpression(node);
|
|
106700
|
-
case
|
|
106861
|
+
case 357 /* CommaListExpression */:
|
|
106701
106862
|
return emitCommaList(node);
|
|
106702
|
-
case
|
|
106703
|
-
case
|
|
106863
|
+
case 358 /* MergeDeclarationMarker */:
|
|
106864
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
106704
106865
|
return;
|
|
106705
|
-
case
|
|
106866
|
+
case 360 /* SyntheticReferenceExpression */:
|
|
106706
106867
|
return Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
106707
106868
|
}
|
|
106708
106869
|
}
|
|
@@ -109950,7 +110111,7 @@ ${lanes.join("\n")}
|
|
|
109950
110111
|
emitLeadingComments(
|
|
109951
110112
|
pos,
|
|
109952
110113
|
/*isEmittedNode*/
|
|
109953
|
-
node.kind !==
|
|
110114
|
+
node.kind !== 355 /* NotEmittedStatement */
|
|
109954
110115
|
);
|
|
109955
110116
|
}
|
|
109956
110117
|
if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
|
|
@@ -109974,7 +110135,7 @@ ${lanes.join("\n")}
|
|
|
109974
110135
|
containerPos = savedContainerPos;
|
|
109975
110136
|
containerEnd = savedContainerEnd;
|
|
109976
110137
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
109977
|
-
if (!skipTrailingComments && node.kind !==
|
|
110138
|
+
if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
|
|
109978
110139
|
emitTrailingComments(end);
|
|
109979
110140
|
}
|
|
109980
110141
|
}
|
|
@@ -110246,7 +110407,7 @@ ${lanes.join("\n")}
|
|
|
110246
110407
|
}
|
|
110247
110408
|
} else {
|
|
110248
110409
|
const source = sourceMapRange.source || sourceMapSource;
|
|
110249
|
-
if (node.kind !==
|
|
110410
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
|
|
110250
110411
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
110251
110412
|
}
|
|
110252
110413
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
@@ -110261,7 +110422,7 @@ ${lanes.join("\n")}
|
|
|
110261
110422
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
110262
110423
|
sourceMapsDisabled = false;
|
|
110263
110424
|
}
|
|
110264
|
-
if (node.kind !==
|
|
110425
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
|
|
110265
110426
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
110266
110427
|
}
|
|
110267
110428
|
}
|
|
@@ -113941,7 +114102,7 @@ ${lanes.join("\n")}
|
|
|
113941
114102
|
createOptionValueDiagnostic("importsNotUsedAsValues", Diagnostics.Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later);
|
|
113942
114103
|
}
|
|
113943
114104
|
if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) {
|
|
113944
|
-
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.
|
|
114105
|
+
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);
|
|
113945
114106
|
}
|
|
113946
114107
|
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
113947
114108
|
if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
@@ -117358,6 +117519,9 @@ ${lanes.join("\n")}
|
|
|
117358
117519
|
}
|
|
117359
117520
|
);
|
|
117360
117521
|
return filesInError.map((fileName) => {
|
|
117522
|
+
if (fileName === void 0) {
|
|
117523
|
+
return void 0;
|
|
117524
|
+
}
|
|
117361
117525
|
const diagnosticForFileName = find(
|
|
117362
117526
|
diagnostics,
|
|
117363
117527
|
(diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
|
|
@@ -118047,6 +118211,8 @@ ${lanes.join("\n")}
|
|
|
118047
118211
|
parseConfigFile2();
|
|
118048
118212
|
newLine = updateNewLine();
|
|
118049
118213
|
}
|
|
118214
|
+
Debug.assert(compilerOptions);
|
|
118215
|
+
Debug.assert(rootFileNames);
|
|
118050
118216
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
118051
118217
|
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
118052
118218
|
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
|
|
@@ -118149,6 +118315,8 @@ ${lanes.join("\n")}
|
|
|
118149
118315
|
}
|
|
118150
118316
|
function synchronizeProgram() {
|
|
118151
118317
|
writeLog(`Synchronizing program`);
|
|
118318
|
+
Debug.assert(compilerOptions);
|
|
118319
|
+
Debug.assert(rootFileNames);
|
|
118152
118320
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
118153
118321
|
const program = getCurrentBuilderProgram();
|
|
118154
118322
|
if (hasChangedCompilerOptions) {
|
|
@@ -118388,6 +118556,8 @@ ${lanes.join("\n")}
|
|
|
118388
118556
|
}
|
|
118389
118557
|
function reloadFileNamesFromConfigFile() {
|
|
118390
118558
|
writeLog("Reloading new file names and options");
|
|
118559
|
+
Debug.assert(compilerOptions);
|
|
118560
|
+
Debug.assert(configFileName);
|
|
118391
118561
|
reloadLevel = 0 /* None */;
|
|
118392
118562
|
rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
118393
118563
|
if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -118396,6 +118566,7 @@ ${lanes.join("\n")}
|
|
|
118396
118566
|
synchronizeProgram();
|
|
118397
118567
|
}
|
|
118398
118568
|
function reloadConfigFile() {
|
|
118569
|
+
Debug.assert(configFileName);
|
|
118399
118570
|
writeLog(`Reloading config file: ${configFileName}`);
|
|
118400
118571
|
reloadLevel = 0 /* None */;
|
|
118401
118572
|
if (cachedDirectoryStructureHost) {
|
|
@@ -118408,6 +118579,7 @@ ${lanes.join("\n")}
|
|
|
118408
118579
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
118409
118580
|
}
|
|
118410
118581
|
function parseConfigFile2() {
|
|
118582
|
+
Debug.assert(configFileName);
|
|
118411
118583
|
setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
|
|
118412
118584
|
configFileName,
|
|
118413
118585
|
optionsToExtendForConfigFile,
|
|
@@ -118435,6 +118607,7 @@ ${lanes.join("\n")}
|
|
|
118435
118607
|
return config.parsedCommandLine;
|
|
118436
118608
|
if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
|
|
118437
118609
|
writeLog("Reloading new file names and options");
|
|
118610
|
+
Debug.assert(compilerOptions);
|
|
118438
118611
|
const fileNames = getFileNamesFromConfigSpecs(
|
|
118439
118612
|
config.parsedCommandLine.options.configFile.configFileSpecs,
|
|
118440
118613
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
|
|
@@ -118526,7 +118699,8 @@ ${lanes.join("\n")}
|
|
|
118526
118699
|
return watchDirectory(
|
|
118527
118700
|
directory,
|
|
118528
118701
|
(fileOrDirectory) => {
|
|
118529
|
-
Debug.assert(
|
|
118702
|
+
Debug.assert(configFileName);
|
|
118703
|
+
Debug.assert(compilerOptions);
|
|
118530
118704
|
const fileOrDirectoryPath = toPath3(fileOrDirectory);
|
|
118531
118705
|
if (cachedDirectoryStructureHost) {
|
|
118532
118706
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -118557,6 +118731,7 @@ ${lanes.join("\n")}
|
|
|
118557
118731
|
);
|
|
118558
118732
|
}
|
|
118559
118733
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
118734
|
+
Debug.assert(configFileName);
|
|
118560
118735
|
updateSharedExtendedConfigFileWatcher(
|
|
118561
118736
|
forProjectPath,
|
|
118562
118737
|
options,
|
|
@@ -124022,7 +124197,7 @@ ${lanes.join("\n")}
|
|
|
124022
124197
|
if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) {
|
|
124023
124198
|
return false;
|
|
124024
124199
|
}
|
|
124025
|
-
return isInJSFile(declaration) || !findAncestor(declaration, isGlobalScopeAugmentation);
|
|
124200
|
+
return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d));
|
|
124026
124201
|
}
|
|
124027
124202
|
function isDeprecatedDeclaration(decl) {
|
|
124028
124203
|
return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */);
|
|
@@ -128373,7 +128548,7 @@ ${lanes.join("\n")}
|
|
|
128373
128548
|
}
|
|
128374
128549
|
}
|
|
128375
128550
|
function createSyntaxList(nodes, parent2) {
|
|
128376
|
-
const list = createNode(
|
|
128551
|
+
const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2);
|
|
128377
128552
|
list._children = [];
|
|
128378
128553
|
let pos = nodes.pos;
|
|
128379
128554
|
for (const node of nodes) {
|
|
@@ -129834,7 +130009,7 @@ ${lanes.join("\n")}
|
|
|
129834
130009
|
if (!children.length) {
|
|
129835
130010
|
return void 0;
|
|
129836
130011
|
}
|
|
129837
|
-
const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind >
|
|
130012
|
+
const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */);
|
|
129838
130013
|
return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
|
|
129839
130014
|
}
|
|
129840
130015
|
getLastToken(sourceFile) {
|
|
@@ -133446,7 +133621,7 @@ ${lanes.join("\n")}
|
|
|
133446
133621
|
if (!param.type) {
|
|
133447
133622
|
const paramType = getJSDocType(param);
|
|
133448
133623
|
if (paramType)
|
|
133449
|
-
changes.tryInsertTypeAnnotation(sourceFile, param,
|
|
133624
|
+
changes.tryInsertTypeAnnotation(sourceFile, param, visitNode(paramType, transformJSDocType, isTypeNode));
|
|
133450
133625
|
}
|
|
133451
133626
|
}
|
|
133452
133627
|
if (needParens)
|
|
@@ -133454,12 +133629,12 @@ ${lanes.join("\n")}
|
|
|
133454
133629
|
if (!decl.type) {
|
|
133455
133630
|
const returnType = getJSDocReturnType(decl);
|
|
133456
133631
|
if (returnType)
|
|
133457
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
133632
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(returnType, transformJSDocType, isTypeNode));
|
|
133458
133633
|
}
|
|
133459
133634
|
} else {
|
|
133460
133635
|
const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist");
|
|
133461
133636
|
Debug.assert(!decl.type, "The JSDocType decl should have a type");
|
|
133462
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
133637
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(jsdocType, transformJSDocType, isTypeNode));
|
|
133463
133638
|
}
|
|
133464
133639
|
}
|
|
133465
133640
|
function isDeclarationWithType(node) {
|
|
@@ -133496,19 +133671,19 @@ ${lanes.join("\n")}
|
|
|
133496
133671
|
void 0,
|
|
133497
133672
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
133498
133673
|
isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
133499
|
-
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
133674
|
+
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
133500
133675
|
)));
|
|
133501
133676
|
setEmitFlags(typeNode, 1 /* SingleLine */);
|
|
133502
133677
|
return typeNode;
|
|
133503
133678
|
}
|
|
133504
133679
|
function transformJSDocOptionalType(node) {
|
|
133505
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
133680
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
133506
133681
|
}
|
|
133507
133682
|
function transformJSDocNullableType(node) {
|
|
133508
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
133683
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
133509
133684
|
}
|
|
133510
133685
|
function transformJSDocVariadicType(node) {
|
|
133511
|
-
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType));
|
|
133686
|
+
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType, isTypeNode));
|
|
133512
133687
|
}
|
|
133513
133688
|
function transformJSDocFunctionType(node) {
|
|
133514
133689
|
var _a2;
|
|
@@ -133519,7 +133694,7 @@ ${lanes.join("\n")}
|
|
|
133519
133694
|
const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1;
|
|
133520
133695
|
const name = node.name || (isRest ? "rest" : "arg" + index);
|
|
133521
133696
|
const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken;
|
|
133522
|
-
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType), node.initializer);
|
|
133697
|
+
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer);
|
|
133523
133698
|
}
|
|
133524
133699
|
function transformJSDocTypeReference(node) {
|
|
133525
133700
|
let name = node.typeName;
|
|
@@ -133546,7 +133721,7 @@ ${lanes.join("\n")}
|
|
|
133546
133721
|
if ((text === "Array" || text === "Promise") && !node.typeArguments) {
|
|
133547
133722
|
args = factory.createNodeArray([factory.createTypeReferenceNode("any", emptyArray)]);
|
|
133548
133723
|
} else {
|
|
133549
|
-
args = visitNodes2(node.typeArguments, transformJSDocType);
|
|
133724
|
+
args = visitNodes2(node.typeArguments, transformJSDocType, isTypeNode);
|
|
133550
133725
|
}
|
|
133551
133726
|
}
|
|
133552
133727
|
return factory.createTypeReferenceNode(name, args);
|
|
@@ -136126,13 +136301,19 @@ ${lanes.join("\n")}
|
|
|
136126
136301
|
if (isUMDExportSymbol(umdSymbol))
|
|
136127
136302
|
return umdSymbol;
|
|
136128
136303
|
const { parent: parent2 } = token;
|
|
136129
|
-
|
|
136130
|
-
checker.
|
|
136131
|
-
|
|
136132
|
-
|
|
136133
|
-
|
|
136134
|
-
|
|
136135
|
-
|
|
136304
|
+
if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) {
|
|
136305
|
+
const parentSymbol = checker.resolveName(
|
|
136306
|
+
checker.getJsxNamespace(parent2),
|
|
136307
|
+
isJsxOpeningLikeElement(parent2) ? token : parent2,
|
|
136308
|
+
111551 /* Value */,
|
|
136309
|
+
/*excludeGlobals*/
|
|
136310
|
+
false
|
|
136311
|
+
);
|
|
136312
|
+
if (isUMDExportSymbol(parentSymbol)) {
|
|
136313
|
+
return parentSymbol;
|
|
136314
|
+
}
|
|
136315
|
+
}
|
|
136316
|
+
return void 0;
|
|
136136
136317
|
}
|
|
136137
136318
|
function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) {
|
|
136138
136319
|
switch (exportKind) {
|
|
@@ -141584,18 +141765,17 @@ ${lanes.join("\n")}
|
|
|
141584
141765
|
}
|
|
141585
141766
|
function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
|
|
141586
141767
|
let symbols;
|
|
141587
|
-
const typeNode = visitNode(importTypeNode, visit);
|
|
141768
|
+
const typeNode = visitNode(importTypeNode, visit, isTypeNode);
|
|
141588
141769
|
if (symbols && typeNode) {
|
|
141589
141770
|
return { typeNode, symbols };
|
|
141590
141771
|
}
|
|
141591
141772
|
function visit(node) {
|
|
141592
|
-
var _a2;
|
|
141593
141773
|
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
|
141594
141774
|
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
|
141595
141775
|
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
|
141596
141776
|
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
|
141597
141777
|
symbols = append(symbols, firstIdentifier.symbol);
|
|
141598
|
-
const typeArguments = (
|
|
141778
|
+
const typeArguments = visitNodes2(node.typeArguments, visit, isTypeNode);
|
|
141599
141779
|
return factory.createTypeReferenceNode(qualifier, typeArguments);
|
|
141600
141780
|
}
|
|
141601
141781
|
return visitEachChild(node, visit, nullTransformationContext);
|
|
@@ -143223,6 +143403,7 @@ ${lanes.join("\n")}
|
|
|
143223
143403
|
void 0,
|
|
143224
143404
|
contextToken,
|
|
143225
143405
|
location,
|
|
143406
|
+
position,
|
|
143226
143407
|
sourceFile,
|
|
143227
143408
|
host,
|
|
143228
143409
|
program,
|
|
@@ -143336,10 +143517,10 @@ ${lanes.join("\n")}
|
|
|
143336
143517
|
} else if (!tracker.hasValue(type.value)) {
|
|
143337
143518
|
switch (typeof type.value) {
|
|
143338
143519
|
case "object":
|
|
143339
|
-
elements.push(factory.createBigIntLiteral(type.value));
|
|
143520
|
+
elements.push(type.value.negative ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value));
|
|
143340
143521
|
break;
|
|
143341
143522
|
case "number":
|
|
143342
|
-
elements.push(factory.createNumericLiteral(type.value));
|
|
143523
|
+
elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value));
|
|
143343
143524
|
break;
|
|
143344
143525
|
case "string":
|
|
143345
143526
|
elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */));
|
|
@@ -143548,7 +143729,7 @@ ${lanes.join("\n")}
|
|
|
143548
143729
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
143549
143730
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
143550
143731
|
}
|
|
143551
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143732
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143552
143733
|
let insertText;
|
|
143553
143734
|
let replacementSpan = getReplacementSpanForContextToken(replacementToken);
|
|
143554
143735
|
let data;
|
|
@@ -143606,7 +143787,7 @@ ${lanes.join("\n")}
|
|
|
143606
143787
|
}
|
|
143607
143788
|
if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
|
|
143608
143789
|
let importAdder;
|
|
143609
|
-
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
|
|
143790
|
+
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
|
|
143610
143791
|
sortText = SortText.ClassMemberSnippets;
|
|
143611
143792
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
143612
143793
|
hasAction = true;
|
|
@@ -143670,7 +143851,7 @@ ${lanes.join("\n")}
|
|
|
143670
143851
|
const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
|
|
143671
143852
|
return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
|
|
143672
143853
|
}
|
|
143673
|
-
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
|
|
143854
|
+
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
|
|
143674
143855
|
const classLikeDeclaration = findAncestor(location, isClassLike);
|
|
143675
143856
|
if (!classLikeDeclaration) {
|
|
143676
143857
|
return { insertText: name };
|
|
@@ -143706,7 +143887,7 @@ ${lanes.join("\n")}
|
|
|
143706
143887
|
);
|
|
143707
143888
|
}
|
|
143708
143889
|
let modifiers = 0 /* None */;
|
|
143709
|
-
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
|
|
143890
|
+
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
|
|
143710
143891
|
const isAbstract = !!(presentModifiers & 256 /* Abstract */);
|
|
143711
143892
|
const completionNodes = [];
|
|
143712
143893
|
ts_codefix_exports.addNewNodeForMemberSymbol(
|
|
@@ -143761,8 +143942,8 @@ ${lanes.join("\n")}
|
|
|
143761
143942
|
}
|
|
143762
143943
|
return { insertText, isSnippet, importAdder, replacementSpan };
|
|
143763
143944
|
}
|
|
143764
|
-
function getPresentModifiers(contextToken) {
|
|
143765
|
-
if (!contextToken) {
|
|
143945
|
+
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
143946
|
+
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
143766
143947
|
return { modifiers: 0 /* None */ };
|
|
143767
143948
|
}
|
|
143768
143949
|
let modifiers = 0 /* None */;
|
|
@@ -144128,7 +144309,7 @@ ${lanes.join("\n")}
|
|
|
144128
144309
|
return "TypeOnlyAlias/" /* TypeOnlyAlias */;
|
|
144129
144310
|
}
|
|
144130
144311
|
}
|
|
144131
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144312
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144132
144313
|
var _a2;
|
|
144133
144314
|
const start = timestamp();
|
|
144134
144315
|
const variableDeclaration = getVariableDeclaration(location);
|
|
@@ -144151,6 +144332,7 @@ ${lanes.join("\n")}
|
|
|
144151
144332
|
replacementToken,
|
|
144152
144333
|
contextToken,
|
|
144153
144334
|
location,
|
|
144335
|
+
position,
|
|
144154
144336
|
sourceFile,
|
|
144155
144337
|
host,
|
|
144156
144338
|
program,
|
|
@@ -144394,6 +144576,7 @@ ${lanes.join("\n")}
|
|
|
144394
144576
|
name,
|
|
144395
144577
|
symbol,
|
|
144396
144578
|
location,
|
|
144579
|
+
position,
|
|
144397
144580
|
contextToken,
|
|
144398
144581
|
formatContext
|
|
144399
144582
|
);
|
|
@@ -144757,6 +144940,7 @@ ${lanes.join("\n")}
|
|
|
144757
144940
|
case 347 /* JSDocTypeTag */:
|
|
144758
144941
|
case 349 /* JSDocTypedefTag */:
|
|
144759
144942
|
case 352 /* JSDocThrowsTag */:
|
|
144943
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
144760
144944
|
return true;
|
|
144761
144945
|
case 348 /* JSDocTemplateTag */:
|
|
144762
144946
|
return !!tag.constraint;
|
|
@@ -146004,7 +146188,7 @@ ${lanes.join("\n")}
|
|
|
146004
146188
|
function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
|
|
146005
146189
|
var _a2;
|
|
146006
146190
|
switch (location.kind) {
|
|
146007
|
-
case
|
|
146191
|
+
case 354 /* SyntaxList */:
|
|
146008
146192
|
return tryCast(location.parent, isObjectTypeDeclaration);
|
|
146009
146193
|
case 1 /* EndOfFileToken */:
|
|
146010
146194
|
const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
|
|
@@ -146422,10 +146606,10 @@ ${lanes.join("\n")}
|
|
|
146422
146606
|
if (!contextToken || !isStringLiteralLike(contextToken))
|
|
146423
146607
|
return void 0;
|
|
146424
146608
|
const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
|
|
146425
|
-
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
|
|
146609
|
+
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
|
|
146426
146610
|
}
|
|
146427
146611
|
}
|
|
146428
|
-
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
|
|
146612
|
+
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
|
|
146429
146613
|
if (completion === void 0) {
|
|
146430
146614
|
return void 0;
|
|
146431
146615
|
}
|
|
@@ -146441,6 +146625,7 @@ ${lanes.join("\n")}
|
|
|
146441
146625
|
contextToken,
|
|
146442
146626
|
contextToken,
|
|
146443
146627
|
sourceFile,
|
|
146628
|
+
position,
|
|
146444
146629
|
sourceFile,
|
|
146445
146630
|
host,
|
|
146446
146631
|
program,
|
|
@@ -147070,7 +147255,7 @@ ${lanes.join("\n")}
|
|
|
147070
147255
|
}
|
|
147071
147256
|
function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
|
|
147072
147257
|
const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
|
|
147073
|
-
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment));
|
|
147258
|
+
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
|
|
147074
147259
|
if (fragmentDirectory !== void 0) {
|
|
147075
147260
|
const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
|
|
147076
147261
|
return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
|
|
@@ -150605,6 +150790,7 @@ ${lanes.join("\n")}
|
|
|
150605
150790
|
}
|
|
150606
150791
|
return displayParts;
|
|
150607
150792
|
case 347 /* JSDocTypeTag */:
|
|
150793
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
150608
150794
|
return withNode(tag.typeExpression);
|
|
150609
150795
|
case 349 /* JSDocTypedefTag */:
|
|
150610
150796
|
case 341 /* JSDocCallbackTag */:
|
|
@@ -150894,6 +151080,7 @@ ${lanes.join("\n")}
|
|
|
150894
151080
|
"readonly",
|
|
150895
151081
|
"requires",
|
|
150896
151082
|
"returns",
|
|
151083
|
+
"satisfies",
|
|
150897
151084
|
"see",
|
|
150898
151085
|
"since",
|
|
150899
151086
|
"static",
|
|
@@ -156208,7 +156395,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156208
156395
|
let ignoreReturns = false;
|
|
156209
156396
|
const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]);
|
|
156210
156397
|
if (hasWritesOrVariableDeclarations || substitutions.size) {
|
|
156211
|
-
const rewrittenStatements = visitNodes2(statements, visitor).slice();
|
|
156398
|
+
const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice();
|
|
156212
156399
|
if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) {
|
|
156213
156400
|
const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);
|
|
156214
156401
|
if (assignments.length === 1) {
|
|
@@ -156236,7 +156423,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156236
156423
|
if (!returnValueProperty) {
|
|
156237
156424
|
returnValueProperty = "__return";
|
|
156238
156425
|
}
|
|
156239
|
-
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor)));
|
|
156426
|
+
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor, isExpression)));
|
|
156240
156427
|
}
|
|
156241
156428
|
if (assignments.length === 1) {
|
|
156242
156429
|
return factory.createReturnStatement(assignments[0].name);
|
|
@@ -158804,6 +158991,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158804
158991
|
if (!visited) {
|
|
158805
158992
|
return visited;
|
|
158806
158993
|
}
|
|
158994
|
+
Debug.assert(nodes);
|
|
158807
158995
|
const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited;
|
|
158808
158996
|
setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes));
|
|
158809
158997
|
return nodeArray;
|
|
@@ -171471,6 +171659,7 @@ ${json}${newLine}`;
|
|
|
171471
171659
|
constructor(opts) {
|
|
171472
171660
|
this.changeSeq = 0;
|
|
171473
171661
|
this.handlers = new Map(Object.entries({
|
|
171662
|
+
// TODO(jakebailey): correctly type the handlers
|
|
171474
171663
|
[CommandNames.Status]: () => {
|
|
171475
171664
|
const response = { version };
|
|
171476
171665
|
return this.requiredResponse(response);
|
|
@@ -176006,6 +176195,8 @@ ${e.message}`;
|
|
|
176006
176195
|
getJSDocReturnTag: () => getJSDocReturnTag,
|
|
176007
176196
|
getJSDocReturnType: () => getJSDocReturnType,
|
|
176008
176197
|
getJSDocRoot: () => getJSDocRoot,
|
|
176198
|
+
getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
|
|
176199
|
+
getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
|
|
176009
176200
|
getJSDocTags: () => getJSDocTags,
|
|
176010
176201
|
getJSDocTagsNoCache: () => getJSDocTagsNoCache,
|
|
176011
176202
|
getJSDocTemplateTag: () => getJSDocTemplateTag,
|
|
@@ -176345,6 +176536,7 @@ ${e.message}`;
|
|
|
176345
176536
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
176346
176537
|
isArray: () => isArray,
|
|
176347
176538
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
176539
|
+
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
176348
176540
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
176349
176541
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
176350
176542
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -176377,6 +176569,7 @@ ${e.message}`;
|
|
|
176377
176569
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
176378
176570
|
isBindingElement: () => isBindingElement,
|
|
176379
176571
|
isBindingName: () => isBindingName,
|
|
176572
|
+
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
176380
176573
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
176381
176574
|
isBindingPattern: () => isBindingPattern,
|
|
176382
176575
|
isBlock: () => isBlock,
|
|
@@ -176583,6 +176776,7 @@ ${e.message}`;
|
|
|
176583
176776
|
isInferTypeNode: () => isInferTypeNode,
|
|
176584
176777
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
176585
176778
|
isInitializedProperty: () => isInitializedProperty,
|
|
176779
|
+
isInitializedVariable: () => isInitializedVariable,
|
|
176586
176780
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
176587
176781
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
176588
176782
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -176632,6 +176826,8 @@ ${e.message}`;
|
|
|
176632
176826
|
isJSDocPublicTag: () => isJSDocPublicTag,
|
|
176633
176827
|
isJSDocReadonlyTag: () => isJSDocReadonlyTag,
|
|
176634
176828
|
isJSDocReturnTag: () => isJSDocReturnTag,
|
|
176829
|
+
isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
|
|
176830
|
+
isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
|
|
176635
176831
|
isJSDocSeeTag: () => isJSDocSeeTag,
|
|
176636
176832
|
isJSDocSignature: () => isJSDocSignature,
|
|
176637
176833
|
isJSDocTag: () => isJSDocTag,
|
|
@@ -176687,11 +176883,14 @@ ${e.message}`;
|
|
|
176687
176883
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
176688
176884
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
176689
176885
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
176886
|
+
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
176690
176887
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
176691
176888
|
isLocalName: () => isLocalName,
|
|
176692
176889
|
isLogicalOperator: () => isLogicalOperator,
|
|
176693
176890
|
isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
|
|
176694
176891
|
isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
|
|
176892
|
+
isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
|
|
176893
|
+
isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
|
|
176695
176894
|
isMappedTypeNode: () => isMappedTypeNode,
|
|
176696
176895
|
isMemberName: () => isMemberName,
|
|
176697
176896
|
isMergeDeclarationMarker: () => isMergeDeclarationMarker,
|
|
@@ -177377,6 +177576,7 @@ ${e.message}`;
|
|
|
177377
177576
|
tryGetDirectories: () => tryGetDirectories,
|
|
177378
177577
|
tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
|
|
177379
177578
|
tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
|
|
177579
|
+
tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
|
|
177380
177580
|
tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
|
|
177381
177581
|
tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
|
|
177382
177582
|
tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
|
|
@@ -178656,6 +178856,8 @@ ${e.message}`;
|
|
|
178656
178856
|
getJSDocReturnTag: () => getJSDocReturnTag,
|
|
178657
178857
|
getJSDocReturnType: () => getJSDocReturnType,
|
|
178658
178858
|
getJSDocRoot: () => getJSDocRoot,
|
|
178859
|
+
getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
|
|
178860
|
+
getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
|
|
178659
178861
|
getJSDocTags: () => getJSDocTags,
|
|
178660
178862
|
getJSDocTagsNoCache: () => getJSDocTagsNoCache,
|
|
178661
178863
|
getJSDocTemplateTag: () => getJSDocTemplateTag,
|
|
@@ -178995,6 +179197,7 @@ ${e.message}`;
|
|
|
178995
179197
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
178996
179198
|
isArray: () => isArray,
|
|
178997
179199
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
179200
|
+
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
178998
179201
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
178999
179202
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
179000
179203
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -179027,6 +179230,7 @@ ${e.message}`;
|
|
|
179027
179230
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
179028
179231
|
isBindingElement: () => isBindingElement,
|
|
179029
179232
|
isBindingName: () => isBindingName,
|
|
179233
|
+
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
179030
179234
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
179031
179235
|
isBindingPattern: () => isBindingPattern,
|
|
179032
179236
|
isBlock: () => isBlock,
|
|
@@ -179233,6 +179437,7 @@ ${e.message}`;
|
|
|
179233
179437
|
isInferTypeNode: () => isInferTypeNode,
|
|
179234
179438
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
179235
179439
|
isInitializedProperty: () => isInitializedProperty,
|
|
179440
|
+
isInitializedVariable: () => isInitializedVariable,
|
|
179236
179441
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
179237
179442
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
179238
179443
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -179282,6 +179487,8 @@ ${e.message}`;
|
|
|
179282
179487
|
isJSDocPublicTag: () => isJSDocPublicTag,
|
|
179283
179488
|
isJSDocReadonlyTag: () => isJSDocReadonlyTag,
|
|
179284
179489
|
isJSDocReturnTag: () => isJSDocReturnTag,
|
|
179490
|
+
isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
|
|
179491
|
+
isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
|
|
179285
179492
|
isJSDocSeeTag: () => isJSDocSeeTag,
|
|
179286
179493
|
isJSDocSignature: () => isJSDocSignature,
|
|
179287
179494
|
isJSDocTag: () => isJSDocTag,
|
|
@@ -179337,11 +179544,14 @@ ${e.message}`;
|
|
|
179337
179544
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
179338
179545
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
179339
179546
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
179547
|
+
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
179340
179548
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
179341
179549
|
isLocalName: () => isLocalName,
|
|
179342
179550
|
isLogicalOperator: () => isLogicalOperator,
|
|
179343
179551
|
isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
|
|
179344
179552
|
isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
|
|
179553
|
+
isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
|
|
179554
|
+
isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
|
|
179345
179555
|
isMappedTypeNode: () => isMappedTypeNode,
|
|
179346
179556
|
isMemberName: () => isMemberName,
|
|
179347
179557
|
isMergeDeclarationMarker: () => isMergeDeclarationMarker,
|
|
@@ -180027,6 +180237,7 @@ ${e.message}`;
|
|
|
180027
180237
|
tryGetDirectories: () => tryGetDirectories,
|
|
180028
180238
|
tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
|
|
180029
180239
|
tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
|
|
180240
|
+
tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
|
|
180030
180241
|
tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
|
|
180031
180242
|
tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
|
|
180032
180243
|
tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
|