typescript 5.0.0-dev.20230117 → 5.0.0-dev.20230119
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 +672 -505
- package/lib/tsserver.js +748 -530
- package/lib/tsserverlibrary.d.ts +95 -32
- package/lib/tsserverlibrary.js +737 -530
- package/lib/typescript.d.ts +85 -28
- package/lib/typescript.js +725 -530
- package/lib/typingsInstaller.js +275 -231
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
26
|
+
var version = `${versionMajorMinor}.0-dev.20230119`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -3445,14 +3445,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
3445
3445
|
SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 350] = "JSDocSeeTag";
|
|
3446
3446
|
SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
|
|
3447
3447
|
SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
|
|
3448
|
-
SyntaxKind4[SyntaxKind4["
|
|
3449
|
-
SyntaxKind4[SyntaxKind4["
|
|
3450
|
-
SyntaxKind4[SyntaxKind4["
|
|
3451
|
-
SyntaxKind4[SyntaxKind4["
|
|
3452
|
-
SyntaxKind4[SyntaxKind4["
|
|
3453
|
-
SyntaxKind4[SyntaxKind4["
|
|
3454
|
-
SyntaxKind4[SyntaxKind4["
|
|
3455
|
-
SyntaxKind4[SyntaxKind4["
|
|
3448
|
+
SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
|
|
3449
|
+
SyntaxKind4[SyntaxKind4["SyntaxList"] = 354] = "SyntaxList";
|
|
3450
|
+
SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 355] = "NotEmittedStatement";
|
|
3451
|
+
SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
|
|
3452
|
+
SyntaxKind4[SyntaxKind4["CommaListExpression"] = 357] = "CommaListExpression";
|
|
3453
|
+
SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
|
|
3454
|
+
SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
|
|
3455
|
+
SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
|
|
3456
|
+
SyntaxKind4[SyntaxKind4["Count"] = 361] = "Count";
|
|
3456
3457
|
SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
|
|
3457
3458
|
SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
|
|
3458
3459
|
SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -3481,9 +3482,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
3481
3482
|
SyntaxKind4[SyntaxKind4["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
|
|
3482
3483
|
SyntaxKind4[SyntaxKind4["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
|
|
3483
3484
|
SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
|
|
3484
|
-
SyntaxKind4[SyntaxKind4["LastJSDocNode"] =
|
|
3485
|
+
SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
|
|
3485
3486
|
SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
|
|
3486
|
-
SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] =
|
|
3487
|
+
SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
|
|
3487
3488
|
SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
|
|
3488
3489
|
SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
|
|
3489
3490
|
return SyntaxKind4;
|
|
@@ -6857,7 +6858,7 @@ var Diagnostics = {
|
|
|
6857
6858
|
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'."),
|
|
6858
6859
|
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'."),
|
|
6859
6860
|
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."),
|
|
6860
|
-
|
|
6861
|
+
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."),
|
|
6861
6862
|
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."),
|
|
6862
6863
|
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'."),
|
|
6863
6864
|
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.`),
|
|
@@ -7779,7 +7780,8 @@ var Diagnostics = {
|
|
|
7779
7780
|
_0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
7780
7781
|
_0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
7781
7782
|
_0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
7782
|
-
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.")
|
|
7783
|
+
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."),
|
|
7784
|
+
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.")
|
|
7783
7785
|
};
|
|
7784
7786
|
|
|
7785
7787
|
// src/compiler/scanner.ts
|
|
@@ -8369,10 +8371,7 @@ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
|
|
|
8369
8371
|
initial
|
|
8370
8372
|
);
|
|
8371
8373
|
}
|
|
8372
|
-
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
8373
|
-
if (!comments) {
|
|
8374
|
-
comments = [];
|
|
8375
|
-
}
|
|
8374
|
+
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) {
|
|
8376
8375
|
comments.push({ kind, pos, end, hasTrailingNewLine });
|
|
8377
8376
|
return comments;
|
|
8378
8377
|
}
|
|
@@ -10073,7 +10072,10 @@ function getOriginalNode(node, nodeTest) {
|
|
|
10073
10072
|
node = node.original;
|
|
10074
10073
|
}
|
|
10075
10074
|
}
|
|
10076
|
-
|
|
10075
|
+
if (!node || !nodeTest) {
|
|
10076
|
+
return node;
|
|
10077
|
+
}
|
|
10078
|
+
return nodeTest(node) ? node : void 0;
|
|
10077
10079
|
}
|
|
10078
10080
|
function findAncestor(node, callback) {
|
|
10079
10081
|
while (node) {
|
|
@@ -10376,6 +10378,9 @@ function getJSDocThisTag(node) {
|
|
|
10376
10378
|
function getJSDocReturnTag(node) {
|
|
10377
10379
|
return getFirstJSDocTag(node, isJSDocReturnTag);
|
|
10378
10380
|
}
|
|
10381
|
+
function getJSDocSatisfiesTag(node) {
|
|
10382
|
+
return getFirstJSDocTag(node, isJSDocSatisfiesTag);
|
|
10383
|
+
}
|
|
10379
10384
|
function getJSDocTypeTag(node) {
|
|
10380
10385
|
const tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
10381
10386
|
if (tag && tag.typeExpression && tag.typeExpression.type) {
|
|
@@ -10544,9 +10549,6 @@ function isNodeKind(kind) {
|
|
|
10544
10549
|
function isTokenKind(kind) {
|
|
10545
10550
|
return kind >= 0 /* FirstToken */ && kind <= 162 /* LastToken */;
|
|
10546
10551
|
}
|
|
10547
|
-
function isToken(n) {
|
|
10548
|
-
return isTokenKind(n.kind);
|
|
10549
|
-
}
|
|
10550
10552
|
function isNodeArray(array) {
|
|
10551
10553
|
return hasProperty(array, "pos") && hasProperty(array, "end");
|
|
10552
10554
|
}
|
|
@@ -10760,6 +10762,9 @@ function isDeclarationBindingElement(bindingElement) {
|
|
|
10760
10762
|
}
|
|
10761
10763
|
return false;
|
|
10762
10764
|
}
|
|
10765
|
+
function isBindingOrAssignmentElement(node) {
|
|
10766
|
+
return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
|
|
10767
|
+
}
|
|
10763
10768
|
function isBindingOrAssignmentPattern(node) {
|
|
10764
10769
|
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
10765
10770
|
}
|
|
@@ -10789,6 +10794,24 @@ function isArrayBindingOrAssignmentPattern(node) {
|
|
|
10789
10794
|
}
|
|
10790
10795
|
return false;
|
|
10791
10796
|
}
|
|
10797
|
+
function isArrayBindingOrAssignmentElement(node) {
|
|
10798
|
+
switch (node.kind) {
|
|
10799
|
+
case 205 /* BindingElement */:
|
|
10800
|
+
case 229 /* OmittedExpression */:
|
|
10801
|
+
case 227 /* SpreadElement */:
|
|
10802
|
+
case 206 /* ArrayLiteralExpression */:
|
|
10803
|
+
case 207 /* ObjectLiteralExpression */:
|
|
10804
|
+
case 79 /* Identifier */:
|
|
10805
|
+
case 208 /* PropertyAccessExpression */:
|
|
10806
|
+
case 209 /* ElementAccessExpression */:
|
|
10807
|
+
return true;
|
|
10808
|
+
}
|
|
10809
|
+
return isAssignmentExpression(
|
|
10810
|
+
node,
|
|
10811
|
+
/*excludeCompoundAssignment*/
|
|
10812
|
+
true
|
|
10813
|
+
);
|
|
10814
|
+
}
|
|
10792
10815
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
10793
10816
|
const kind = node.kind;
|
|
10794
10817
|
return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
|
|
@@ -10870,6 +10893,18 @@ function isUnaryExpressionKind(kind) {
|
|
|
10870
10893
|
return isLeftHandSideExpressionKind(kind);
|
|
10871
10894
|
}
|
|
10872
10895
|
}
|
|
10896
|
+
function isLiteralTypeLiteral(node) {
|
|
10897
|
+
node = skipPartiallyEmittedExpressions(node);
|
|
10898
|
+
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
10899
|
+
case 104 /* NullKeyword */:
|
|
10900
|
+
case 110 /* TrueKeyword */:
|
|
10901
|
+
case 95 /* FalseKeyword */:
|
|
10902
|
+
case 221 /* PrefixUnaryExpression */:
|
|
10903
|
+
return true;
|
|
10904
|
+
default:
|
|
10905
|
+
return isLiteralExpression(node);
|
|
10906
|
+
}
|
|
10907
|
+
}
|
|
10873
10908
|
function isExpression(node) {
|
|
10874
10909
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
10875
10910
|
}
|
|
@@ -10882,8 +10917,8 @@ function isExpressionKind(kind) {
|
|
|
10882
10917
|
case 227 /* SpreadElement */:
|
|
10883
10918
|
case 231 /* AsExpression */:
|
|
10884
10919
|
case 229 /* OmittedExpression */:
|
|
10885
|
-
case
|
|
10886
|
-
case
|
|
10920
|
+
case 357 /* CommaListExpression */:
|
|
10921
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
10887
10922
|
case 235 /* SatisfiesExpression */:
|
|
10888
10923
|
return true;
|
|
10889
10924
|
default:
|
|
@@ -11054,7 +11089,7 @@ function isDeclarationStatementKind(kind) {
|
|
|
11054
11089
|
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 */;
|
|
11055
11090
|
}
|
|
11056
11091
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
11057
|
-
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 ===
|
|
11092
|
+
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 */;
|
|
11058
11093
|
}
|
|
11059
11094
|
function isDeclaration(node) {
|
|
11060
11095
|
if (node.kind === 165 /* TypeParameter */) {
|
|
@@ -11115,10 +11150,10 @@ function isCaseOrDefaultClause(node) {
|
|
|
11115
11150
|
return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
|
|
11116
11151
|
}
|
|
11117
11152
|
function isJSDocNode(node) {
|
|
11118
|
-
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <=
|
|
11153
|
+
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
|
|
11119
11154
|
}
|
|
11120
11155
|
function isJSDocTag(node) {
|
|
11121
|
-
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <=
|
|
11156
|
+
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
|
|
11122
11157
|
}
|
|
11123
11158
|
function isSetAccessor(node) {
|
|
11124
11159
|
return node.kind === 175 /* SetAccessor */;
|
|
@@ -11151,9 +11186,6 @@ function hasOnlyExpressionInitializer(node) {
|
|
|
11151
11186
|
return false;
|
|
11152
11187
|
}
|
|
11153
11188
|
}
|
|
11154
|
-
function isObjectLiteralElement(node) {
|
|
11155
|
-
return node.kind === 288 /* JsxAttribute */ || node.kind === 290 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node);
|
|
11156
|
-
}
|
|
11157
11189
|
function isTypeReferenceType(node) {
|
|
11158
11190
|
return node.kind === 180 /* TypeReference */ || node.kind === 230 /* ExpressionWithTypeArguments */;
|
|
11159
11191
|
}
|
|
@@ -11506,7 +11538,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
11506
11538
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
11507
11539
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
11508
11540
|
}
|
|
11509
|
-
if (node.kind ===
|
|
11541
|
+
if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
|
|
11510
11542
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
11511
11543
|
}
|
|
11512
11544
|
return skipTrivia(
|
|
@@ -13279,7 +13311,7 @@ function filterOwnedJSDocTags(hostNode, jsDoc) {
|
|
|
13279
13311
|
return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
|
|
13280
13312
|
}
|
|
13281
13313
|
function ownsJSDocTag(hostNode, tag) {
|
|
13282
|
-
return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
13314
|
+
return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
13283
13315
|
}
|
|
13284
13316
|
function getNextJSDocCommentLocation(node) {
|
|
13285
13317
|
const parent = node.parent;
|
|
@@ -13757,7 +13789,7 @@ function getOperator(expression) {
|
|
|
13757
13789
|
}
|
|
13758
13790
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
13759
13791
|
switch (nodeKind) {
|
|
13760
|
-
case
|
|
13792
|
+
case 357 /* CommaListExpression */:
|
|
13761
13793
|
return 0 /* Comma */;
|
|
13762
13794
|
case 227 /* SpreadElement */:
|
|
13763
13795
|
return 1 /* Spread */;
|
|
@@ -14743,14 +14775,23 @@ function modifierToFlag(token) {
|
|
|
14743
14775
|
}
|
|
14744
14776
|
return 0 /* None */;
|
|
14745
14777
|
}
|
|
14778
|
+
function isBinaryLogicalOperator(token) {
|
|
14779
|
+
return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
|
|
14780
|
+
}
|
|
14746
14781
|
function isLogicalOperator(token) {
|
|
14747
|
-
return token
|
|
14782
|
+
return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
|
|
14748
14783
|
}
|
|
14749
14784
|
function isLogicalOrCoalescingAssignmentOperator(token) {
|
|
14750
14785
|
return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
|
|
14751
14786
|
}
|
|
14752
14787
|
function isLogicalOrCoalescingAssignmentExpression(expr) {
|
|
14753
|
-
return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
14788
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
14789
|
+
}
|
|
14790
|
+
function isLogicalOrCoalescingBinaryOperator(token) {
|
|
14791
|
+
return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
|
|
14792
|
+
}
|
|
14793
|
+
function isLogicalOrCoalescingBinaryExpression(expr) {
|
|
14794
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
|
|
14754
14795
|
}
|
|
14755
14796
|
function isAssignmentOperator(token) {
|
|
14756
14797
|
return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
|
|
@@ -15057,7 +15098,7 @@ function getInitializedVariables(node) {
|
|
|
15057
15098
|
return filter(node.declarations, isInitializedVariable);
|
|
15058
15099
|
}
|
|
15059
15100
|
function isInitializedVariable(node) {
|
|
15060
|
-
return node.initializer !== void 0;
|
|
15101
|
+
return isVariableDeclaration(node) && node.initializer !== void 0;
|
|
15061
15102
|
}
|
|
15062
15103
|
function isWatchSet(options) {
|
|
15063
15104
|
return options.watch && hasProperty(options, "watch");
|
|
@@ -15218,7 +15259,7 @@ function getLastChild(node) {
|
|
|
15218
15259
|
return lastChild;
|
|
15219
15260
|
}
|
|
15220
15261
|
function isTypeNodeKind(kind) {
|
|
15221
|
-
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 */;
|
|
15262
|
+
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 */;
|
|
15222
15263
|
}
|
|
15223
15264
|
function isAccessExpression(node) {
|
|
15224
15265
|
return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
|
|
@@ -15261,7 +15302,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
|
|
|
15261
15302
|
case 209 /* ElementAccessExpression */:
|
|
15262
15303
|
case 208 /* PropertyAccessExpression */:
|
|
15263
15304
|
case 232 /* NonNullExpression */:
|
|
15264
|
-
case
|
|
15305
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
15265
15306
|
case 235 /* SatisfiesExpression */:
|
|
15266
15307
|
node = node.expression;
|
|
15267
15308
|
continue;
|
|
@@ -16496,7 +16537,7 @@ function getContainingNodeArray(node) {
|
|
|
16496
16537
|
return parent.types;
|
|
16497
16538
|
case 186 /* TupleType */:
|
|
16498
16539
|
case 206 /* ArrayLiteralExpression */:
|
|
16499
|
-
case
|
|
16540
|
+
case 357 /* CommaListExpression */:
|
|
16500
16541
|
case 272 /* NamedImports */:
|
|
16501
16542
|
case 276 /* NamedExports */:
|
|
16502
16543
|
return parent.elements;
|
|
@@ -16670,6 +16711,16 @@ function isNonNullAccess(node) {
|
|
|
16670
16711
|
const kind = node.kind;
|
|
16671
16712
|
return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
|
|
16672
16713
|
}
|
|
16714
|
+
function isJSDocSatisfiesExpression(node) {
|
|
16715
|
+
return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
|
|
16716
|
+
}
|
|
16717
|
+
function getJSDocSatisfiesExpressionType(node) {
|
|
16718
|
+
return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
|
|
16719
|
+
}
|
|
16720
|
+
function tryGetJSDocSatisfiesTypeNode(node) {
|
|
16721
|
+
const tag = getJSDocSatisfiesTag(node);
|
|
16722
|
+
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
16723
|
+
}
|
|
16673
16724
|
|
|
16674
16725
|
// src/compiler/factory/baseNodeFactory.ts
|
|
16675
16726
|
function createBaseNodeFactory() {
|
|
@@ -17683,6 +17734,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17683
17734
|
get updateJSDocThrowsTag() {
|
|
17684
17735
|
return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
|
|
17685
17736
|
},
|
|
17737
|
+
get createJSDocSatisfiesTag() {
|
|
17738
|
+
return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
|
|
17739
|
+
},
|
|
17740
|
+
get updateJSDocSatisfiesTag() {
|
|
17741
|
+
return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
|
|
17742
|
+
},
|
|
17686
17743
|
createJSDocEnumTag,
|
|
17687
17744
|
updateJSDocEnumTag,
|
|
17688
17745
|
createJSDocUnknownTag,
|
|
@@ -20842,18 +20899,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20842
20899
|
return node;
|
|
20843
20900
|
}
|
|
20844
20901
|
function createSyntaxList(children) {
|
|
20845
|
-
const node = createBaseNode(
|
|
20902
|
+
const node = createBaseNode(354 /* SyntaxList */);
|
|
20846
20903
|
node._children = children;
|
|
20847
20904
|
return node;
|
|
20848
20905
|
}
|
|
20849
20906
|
function createNotEmittedStatement(original) {
|
|
20850
|
-
const node = createBaseNode(
|
|
20907
|
+
const node = createBaseNode(355 /* NotEmittedStatement */);
|
|
20851
20908
|
node.original = original;
|
|
20852
20909
|
setTextRange(node, original);
|
|
20853
20910
|
return node;
|
|
20854
20911
|
}
|
|
20855
20912
|
function createPartiallyEmittedExpression(expression, original) {
|
|
20856
|
-
const node = createBaseNode(
|
|
20913
|
+
const node = createBaseNode(356 /* PartiallyEmittedExpression */);
|
|
20857
20914
|
node.expression = expression;
|
|
20858
20915
|
node.original = original;
|
|
20859
20916
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -20875,7 +20932,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20875
20932
|
return node;
|
|
20876
20933
|
}
|
|
20877
20934
|
function createCommaListExpression(elements) {
|
|
20878
|
-
const node = createBaseNode(
|
|
20935
|
+
const node = createBaseNode(357 /* CommaListExpression */);
|
|
20879
20936
|
node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
|
|
20880
20937
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
20881
20938
|
return node;
|
|
@@ -20884,19 +20941,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20884
20941
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
20885
20942
|
}
|
|
20886
20943
|
function createEndOfDeclarationMarker(original) {
|
|
20887
|
-
const node = createBaseNode(
|
|
20944
|
+
const node = createBaseNode(359 /* EndOfDeclarationMarker */);
|
|
20888
20945
|
node.emitNode = {};
|
|
20889
20946
|
node.original = original;
|
|
20890
20947
|
return node;
|
|
20891
20948
|
}
|
|
20892
20949
|
function createMergeDeclarationMarker(original) {
|
|
20893
|
-
const node = createBaseNode(
|
|
20950
|
+
const node = createBaseNode(358 /* MergeDeclarationMarker */);
|
|
20894
20951
|
node.emitNode = {};
|
|
20895
20952
|
node.original = original;
|
|
20896
20953
|
return node;
|
|
20897
20954
|
}
|
|
20898
20955
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
20899
|
-
const node = createBaseNode(
|
|
20956
|
+
const node = createBaseNode(360 /* SyntheticReferenceExpression */);
|
|
20900
20957
|
node.expression = expression;
|
|
20901
20958
|
node.thisArg = thisArg;
|
|
20902
20959
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -21136,7 +21193,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
21136
21193
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
21137
21194
|
case 232 /* NonNullExpression */:
|
|
21138
21195
|
return updateNonNullExpression(outerExpression, expression);
|
|
21139
|
-
case
|
|
21196
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
21140
21197
|
return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
21141
21198
|
}
|
|
21142
21199
|
}
|
|
@@ -21672,7 +21729,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
|
|
|
21672
21729
|
case 213 /* TypeAssertionExpression */:
|
|
21673
21730
|
case 235 /* SatisfiesExpression */:
|
|
21674
21731
|
case 231 /* AsExpression */:
|
|
21675
|
-
case
|
|
21732
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
21676
21733
|
case 214 /* ParenthesizedExpression */:
|
|
21677
21734
|
case 106 /* SuperKeyword */:
|
|
21678
21735
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -23219,10 +23276,10 @@ function isMetaProperty(node) {
|
|
|
23219
23276
|
return node.kind === 233 /* MetaProperty */;
|
|
23220
23277
|
}
|
|
23221
23278
|
function isPartiallyEmittedExpression(node) {
|
|
23222
|
-
return node.kind ===
|
|
23279
|
+
return node.kind === 356 /* PartiallyEmittedExpression */;
|
|
23223
23280
|
}
|
|
23224
23281
|
function isCommaListExpression(node) {
|
|
23225
|
-
return node.kind ===
|
|
23282
|
+
return node.kind === 357 /* CommaListExpression */;
|
|
23226
23283
|
}
|
|
23227
23284
|
function isTemplateSpan(node) {
|
|
23228
23285
|
return node.kind === 236 /* TemplateSpan */;
|
|
@@ -23345,10 +23402,10 @@ function isExportSpecifier(node) {
|
|
|
23345
23402
|
return node.kind === 278 /* ExportSpecifier */;
|
|
23346
23403
|
}
|
|
23347
23404
|
function isNotEmittedStatement(node) {
|
|
23348
|
-
return node.kind ===
|
|
23405
|
+
return node.kind === 355 /* NotEmittedStatement */;
|
|
23349
23406
|
}
|
|
23350
23407
|
function isSyntheticReference(node) {
|
|
23351
|
-
return node.kind ===
|
|
23408
|
+
return node.kind === 360 /* SyntheticReferenceExpression */;
|
|
23352
23409
|
}
|
|
23353
23410
|
function isExternalModuleReference(node) {
|
|
23354
23411
|
return node.kind === 280 /* ExternalModuleReference */;
|
|
@@ -23515,6 +23572,9 @@ function isJSDocPropertyTag(node) {
|
|
|
23515
23572
|
function isJSDocImplementsTag(node) {
|
|
23516
23573
|
return node.kind === 332 /* JSDocImplementsTag */;
|
|
23517
23574
|
}
|
|
23575
|
+
function isJSDocSatisfiesTag(node) {
|
|
23576
|
+
return node.kind === 353 /* JSDocSatisfiesTag */;
|
|
23577
|
+
}
|
|
23518
23578
|
|
|
23519
23579
|
// src/compiler/factory/utilities.ts
|
|
23520
23580
|
function createEmptyExports(factory2) {
|
|
@@ -23870,7 +23930,7 @@ function startsWithUseStrict(statements) {
|
|
|
23870
23930
|
return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
|
|
23871
23931
|
}
|
|
23872
23932
|
function isCommaSequence(node) {
|
|
23873
|
-
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind ===
|
|
23933
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
|
|
23874
23934
|
}
|
|
23875
23935
|
function isJSDocTypeAssertion(node) {
|
|
23876
23936
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -23893,7 +23953,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
23893
23953
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
23894
23954
|
case 232 /* NonNullExpression */:
|
|
23895
23955
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
23896
|
-
case
|
|
23956
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
23897
23957
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
23898
23958
|
}
|
|
23899
23959
|
return false;
|
|
@@ -24885,7 +24945,7 @@ var forEachChildTable = {
|
|
|
24885
24945
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
24886
24946
|
return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
|
|
24887
24947
|
},
|
|
24888
|
-
[
|
|
24948
|
+
[357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
24889
24949
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
24890
24950
|
},
|
|
24891
24951
|
[281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -24957,6 +25017,7 @@ var forEachChildTable = {
|
|
|
24957
25017
|
[347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
|
|
24958
25018
|
[346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
|
|
24959
25019
|
[343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
|
|
25020
|
+
[353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
|
|
24960
25021
|
[352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
|
|
24961
25022
|
[342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
|
|
24962
25023
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
@@ -24976,7 +25037,7 @@ var forEachChildTable = {
|
|
|
24976
25037
|
[339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
24977
25038
|
[334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
24978
25039
|
[340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
24979
|
-
[
|
|
25040
|
+
[356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
24980
25041
|
};
|
|
24981
25042
|
function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
|
|
24982
25043
|
return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -31037,6 +31098,9 @@ var Parser;
|
|
|
31037
31098
|
case "overload":
|
|
31038
31099
|
tag = parseOverloadTag(start2, tagName, margin, indentText);
|
|
31039
31100
|
break;
|
|
31101
|
+
case "satisfies":
|
|
31102
|
+
tag = parseSatisfiesTag(start2, tagName, margin, indentText);
|
|
31103
|
+
break;
|
|
31040
31104
|
case "see":
|
|
31041
31105
|
tag = parseSeeTag(start2, tagName, margin, indentText);
|
|
31042
31106
|
break;
|
|
@@ -31345,6 +31409,14 @@ var Parser;
|
|
|
31345
31409
|
const className = parseExpressionWithTypeArgumentsForAugments();
|
|
31346
31410
|
return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
|
|
31347
31411
|
}
|
|
31412
|
+
function parseSatisfiesTag(start2, tagName, margin, indentText) {
|
|
31413
|
+
const typeExpression = parseJSDocTypeExpression(
|
|
31414
|
+
/*mayOmitBraces*/
|
|
31415
|
+
false
|
|
31416
|
+
);
|
|
31417
|
+
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
31418
|
+
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
|
|
31419
|
+
}
|
|
31348
31420
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
31349
31421
|
const usedBrace = parseOptional(18 /* OpenBraceToken */);
|
|
31350
31422
|
const pos = getNodePos();
|
|
@@ -33181,7 +33253,7 @@ var commandOptionsWithoutBuild = [
|
|
|
33181
33253
|
{
|
|
33182
33254
|
name: "allowImportingTsExtensions",
|
|
33183
33255
|
type: "boolean",
|
|
33184
|
-
|
|
33256
|
+
affectsSemanticDiagnostics: true,
|
|
33185
33257
|
category: Diagnostics.Modules,
|
|
33186
33258
|
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
33187
33259
|
defaultValueDescription: false
|
|
@@ -34946,7 +35018,7 @@ function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {
|
|
|
34946
35018
|
const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
|
|
34947
35019
|
json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
|
|
34948
35020
|
let extendedConfigPath;
|
|
34949
|
-
if (json.extends) {
|
|
35021
|
+
if (json.extends || json.extends === "") {
|
|
34950
35022
|
if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
|
|
34951
35023
|
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
|
|
34952
35024
|
} else {
|
|
@@ -35073,7 +35145,11 @@ function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiag
|
|
|
35073
35145
|
if (resolved.resolvedModule) {
|
|
35074
35146
|
return resolved.resolvedModule.resolvedFileName;
|
|
35075
35147
|
}
|
|
35076
|
-
|
|
35148
|
+
if (extendedConfig === "") {
|
|
35149
|
+
errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
|
|
35150
|
+
} else {
|
|
35151
|
+
errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
|
|
35152
|
+
}
|
|
35077
35153
|
return void 0;
|
|
35078
35154
|
}
|
|
35079
35155
|
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
|
|
@@ -35346,6 +35422,7 @@ function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile,
|
|
|
35346
35422
|
}
|
|
35347
35423
|
}
|
|
35348
35424
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
35425
|
+
Debug.assert(typeof spec === "string");
|
|
35349
35426
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
35350
35427
|
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
35351
35428
|
} else if (invalidDotDotAfterRecursiveWildcard(spec)) {
|
|
@@ -37765,7 +37842,7 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
37765
37842
|
}
|
|
37766
37843
|
}
|
|
37767
37844
|
function shouldAllowImportingTsExtension(compilerOptions, fromFileName) {
|
|
37768
|
-
return
|
|
37845
|
+
return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName);
|
|
37769
37846
|
}
|
|
37770
37847
|
function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {
|
|
37771
37848
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
@@ -38634,13 +38711,12 @@ function createBinder() {
|
|
|
38634
38711
|
} else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
|
|
38635
38712
|
node = node.operand;
|
|
38636
38713
|
} else {
|
|
38637
|
-
return
|
|
38714
|
+
return isLogicalOrCoalescingBinaryExpression(node);
|
|
38638
38715
|
}
|
|
38639
38716
|
}
|
|
38640
38717
|
}
|
|
38641
38718
|
function isLogicalAssignmentExpression(node) {
|
|
38642
|
-
|
|
38643
|
-
return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
|
|
38719
|
+
return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
|
|
38644
38720
|
}
|
|
38645
38721
|
function isTopLevelLogicalExpression(node) {
|
|
38646
38722
|
while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
|
|
@@ -39023,7 +39099,7 @@ function createBinder() {
|
|
|
39023
39099
|
};
|
|
39024
39100
|
}
|
|
39025
39101
|
const operator = node.operatorToken.kind;
|
|
39026
|
-
if (operator
|
|
39102
|
+
if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
|
|
39027
39103
|
if (isTopLevelLogicalExpression(node)) {
|
|
39028
39104
|
const postExpressionLabel = createBranchLabel();
|
|
39029
39105
|
bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
|
|
@@ -42489,7 +42565,7 @@ function createTypeChecker(host) {
|
|
|
42489
42565
|
if (jsxFragmentPragma) {
|
|
42490
42566
|
const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
42491
42567
|
file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
42492
|
-
visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
42568
|
+
visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName);
|
|
42493
42569
|
if (file.localJsxFragmentFactory) {
|
|
42494
42570
|
return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
42495
42571
|
}
|
|
@@ -42532,7 +42608,7 @@ function createTypeChecker(host) {
|
|
|
42532
42608
|
if (jsxPragma) {
|
|
42533
42609
|
const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
42534
42610
|
file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
42535
|
-
visitNode(file.localJsxFactory, markAsSynthetic);
|
|
42611
|
+
visitNode(file.localJsxFactory, markAsSynthetic, isEntityName);
|
|
42536
42612
|
if (file.localJsxFactory) {
|
|
42537
42613
|
return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
42538
42614
|
}
|
|
@@ -44043,6 +44119,7 @@ function createTypeChecker(host) {
|
|
|
44043
44119
|
return valueSymbol;
|
|
44044
44120
|
}
|
|
44045
44121
|
const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
44122
|
+
Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
44046
44123
|
result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
|
|
44047
44124
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
44048
44125
|
if (valueSymbol.valueDeclaration)
|
|
@@ -47682,7 +47759,7 @@ function createTypeChecker(host) {
|
|
|
47682
47759
|
}
|
|
47683
47760
|
let hadError = false;
|
|
47684
47761
|
const file = getSourceFileOfNode(existing);
|
|
47685
|
-
const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
|
|
47762
|
+
const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode);
|
|
47686
47763
|
if (hadError) {
|
|
47687
47764
|
return void 0;
|
|
47688
47765
|
}
|
|
@@ -47695,16 +47772,16 @@ function createTypeChecker(host) {
|
|
|
47695
47772
|
return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
|
|
47696
47773
|
}
|
|
47697
47774
|
if (isJSDocNullableType(node)) {
|
|
47698
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
|
|
47775
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
|
|
47699
47776
|
}
|
|
47700
47777
|
if (isJSDocOptionalType(node)) {
|
|
47701
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
47778
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
47702
47779
|
}
|
|
47703
47780
|
if (isJSDocNonNullableType(node)) {
|
|
47704
47781
|
return visitNode(node.type, visitExistingNodeTreeSymbols);
|
|
47705
47782
|
}
|
|
47706
47783
|
if (isJSDocVariadicType(node)) {
|
|
47707
|
-
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
|
|
47784
|
+
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
47708
47785
|
}
|
|
47709
47786
|
if (isJSDocTypeLiteral(node)) {
|
|
47710
47787
|
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
|
|
@@ -47716,7 +47793,7 @@ function createTypeChecker(host) {
|
|
|
47716
47793
|
void 0,
|
|
47717
47794
|
name,
|
|
47718
47795
|
t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
47719
|
-
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47796
|
+
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47720
47797
|
);
|
|
47721
47798
|
}));
|
|
47722
47799
|
}
|
|
@@ -47735,9 +47812,9 @@ function createTypeChecker(host) {
|
|
|
47735
47812
|
"x",
|
|
47736
47813
|
/*questionToken*/
|
|
47737
47814
|
void 0,
|
|
47738
|
-
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
|
|
47815
|
+
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode)
|
|
47739
47816
|
)],
|
|
47740
|
-
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
|
|
47817
|
+
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode)
|
|
47741
47818
|
)]);
|
|
47742
47819
|
}
|
|
47743
47820
|
if (isJSDocFunctionType(node)) {
|
|
@@ -47746,33 +47823,33 @@ function createTypeChecker(host) {
|
|
|
47746
47823
|
return factory.createConstructorTypeNode(
|
|
47747
47824
|
/*modifiers*/
|
|
47748
47825
|
void 0,
|
|
47749
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
47826
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
47750
47827
|
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
|
|
47751
47828
|
/*modifiers*/
|
|
47752
47829
|
void 0,
|
|
47753
47830
|
getEffectiveDotDotDotForParameter(p),
|
|
47754
47831
|
getNameForJSDocFunctionParameter(p, i),
|
|
47755
47832
|
p.questionToken,
|
|
47756
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
47833
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
47757
47834
|
/*initializer*/
|
|
47758
47835
|
void 0
|
|
47759
47836
|
)),
|
|
47760
|
-
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47837
|
+
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47761
47838
|
);
|
|
47762
47839
|
} else {
|
|
47763
47840
|
return factory.createFunctionTypeNode(
|
|
47764
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
47841
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
47765
47842
|
map(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
47766
47843
|
/*modifiers*/
|
|
47767
47844
|
void 0,
|
|
47768
47845
|
getEffectiveDotDotDotForParameter(p),
|
|
47769
47846
|
getNameForJSDocFunctionParameter(p, i),
|
|
47770
47847
|
p.questionToken,
|
|
47771
|
-
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
47848
|
+
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
|
|
47772
47849
|
/*initializer*/
|
|
47773
47850
|
void 0
|
|
47774
47851
|
)),
|
|
47775
|
-
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47852
|
+
visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
47776
47853
|
);
|
|
47777
47854
|
}
|
|
47778
47855
|
}
|
|
@@ -48694,7 +48771,7 @@ function createTypeChecker(host) {
|
|
|
48694
48771
|
break;
|
|
48695
48772
|
}
|
|
48696
48773
|
case 268 /* ImportEqualsDeclaration */:
|
|
48697
|
-
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
|
|
48774
|
+
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) {
|
|
48698
48775
|
serializeMaybeAliasAssignment(symbol);
|
|
48699
48776
|
break;
|
|
48700
48777
|
}
|
|
@@ -61971,7 +62048,7 @@ function createTypeChecker(host) {
|
|
|
61971
62048
|
} else {
|
|
61972
62049
|
const middleLength = targetArity - startLength - endLength;
|
|
61973
62050
|
if (middleLength === 2) {
|
|
61974
|
-
if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */
|
|
62051
|
+
if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */) {
|
|
61975
62052
|
const targetInfo = getInferenceInfoForType(elementTypes[startLength]);
|
|
61976
62053
|
if (targetInfo && targetInfo.impliedArity !== void 0) {
|
|
61977
62054
|
inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]);
|
|
@@ -61985,7 +62062,7 @@ function createTypeChecker(host) {
|
|
|
61985
62062
|
inferFromTypes(sliceTupleType(source, startLength, sourceArity - (startLength + impliedArity)), elementTypes[startLength]);
|
|
61986
62063
|
inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength + impliedArity, endLength), elementTypes[startLength + 1]);
|
|
61987
62064
|
}
|
|
61988
|
-
} else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */
|
|
62065
|
+
} else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */) {
|
|
61989
62066
|
const param = (_b = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _b.typeParameter;
|
|
61990
62067
|
const constraint = param && getBaseConstraintOfType(param);
|
|
61991
62068
|
if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) {
|
|
@@ -62005,10 +62082,10 @@ function createTypeChecker(host) {
|
|
|
62005
62082
|
}
|
|
62006
62083
|
} else if (middleLength === 1 && elementFlags[startLength] & 8 /* Variadic */) {
|
|
62007
62084
|
const endsInOptional = target.target.elementFlags[targetArity - 1] & 2 /* Optional */;
|
|
62008
|
-
const sourceSlice =
|
|
62085
|
+
const sourceSlice = sliceTupleType(source, startLength, endLength);
|
|
62009
62086
|
inferWithPriority(sourceSlice, elementTypes[startLength], endsInOptional ? 2 /* SpeculativeTuple */ : 0);
|
|
62010
62087
|
} else if (middleLength === 1 && elementFlags[startLength] & 4 /* Rest */) {
|
|
62011
|
-
const restType =
|
|
62088
|
+
const restType = getElementTypeOfSliceOfTupleType(source, startLength, endLength);
|
|
62012
62089
|
if (restType) {
|
|
62013
62090
|
inferFromTypes(restType, elementTypes[startLength]);
|
|
62014
62091
|
}
|
|
@@ -64963,7 +65040,7 @@ function createTypeChecker(host) {
|
|
|
64963
65040
|
}
|
|
64964
65041
|
}
|
|
64965
65042
|
function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
|
|
64966
|
-
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
65043
|
+
const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
|
|
64967
65044
|
if (typeNode) {
|
|
64968
65045
|
return getTypeFromTypeNode(typeNode);
|
|
64969
65046
|
}
|
|
@@ -65572,8 +65649,16 @@ function createTypeChecker(host) {
|
|
|
65572
65649
|
Debug.assert(parent.parent.kind === 225 /* TemplateExpression */);
|
|
65573
65650
|
return getContextualTypeForSubstitutionExpression(parent.parent, node);
|
|
65574
65651
|
case 214 /* ParenthesizedExpression */: {
|
|
65575
|
-
|
|
65576
|
-
|
|
65652
|
+
if (isInJSFile(parent)) {
|
|
65653
|
+
if (isJSDocSatisfiesExpression(parent)) {
|
|
65654
|
+
return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent));
|
|
65655
|
+
}
|
|
65656
|
+
const typeTag = getJSDocTypeTag(parent);
|
|
65657
|
+
if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
|
|
65658
|
+
return getTypeFromTypeNode(typeTag.typeExpression.type);
|
|
65659
|
+
}
|
|
65660
|
+
}
|
|
65661
|
+
return getContextualType(parent, contextFlags);
|
|
65577
65662
|
}
|
|
65578
65663
|
case 232 /* NonNullExpression */:
|
|
65579
65664
|
return getContextualType(parent, contextFlags);
|
|
@@ -69777,12 +69862,15 @@ function createTypeChecker(host) {
|
|
|
69777
69862
|
}
|
|
69778
69863
|
function checkSatisfiesExpression(node) {
|
|
69779
69864
|
checkSourceElement(node.type);
|
|
69780
|
-
|
|
69781
|
-
|
|
69865
|
+
return checkSatisfiesExpressionWorker(node.expression, node.type);
|
|
69866
|
+
}
|
|
69867
|
+
function checkSatisfiesExpressionWorker(expression, target, checkMode) {
|
|
69868
|
+
const exprType = checkExpression(expression, checkMode);
|
|
69869
|
+
const targetType = getTypeFromTypeNode(target);
|
|
69782
69870
|
if (isErrorType(targetType)) {
|
|
69783
69871
|
return targetType;
|
|
69784
69872
|
}
|
|
69785
|
-
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType,
|
|
69873
|
+
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
|
|
69786
69874
|
return exprType;
|
|
69787
69875
|
}
|
|
69788
69876
|
function checkMetaProperty(node) {
|
|
@@ -71189,12 +71277,12 @@ function createTypeChecker(host) {
|
|
|
71189
71277
|
void 0
|
|
71190
71278
|
);
|
|
71191
71279
|
const operator = operatorToken.kind;
|
|
71192
|
-
if (operator
|
|
71193
|
-
|
|
71194
|
-
|
|
71195
|
-
|
|
71196
|
-
|
|
71197
|
-
|
|
71280
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
71281
|
+
let parent = node.parent;
|
|
71282
|
+
while (parent.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent)) {
|
|
71283
|
+
parent = parent.parent;
|
|
71284
|
+
}
|
|
71285
|
+
if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent)) {
|
|
71198
71286
|
checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent) ? parent.thenStatement : void 0);
|
|
71199
71287
|
}
|
|
71200
71288
|
checkTruthinessOfType(leftType, node.left);
|
|
@@ -71271,7 +71359,7 @@ function createTypeChecker(host) {
|
|
|
71271
71359
|
return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
|
|
71272
71360
|
}
|
|
71273
71361
|
let leftType;
|
|
71274
|
-
if (operator
|
|
71362
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
71275
71363
|
leftType = checkTruthinessExpression(left, checkMode);
|
|
71276
71364
|
} else {
|
|
71277
71365
|
leftType = checkExpression(left, checkMode);
|
|
@@ -71814,6 +71902,12 @@ function createTypeChecker(host) {
|
|
|
71814
71902
|
}
|
|
71815
71903
|
function checkDeclarationInitializer(declaration, checkMode, contextualType) {
|
|
71816
71904
|
const initializer = getEffectiveInitializer(declaration);
|
|
71905
|
+
if (isInJSFile(declaration)) {
|
|
71906
|
+
const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
|
|
71907
|
+
if (typeNode) {
|
|
71908
|
+
return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
|
|
71909
|
+
}
|
|
71910
|
+
}
|
|
71817
71911
|
const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
|
|
71818
71912
|
initializer,
|
|
71819
71913
|
contextualType,
|
|
@@ -72141,9 +72235,14 @@ function createTypeChecker(host) {
|
|
|
72141
72235
|
}
|
|
72142
72236
|
}
|
|
72143
72237
|
function checkParenthesizedExpression(node, checkMode) {
|
|
72144
|
-
if (hasJSDocNodes(node)
|
|
72145
|
-
|
|
72146
|
-
|
|
72238
|
+
if (hasJSDocNodes(node)) {
|
|
72239
|
+
if (isJSDocSatisfiesExpression(node)) {
|
|
72240
|
+
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
72241
|
+
}
|
|
72242
|
+
if (isJSDocTypeAssertion(node)) {
|
|
72243
|
+
const type = getJSDocTypeAssertionType(node);
|
|
72244
|
+
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
72245
|
+
}
|
|
72147
72246
|
}
|
|
72148
72247
|
return checkExpression(node.expression, checkMode);
|
|
72149
72248
|
}
|
|
@@ -73845,6 +73944,19 @@ function createTypeChecker(host) {
|
|
|
73845
73944
|
function checkJSDocTypeTag(node) {
|
|
73846
73945
|
checkSourceElement(node.typeExpression);
|
|
73847
73946
|
}
|
|
73947
|
+
function checkJSDocSatisfiesTag(node) {
|
|
73948
|
+
checkSourceElement(node.typeExpression);
|
|
73949
|
+
const host2 = getEffectiveJSDocHost(node);
|
|
73950
|
+
if (host2) {
|
|
73951
|
+
const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
|
|
73952
|
+
if (length(tags) > 1) {
|
|
73953
|
+
for (let i = 1; i < length(tags); i++) {
|
|
73954
|
+
const tagName = tags[i].tagName;
|
|
73955
|
+
error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
|
|
73956
|
+
}
|
|
73957
|
+
}
|
|
73958
|
+
}
|
|
73959
|
+
}
|
|
73848
73960
|
function checkJSDocLinkLikeTag(node) {
|
|
73849
73961
|
if (node.name) {
|
|
73850
73962
|
resolveJSDocMemberName(
|
|
@@ -74630,15 +74742,24 @@ function createTypeChecker(host) {
|
|
|
74630
74742
|
function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
|
|
74631
74743
|
if (!strictNullChecks)
|
|
74632
74744
|
return;
|
|
74633
|
-
|
|
74634
|
-
|
|
74635
|
-
|
|
74636
|
-
helper(
|
|
74745
|
+
bothHelper(condExpr, body);
|
|
74746
|
+
function bothHelper(condExpr2, body2) {
|
|
74747
|
+
condExpr2 = skipParentheses(condExpr2);
|
|
74748
|
+
helper(condExpr2, body2);
|
|
74749
|
+
while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
|
|
74750
|
+
condExpr2 = skipParentheses(condExpr2.left);
|
|
74751
|
+
helper(condExpr2, body2);
|
|
74752
|
+
}
|
|
74637
74753
|
}
|
|
74638
74754
|
function helper(condExpr2, body2) {
|
|
74639
|
-
const location =
|
|
74640
|
-
if (isModuleExportsAccessExpression(location))
|
|
74755
|
+
const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
|
|
74756
|
+
if (isModuleExportsAccessExpression(location)) {
|
|
74641
74757
|
return;
|
|
74758
|
+
}
|
|
74759
|
+
if (isLogicalOrCoalescingBinaryExpression(location)) {
|
|
74760
|
+
bothHelper(location, body2);
|
|
74761
|
+
return;
|
|
74762
|
+
}
|
|
74642
74763
|
const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
|
|
74643
74764
|
const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
|
|
74644
74765
|
if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
|
|
@@ -74648,7 +74769,7 @@ function createTypeChecker(host) {
|
|
|
74648
74769
|
if (callSignatures.length === 0 && !isPromise) {
|
|
74649
74770
|
return;
|
|
74650
74771
|
}
|
|
74651
|
-
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name :
|
|
74772
|
+
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
|
|
74652
74773
|
const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
|
|
74653
74774
|
if (!testedSymbol && !isPromise) {
|
|
74654
74775
|
return;
|
|
@@ -77449,6 +77570,8 @@ function createTypeChecker(host) {
|
|
|
77449
77570
|
case 338 /* JSDocProtectedTag */:
|
|
77450
77571
|
case 337 /* JSDocPrivateTag */:
|
|
77451
77572
|
return checkJSDocAccessibilityModifiers(node);
|
|
77573
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
77574
|
+
return checkJSDocSatisfiesTag(node);
|
|
77452
77575
|
case 196 /* IndexedAccessType */:
|
|
77453
77576
|
return checkIndexedAccessType(node);
|
|
77454
77577
|
case 197 /* MappedType */:
|
|
@@ -81007,13 +81130,10 @@ var SymbolTrackerImpl = class {
|
|
|
81007
81130
|
|
|
81008
81131
|
// src/compiler/visitorPublic.ts
|
|
81009
81132
|
function visitNode(node, visitor, test, lift) {
|
|
81010
|
-
if (node === void 0
|
|
81133
|
+
if (node === void 0) {
|
|
81011
81134
|
return node;
|
|
81012
81135
|
}
|
|
81013
81136
|
const visited = visitor(node);
|
|
81014
|
-
if (visited === node) {
|
|
81015
|
-
return node;
|
|
81016
|
-
}
|
|
81017
81137
|
let visitedNode;
|
|
81018
81138
|
if (visited === void 0) {
|
|
81019
81139
|
return void 0;
|
|
@@ -81026,7 +81146,7 @@ function visitNode(node, visitor, test, lift) {
|
|
|
81026
81146
|
return visitedNode;
|
|
81027
81147
|
}
|
|
81028
81148
|
function visitNodes2(nodes, visitor, test, start, count) {
|
|
81029
|
-
if (nodes === void 0
|
|
81149
|
+
if (nodes === void 0) {
|
|
81030
81150
|
return nodes;
|
|
81031
81151
|
}
|
|
81032
81152
|
const length2 = nodes.length;
|
|
@@ -81075,25 +81195,30 @@ function visitArrayWorker(nodes, visitor, test, start, count) {
|
|
|
81075
81195
|
}
|
|
81076
81196
|
for (let i = 0; i < count; i++) {
|
|
81077
81197
|
const node = nodes[i + start];
|
|
81078
|
-
const visited = node !== void 0 ? visitor(node) : void 0;
|
|
81198
|
+
const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0;
|
|
81079
81199
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
81080
81200
|
if (updated === void 0) {
|
|
81081
81201
|
updated = nodes.slice(0, i);
|
|
81202
|
+
Debug.assertEachNode(updated, test);
|
|
81082
81203
|
}
|
|
81083
81204
|
if (visited) {
|
|
81084
81205
|
if (isArray(visited)) {
|
|
81085
81206
|
for (const visitedNode of visited) {
|
|
81086
|
-
|
|
81207
|
+
Debug.assertNode(visitedNode, test);
|
|
81087
81208
|
updated.push(visitedNode);
|
|
81088
81209
|
}
|
|
81089
81210
|
} else {
|
|
81090
|
-
|
|
81211
|
+
Debug.assertNode(visited, test);
|
|
81091
81212
|
updated.push(visited);
|
|
81092
81213
|
}
|
|
81093
81214
|
}
|
|
81094
81215
|
}
|
|
81095
81216
|
}
|
|
81096
|
-
|
|
81217
|
+
if (updated) {
|
|
81218
|
+
return updated;
|
|
81219
|
+
}
|
|
81220
|
+
Debug.assertEachNode(nodes, test);
|
|
81221
|
+
return nodes;
|
|
81097
81222
|
}
|
|
81098
81223
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) {
|
|
81099
81224
|
context.startLexicalEnvironment();
|
|
@@ -81107,7 +81232,7 @@ function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2)
|
|
|
81107
81232
|
context.startLexicalEnvironment();
|
|
81108
81233
|
if (nodes) {
|
|
81109
81234
|
context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
|
|
81110
|
-
updated = nodesVisitor(nodes, visitor,
|
|
81235
|
+
updated = nodesVisitor(nodes, visitor, isParameter);
|
|
81111
81236
|
if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
|
|
81112
81237
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
81113
81238
|
}
|
|
@@ -81229,6 +81354,7 @@ function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {
|
|
|
81229
81354
|
function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
|
|
81230
81355
|
context.startBlockScope();
|
|
81231
81356
|
const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
|
|
81357
|
+
Debug.assert(updated);
|
|
81232
81358
|
const declarations = context.endBlockScope();
|
|
81233
81359
|
if (some(declarations)) {
|
|
81234
81360
|
if (isBlock(updated)) {
|
|
@@ -81251,14 +81377,14 @@ var visitEachChildTable = {
|
|
|
81251
81377
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81252
81378
|
return context.factory.updateQualifiedName(
|
|
81253
81379
|
node,
|
|
81254
|
-
nodeVisitor(node.left, visitor, isEntityName),
|
|
81255
|
-
nodeVisitor(node.right, visitor, isIdentifier)
|
|
81380
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)),
|
|
81381
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier))
|
|
81256
81382
|
);
|
|
81257
81383
|
},
|
|
81258
81384
|
[164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81259
81385
|
return context.factory.updateComputedPropertyName(
|
|
81260
81386
|
node,
|
|
81261
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81387
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81262
81388
|
);
|
|
81263
81389
|
},
|
|
81264
81390
|
// Signature elements
|
|
@@ -81266,7 +81392,7 @@ var visitEachChildTable = {
|
|
|
81266
81392
|
return context.factory.updateTypeParameterDeclaration(
|
|
81267
81393
|
node,
|
|
81268
81394
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81269
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81395
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81270
81396
|
nodeVisitor(node.constraint, visitor, isTypeNode),
|
|
81271
81397
|
nodeVisitor(node.default, visitor, isTypeNode)
|
|
81272
81398
|
);
|
|
@@ -81275,9 +81401,9 @@ var visitEachChildTable = {
|
|
|
81275
81401
|
return context.factory.updateParameterDeclaration(
|
|
81276
81402
|
node,
|
|
81277
81403
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81278
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
81279
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
81280
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81404
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
81405
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
81406
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81281
81407
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81282
81408
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81283
81409
|
);
|
|
@@ -81285,7 +81411,7 @@ var visitEachChildTable = {
|
|
|
81285
81411
|
[167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81286
81412
|
return context.factory.updateDecorator(
|
|
81287
81413
|
node,
|
|
81288
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81414
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81289
81415
|
);
|
|
81290
81416
|
},
|
|
81291
81417
|
// Type elements
|
|
@@ -81293,19 +81419,19 @@ var visitEachChildTable = {
|
|
|
81293
81419
|
return context.factory.updatePropertySignature(
|
|
81294
81420
|
node,
|
|
81295
81421
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81296
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81297
|
-
nodeVisitor(node.questionToken, tokenVisitor,
|
|
81422
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81423
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81298
81424
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81299
81425
|
);
|
|
81300
81426
|
},
|
|
81301
81427
|
[169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81302
|
-
var _a2;
|
|
81428
|
+
var _a2, _b;
|
|
81303
81429
|
return context.factory.updatePropertyDeclaration(
|
|
81304
81430
|
node,
|
|
81305
81431
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81306
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81432
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81307
81433
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
81308
|
-
nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
|
|
81434
|
+
tokenVisitor ? nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : (_b = node.questionToken) != null ? _b : node.exclamationToken,
|
|
81309
81435
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81310
81436
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81311
81437
|
);
|
|
@@ -81314,10 +81440,10 @@ var visitEachChildTable = {
|
|
|
81314
81440
|
return context.factory.updateMethodSignature(
|
|
81315
81441
|
node,
|
|
81316
81442
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81317
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81318
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81443
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81444
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81319
81445
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81320
|
-
nodesVisitor(node.parameters, visitor,
|
|
81446
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81321
81447
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81322
81448
|
);
|
|
81323
81449
|
},
|
|
@@ -81325,9 +81451,9 @@ var visitEachChildTable = {
|
|
|
81325
81451
|
return context.factory.updateMethodDeclaration(
|
|
81326
81452
|
node,
|
|
81327
81453
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81328
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81329
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81330
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81454
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81455
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81456
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81331
81457
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81332
81458
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81333
81459
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
@@ -81346,7 +81472,7 @@ var visitEachChildTable = {
|
|
|
81346
81472
|
return context.factory.updateGetAccessorDeclaration(
|
|
81347
81473
|
node,
|
|
81348
81474
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81349
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81475
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81350
81476
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81351
81477
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81352
81478
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
@@ -81356,7 +81482,7 @@ var visitEachChildTable = {
|
|
|
81356
81482
|
return context.factory.updateSetAccessorDeclaration(
|
|
81357
81483
|
node,
|
|
81358
81484
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
81359
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
81485
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
81360
81486
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81361
81487
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
81362
81488
|
);
|
|
@@ -81373,7 +81499,7 @@ var visitEachChildTable = {
|
|
|
81373
81499
|
return context.factory.updateCallSignature(
|
|
81374
81500
|
node,
|
|
81375
81501
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81376
|
-
nodesVisitor(node.parameters, visitor,
|
|
81502
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81377
81503
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81378
81504
|
);
|
|
81379
81505
|
},
|
|
@@ -81381,7 +81507,7 @@ var visitEachChildTable = {
|
|
|
81381
81507
|
return context.factory.updateConstructSignature(
|
|
81382
81508
|
node,
|
|
81383
81509
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81384
|
-
nodesVisitor(node.parameters, visitor,
|
|
81510
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81385
81511
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81386
81512
|
);
|
|
81387
81513
|
},
|
|
@@ -81389,8 +81515,8 @@ var visitEachChildTable = {
|
|
|
81389
81515
|
return context.factory.updateIndexSignature(
|
|
81390
81516
|
node,
|
|
81391
81517
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81392
|
-
nodesVisitor(node.parameters, visitor,
|
|
81393
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81518
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81519
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81394
81520
|
);
|
|
81395
81521
|
},
|
|
81396
81522
|
// Types
|
|
@@ -81398,14 +81524,14 @@ var visitEachChildTable = {
|
|
|
81398
81524
|
return context.factory.updateTypePredicateNode(
|
|
81399
81525
|
node,
|
|
81400
81526
|
nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
|
|
81401
|
-
nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
|
|
81527
|
+
Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)),
|
|
81402
81528
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81403
81529
|
);
|
|
81404
81530
|
},
|
|
81405
81531
|
[180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81406
81532
|
return context.factory.updateTypeReferenceNode(
|
|
81407
81533
|
node,
|
|
81408
|
-
nodeVisitor(node.typeName, visitor, isEntityName),
|
|
81534
|
+
Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)),
|
|
81409
81535
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
81410
81536
|
);
|
|
81411
81537
|
},
|
|
@@ -81413,8 +81539,8 @@ var visitEachChildTable = {
|
|
|
81413
81539
|
return context.factory.updateFunctionTypeNode(
|
|
81414
81540
|
node,
|
|
81415
81541
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81416
|
-
nodesVisitor(node.parameters, visitor,
|
|
81417
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81542
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81543
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81418
81544
|
);
|
|
81419
81545
|
},
|
|
81420
81546
|
[182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -81422,14 +81548,14 @@ var visitEachChildTable = {
|
|
|
81422
81548
|
node,
|
|
81423
81549
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81424
81550
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81425
|
-
nodesVisitor(node.parameters, visitor,
|
|
81426
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81551
|
+
nodesVisitor(node.parameters, visitor, isParameter),
|
|
81552
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81427
81553
|
);
|
|
81428
81554
|
},
|
|
81429
81555
|
[183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81430
81556
|
return context.factory.updateTypeQueryNode(
|
|
81431
81557
|
node,
|
|
81432
|
-
nodeVisitor(node.exprName, visitor, isEntityName),
|
|
81558
|
+
Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)),
|
|
81433
81559
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
81434
81560
|
);
|
|
81435
81561
|
},
|
|
@@ -81442,7 +81568,7 @@ var visitEachChildTable = {
|
|
|
81442
81568
|
[185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81443
81569
|
return context.factory.updateArrayTypeNode(
|
|
81444
81570
|
node,
|
|
81445
|
-
nodeVisitor(node.elementType, visitor, isTypeNode)
|
|
81571
|
+
Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode))
|
|
81446
81572
|
);
|
|
81447
81573
|
},
|
|
81448
81574
|
[186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -81454,13 +81580,13 @@ var visitEachChildTable = {
|
|
|
81454
81580
|
[187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81455
81581
|
return context.factory.updateOptionalTypeNode(
|
|
81456
81582
|
node,
|
|
81457
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81583
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81458
81584
|
);
|
|
81459
81585
|
},
|
|
81460
81586
|
[188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81461
81587
|
return context.factory.updateRestTypeNode(
|
|
81462
81588
|
node,
|
|
81463
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81589
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81464
81590
|
);
|
|
81465
81591
|
},
|
|
81466
81592
|
[189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -81478,22 +81604,22 @@ var visitEachChildTable = {
|
|
|
81478
81604
|
[191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81479
81605
|
return context.factory.updateConditionalTypeNode(
|
|
81480
81606
|
node,
|
|
81481
|
-
nodeVisitor(node.checkType, visitor, isTypeNode),
|
|
81482
|
-
nodeVisitor(node.extendsType, visitor, isTypeNode),
|
|
81483
|
-
nodeVisitor(node.trueType, visitor, isTypeNode),
|
|
81484
|
-
nodeVisitor(node.falseType, visitor, isTypeNode)
|
|
81607
|
+
Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)),
|
|
81608
|
+
Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)),
|
|
81609
|
+
Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)),
|
|
81610
|
+
Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode))
|
|
81485
81611
|
);
|
|
81486
81612
|
},
|
|
81487
81613
|
[192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81488
81614
|
return context.factory.updateInferTypeNode(
|
|
81489
81615
|
node,
|
|
81490
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
|
|
81616
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration))
|
|
81491
81617
|
);
|
|
81492
81618
|
},
|
|
81493
81619
|
[202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81494
81620
|
return context.factory.updateImportTypeNode(
|
|
81495
81621
|
node,
|
|
81496
|
-
nodeVisitor(node.argument, visitor, isTypeNode),
|
|
81622
|
+
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
81497
81623
|
nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
|
|
81498
81624
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
81499
81625
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
@@ -81503,45 +81629,45 @@ var visitEachChildTable = {
|
|
|
81503
81629
|
[298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81504
81630
|
return context.factory.updateImportTypeAssertionContainer(
|
|
81505
81631
|
node,
|
|
81506
|
-
nodeVisitor(node.assertClause, visitor, isAssertClause),
|
|
81632
|
+
Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)),
|
|
81507
81633
|
node.multiLine
|
|
81508
81634
|
);
|
|
81509
81635
|
},
|
|
81510
81636
|
[199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81511
81637
|
return context.factory.updateNamedTupleMember(
|
|
81512
81638
|
node,
|
|
81513
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
81514
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81515
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81516
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81639
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
81640
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81641
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
|
|
81642
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81517
81643
|
);
|
|
81518
81644
|
},
|
|
81519
81645
|
[193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81520
81646
|
return context.factory.updateParenthesizedType(
|
|
81521
81647
|
node,
|
|
81522
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81648
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81523
81649
|
);
|
|
81524
81650
|
},
|
|
81525
81651
|
[195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81526
81652
|
return context.factory.updateTypeOperatorNode(
|
|
81527
81653
|
node,
|
|
81528
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81654
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81529
81655
|
);
|
|
81530
81656
|
},
|
|
81531
81657
|
[196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81532
81658
|
return context.factory.updateIndexedAccessTypeNode(
|
|
81533
81659
|
node,
|
|
81534
|
-
nodeVisitor(node.objectType, visitor, isTypeNode),
|
|
81535
|
-
nodeVisitor(node.indexType, visitor, isTypeNode)
|
|
81660
|
+
Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)),
|
|
81661
|
+
Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode))
|
|
81536
81662
|
);
|
|
81537
81663
|
},
|
|
81538
81664
|
[197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81539
81665
|
return context.factory.updateMappedTypeNode(
|
|
81540
81666
|
node,
|
|
81541
|
-
nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
|
|
81542
|
-
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
|
|
81667
|
+
tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken,
|
|
81668
|
+
Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)),
|
|
81543
81669
|
nodeVisitor(node.nameType, visitor, isTypeNode),
|
|
81544
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
|
|
81670
|
+
tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken,
|
|
81545
81671
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81546
81672
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
81547
81673
|
);
|
|
@@ -81549,21 +81675,21 @@ var visitEachChildTable = {
|
|
|
81549
81675
|
[198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81550
81676
|
return context.factory.updateLiteralTypeNode(
|
|
81551
81677
|
node,
|
|
81552
|
-
nodeVisitor(node.literal, visitor,
|
|
81678
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral))
|
|
81553
81679
|
);
|
|
81554
81680
|
},
|
|
81555
81681
|
[200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81556
81682
|
return context.factory.updateTemplateLiteralType(
|
|
81557
81683
|
node,
|
|
81558
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
81684
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
81559
81685
|
nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
|
|
81560
81686
|
);
|
|
81561
81687
|
},
|
|
81562
81688
|
[201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81563
81689
|
return context.factory.updateTemplateLiteralTypeSpan(
|
|
81564
81690
|
node,
|
|
81565
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81566
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
81691
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
81692
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
81567
81693
|
);
|
|
81568
81694
|
},
|
|
81569
81695
|
// Binding patterns
|
|
@@ -81582,9 +81708,9 @@ var visitEachChildTable = {
|
|
|
81582
81708
|
[205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81583
81709
|
return context.factory.updateBindingElement(
|
|
81584
81710
|
node,
|
|
81585
|
-
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
81711
|
+
tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
|
|
81586
81712
|
nodeVisitor(node.propertyName, visitor, isPropertyName),
|
|
81587
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
81713
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
81588
81714
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81589
81715
|
);
|
|
81590
81716
|
},
|
|
@@ -81604,37 +81730,37 @@ var visitEachChildTable = {
|
|
|
81604
81730
|
[208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81605
81731
|
return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
|
|
81606
81732
|
node,
|
|
81607
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81608
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
81609
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
81733
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81734
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
81735
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
81610
81736
|
) : context.factory.updatePropertyAccessExpression(
|
|
81611
81737
|
node,
|
|
81612
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81613
|
-
nodeVisitor(node.name, visitor, isMemberName)
|
|
81738
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81739
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName))
|
|
81614
81740
|
);
|
|
81615
81741
|
},
|
|
81616
81742
|
[209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81617
81743
|
return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
|
|
81618
81744
|
node,
|
|
81619
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81620
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
81621
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
81745
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81746
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
81747
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
81622
81748
|
) : context.factory.updateElementAccessExpression(
|
|
81623
81749
|
node,
|
|
81624
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81625
|
-
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
81750
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81751
|
+
Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression))
|
|
81626
81752
|
);
|
|
81627
81753
|
},
|
|
81628
81754
|
[210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81629
81755
|
return isCallChain(node) ? context.factory.updateCallChain(
|
|
81630
81756
|
node,
|
|
81631
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81632
|
-
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
81757
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81758
|
+
tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken,
|
|
81633
81759
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81634
81760
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
81635
81761
|
) : context.factory.updateCallExpression(
|
|
81636
81762
|
node,
|
|
81637
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81763
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81638
81764
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81639
81765
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
81640
81766
|
);
|
|
@@ -81642,7 +81768,7 @@ var visitEachChildTable = {
|
|
|
81642
81768
|
[211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81643
81769
|
return context.factory.updateNewExpression(
|
|
81644
81770
|
node,
|
|
81645
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81771
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81646
81772
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81647
81773
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
81648
81774
|
);
|
|
@@ -81650,29 +81776,29 @@ var visitEachChildTable = {
|
|
|
81650
81776
|
[212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81651
81777
|
return context.factory.updateTaggedTemplateExpression(
|
|
81652
81778
|
node,
|
|
81653
|
-
nodeVisitor(node.tag, visitor, isExpression),
|
|
81779
|
+
Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)),
|
|
81654
81780
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
81655
|
-
nodeVisitor(node.template, visitor, isTemplateLiteral)
|
|
81781
|
+
Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral))
|
|
81656
81782
|
);
|
|
81657
81783
|
},
|
|
81658
81784
|
[213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81659
81785
|
return context.factory.updateTypeAssertion(
|
|
81660
81786
|
node,
|
|
81661
|
-
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81662
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81787
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)),
|
|
81788
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81663
81789
|
);
|
|
81664
81790
|
},
|
|
81665
81791
|
[214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81666
81792
|
return context.factory.updateParenthesizedExpression(
|
|
81667
81793
|
node,
|
|
81668
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81794
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81669
81795
|
);
|
|
81670
81796
|
},
|
|
81671
81797
|
[215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81672
81798
|
return context.factory.updateFunctionExpression(
|
|
81673
81799
|
node,
|
|
81674
81800
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81675
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81801
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81676
81802
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81677
81803
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81678
81804
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -81687,82 +81813,82 @@ var visitEachChildTable = {
|
|
|
81687
81813
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81688
81814
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
81689
81815
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81690
|
-
nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
|
|
81816
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken,
|
|
81691
81817
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
81692
81818
|
);
|
|
81693
81819
|
},
|
|
81694
81820
|
[217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81695
81821
|
return context.factory.updateDeleteExpression(
|
|
81696
81822
|
node,
|
|
81697
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81823
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81698
81824
|
);
|
|
81699
81825
|
},
|
|
81700
81826
|
[218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81701
81827
|
return context.factory.updateTypeOfExpression(
|
|
81702
81828
|
node,
|
|
81703
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81829
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81704
81830
|
);
|
|
81705
81831
|
},
|
|
81706
81832
|
[219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81707
81833
|
return context.factory.updateVoidExpression(
|
|
81708
81834
|
node,
|
|
81709
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81835
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81710
81836
|
);
|
|
81711
81837
|
},
|
|
81712
81838
|
[220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81713
81839
|
return context.factory.updateAwaitExpression(
|
|
81714
81840
|
node,
|
|
81715
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81841
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81716
81842
|
);
|
|
81717
81843
|
},
|
|
81718
81844
|
[221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81719
81845
|
return context.factory.updatePrefixUnaryExpression(
|
|
81720
81846
|
node,
|
|
81721
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
81847
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
81722
81848
|
);
|
|
81723
81849
|
},
|
|
81724
81850
|
[222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81725
81851
|
return context.factory.updatePostfixUnaryExpression(
|
|
81726
81852
|
node,
|
|
81727
|
-
nodeVisitor(node.operand, visitor, isExpression)
|
|
81853
|
+
Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression))
|
|
81728
81854
|
);
|
|
81729
81855
|
},
|
|
81730
81856
|
[223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81731
81857
|
return context.factory.updateBinaryExpression(
|
|
81732
81858
|
node,
|
|
81733
|
-
nodeVisitor(node.left, visitor, isExpression),
|
|
81734
|
-
nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
|
|
81735
|
-
nodeVisitor(node.right, visitor, isExpression)
|
|
81859
|
+
Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)),
|
|
81860
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken,
|
|
81861
|
+
Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression))
|
|
81736
81862
|
);
|
|
81737
81863
|
},
|
|
81738
81864
|
[224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81739
81865
|
return context.factory.updateConditionalExpression(
|
|
81740
81866
|
node,
|
|
81741
|
-
nodeVisitor(node.condition, visitor, isExpression),
|
|
81742
|
-
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
81743
|
-
nodeVisitor(node.whenTrue, visitor, isExpression),
|
|
81744
|
-
nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
|
|
81745
|
-
nodeVisitor(node.whenFalse, visitor, isExpression)
|
|
81867
|
+
Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)),
|
|
81868
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken,
|
|
81869
|
+
Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)),
|
|
81870
|
+
tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken,
|
|
81871
|
+
Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression))
|
|
81746
81872
|
);
|
|
81747
81873
|
},
|
|
81748
81874
|
[225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81749
81875
|
return context.factory.updateTemplateExpression(
|
|
81750
81876
|
node,
|
|
81751
|
-
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
81877
|
+
Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)),
|
|
81752
81878
|
nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
|
|
81753
81879
|
);
|
|
81754
81880
|
},
|
|
81755
81881
|
[226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81756
81882
|
return context.factory.updateYieldExpression(
|
|
81757
81883
|
node,
|
|
81758
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
81884
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81759
81885
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
81760
81886
|
);
|
|
81761
81887
|
},
|
|
81762
81888
|
[227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81763
81889
|
return context.factory.updateSpreadElement(
|
|
81764
81890
|
node,
|
|
81765
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81891
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81766
81892
|
);
|
|
81767
81893
|
},
|
|
81768
81894
|
[228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -81778,45 +81904,45 @@ var visitEachChildTable = {
|
|
|
81778
81904
|
[230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81779
81905
|
return context.factory.updateExpressionWithTypeArguments(
|
|
81780
81906
|
node,
|
|
81781
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81907
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81782
81908
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
81783
81909
|
);
|
|
81784
81910
|
},
|
|
81785
81911
|
[231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81786
81912
|
return context.factory.updateAsExpression(
|
|
81787
81913
|
node,
|
|
81788
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81789
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81914
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81915
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81790
81916
|
);
|
|
81791
81917
|
},
|
|
81792
81918
|
[235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81793
81919
|
return context.factory.updateSatisfiesExpression(
|
|
81794
81920
|
node,
|
|
81795
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81796
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
81921
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81922
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81797
81923
|
);
|
|
81798
81924
|
},
|
|
81799
81925
|
[232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81800
81926
|
return isOptionalChain(node) ? context.factory.updateNonNullChain(
|
|
81801
81927
|
node,
|
|
81802
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81928
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81803
81929
|
) : context.factory.updateNonNullExpression(
|
|
81804
81930
|
node,
|
|
81805
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81931
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81806
81932
|
);
|
|
81807
81933
|
},
|
|
81808
81934
|
[233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81809
81935
|
return context.factory.updateMetaProperty(
|
|
81810
81936
|
node,
|
|
81811
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
81937
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
81812
81938
|
);
|
|
81813
81939
|
},
|
|
81814
81940
|
// Misc
|
|
81815
81941
|
[236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81816
81942
|
return context.factory.updateTemplateSpan(
|
|
81817
81943
|
node,
|
|
81818
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81819
|
-
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
81944
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81945
|
+
Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail))
|
|
81820
81946
|
);
|
|
81821
81947
|
},
|
|
81822
81948
|
// Element
|
|
@@ -81830,20 +81956,20 @@ var visitEachChildTable = {
|
|
|
81830
81956
|
return context.factory.updateVariableStatement(
|
|
81831
81957
|
node,
|
|
81832
81958
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81833
|
-
nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
|
|
81959
|
+
Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList))
|
|
81834
81960
|
);
|
|
81835
81961
|
},
|
|
81836
81962
|
[241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81837
81963
|
return context.factory.updateExpressionStatement(
|
|
81838
81964
|
node,
|
|
81839
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81965
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81840
81966
|
);
|
|
81841
81967
|
},
|
|
81842
81968
|
[242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81843
81969
|
return context.factory.updateIfStatement(
|
|
81844
81970
|
node,
|
|
81845
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81846
|
-
nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
|
|
81971
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81972
|
+
Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)),
|
|
81847
81973
|
nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
|
|
81848
81974
|
);
|
|
81849
81975
|
},
|
|
@@ -81851,13 +81977,13 @@ var visitEachChildTable = {
|
|
|
81851
81977
|
return context.factory.updateDoStatement(
|
|
81852
81978
|
node,
|
|
81853
81979
|
visitIterationBody(node.statement, visitor, context, nodeVisitor),
|
|
81854
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
81980
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81855
81981
|
);
|
|
81856
81982
|
},
|
|
81857
81983
|
[244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81858
81984
|
return context.factory.updateWhileStatement(
|
|
81859
81985
|
node,
|
|
81860
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81986
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81861
81987
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
81862
81988
|
);
|
|
81863
81989
|
},
|
|
@@ -81873,17 +81999,17 @@ var visitEachChildTable = {
|
|
|
81873
81999
|
[246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81874
82000
|
return context.factory.updateForInStatement(
|
|
81875
82001
|
node,
|
|
81876
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
81877
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
82002
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
82003
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81878
82004
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
81879
82005
|
);
|
|
81880
82006
|
},
|
|
81881
82007
|
[247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81882
82008
|
return context.factory.updateForOfStatement(
|
|
81883
82009
|
node,
|
|
81884
|
-
nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
|
|
81885
|
-
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
81886
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
82010
|
+
tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier,
|
|
82011
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)),
|
|
82012
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
81887
82013
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
81888
82014
|
);
|
|
81889
82015
|
},
|
|
@@ -81908,34 +82034,34 @@ var visitEachChildTable = {
|
|
|
81908
82034
|
[251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81909
82035
|
return context.factory.updateWithStatement(
|
|
81910
82036
|
node,
|
|
81911
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81912
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
82037
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
82038
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
81913
82039
|
);
|
|
81914
82040
|
},
|
|
81915
82041
|
[252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81916
82042
|
return context.factory.updateSwitchStatement(
|
|
81917
82043
|
node,
|
|
81918
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
81919
|
-
nodeVisitor(node.caseBlock, visitor, isCaseBlock)
|
|
82044
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
82045
|
+
Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock))
|
|
81920
82046
|
);
|
|
81921
82047
|
},
|
|
81922
82048
|
[253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81923
82049
|
return context.factory.updateLabeledStatement(
|
|
81924
82050
|
node,
|
|
81925
|
-
nodeVisitor(node.label, visitor, isIdentifier),
|
|
81926
|
-
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
82051
|
+
Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)),
|
|
82052
|
+
Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock))
|
|
81927
82053
|
);
|
|
81928
82054
|
},
|
|
81929
82055
|
[254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81930
82056
|
return context.factory.updateThrowStatement(
|
|
81931
82057
|
node,
|
|
81932
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82058
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
81933
82059
|
);
|
|
81934
82060
|
},
|
|
81935
82061
|
[255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81936
82062
|
return context.factory.updateTryStatement(
|
|
81937
82063
|
node,
|
|
81938
|
-
nodeVisitor(node.tryBlock, visitor, isBlock),
|
|
82064
|
+
Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)),
|
|
81939
82065
|
nodeVisitor(node.catchClause, visitor, isCatchClause),
|
|
81940
82066
|
nodeVisitor(node.finallyBlock, visitor, isBlock)
|
|
81941
82067
|
);
|
|
@@ -81943,8 +82069,8 @@ var visitEachChildTable = {
|
|
|
81943
82069
|
[257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
81944
82070
|
return context.factory.updateVariableDeclaration(
|
|
81945
82071
|
node,
|
|
81946
|
-
nodeVisitor(node.name, visitor, isBindingName),
|
|
81947
|
-
nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
|
|
82072
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)),
|
|
82073
|
+
tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken,
|
|
81948
82074
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
81949
82075
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
81950
82076
|
);
|
|
@@ -81959,7 +82085,7 @@ var visitEachChildTable = {
|
|
|
81959
82085
|
return context.factory.updateFunctionDeclaration(
|
|
81960
82086
|
node,
|
|
81961
82087
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81962
|
-
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
82088
|
+
tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken,
|
|
81963
82089
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
81964
82090
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81965
82091
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -81981,7 +82107,7 @@ var visitEachChildTable = {
|
|
|
81981
82107
|
return context.factory.updateInterfaceDeclaration(
|
|
81982
82108
|
node,
|
|
81983
82109
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81984
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82110
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81985
82111
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81986
82112
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
81987
82113
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
@@ -81991,16 +82117,16 @@ var visitEachChildTable = {
|
|
|
81991
82117
|
return context.factory.updateTypeAliasDeclaration(
|
|
81992
82118
|
node,
|
|
81993
82119
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
81994
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82120
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
81995
82121
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
81996
|
-
nodeVisitor(node.type, visitor, isTypeNode)
|
|
82122
|
+
Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
|
|
81997
82123
|
);
|
|
81998
82124
|
},
|
|
81999
82125
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82000
82126
|
return context.factory.updateEnumDeclaration(
|
|
82001
82127
|
node,
|
|
82002
82128
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82003
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82129
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82004
82130
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
82005
82131
|
);
|
|
82006
82132
|
},
|
|
@@ -82008,7 +82134,7 @@ var visitEachChildTable = {
|
|
|
82008
82134
|
return context.factory.updateModuleDeclaration(
|
|
82009
82135
|
node,
|
|
82010
82136
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82011
|
-
nodeVisitor(node.name, visitor, isModuleName),
|
|
82137
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)),
|
|
82012
82138
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
82013
82139
|
);
|
|
82014
82140
|
},
|
|
@@ -82027,7 +82153,7 @@ var visitEachChildTable = {
|
|
|
82027
82153
|
[267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82028
82154
|
return context.factory.updateNamespaceExportDeclaration(
|
|
82029
82155
|
node,
|
|
82030
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82156
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82031
82157
|
);
|
|
82032
82158
|
},
|
|
82033
82159
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82035,8 +82161,8 @@ var visitEachChildTable = {
|
|
|
82035
82161
|
node,
|
|
82036
82162
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82037
82163
|
node.isTypeOnly,
|
|
82038
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82039
|
-
nodeVisitor(node.moduleReference, visitor, isModuleReference)
|
|
82164
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82165
|
+
Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference))
|
|
82040
82166
|
);
|
|
82041
82167
|
},
|
|
82042
82168
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82044,7 +82170,7 @@ var visitEachChildTable = {
|
|
|
82044
82170
|
node,
|
|
82045
82171
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82046
82172
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
82047
|
-
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
82173
|
+
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
82048
82174
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
82049
82175
|
);
|
|
82050
82176
|
},
|
|
@@ -82058,8 +82184,8 @@ var visitEachChildTable = {
|
|
|
82058
82184
|
[297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82059
82185
|
return context.factory.updateAssertEntry(
|
|
82060
82186
|
node,
|
|
82061
|
-
nodeVisitor(node.name, visitor, isAssertionKey),
|
|
82062
|
-
nodeVisitor(node.value, visitor, isExpression)
|
|
82187
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)),
|
|
82188
|
+
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
82063
82189
|
);
|
|
82064
82190
|
},
|
|
82065
82191
|
[270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82073,13 +82199,13 @@ var visitEachChildTable = {
|
|
|
82073
82199
|
[271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82074
82200
|
return context.factory.updateNamespaceImport(
|
|
82075
82201
|
node,
|
|
82076
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82202
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82077
82203
|
);
|
|
82078
82204
|
},
|
|
82079
82205
|
[277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82080
82206
|
return context.factory.updateNamespaceExport(
|
|
82081
82207
|
node,
|
|
82082
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82208
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82083
82209
|
);
|
|
82084
82210
|
},
|
|
82085
82211
|
[272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -82093,14 +82219,14 @@ var visitEachChildTable = {
|
|
|
82093
82219
|
node,
|
|
82094
82220
|
node.isTypeOnly,
|
|
82095
82221
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
82096
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82222
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82097
82223
|
);
|
|
82098
82224
|
},
|
|
82099
82225
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82100
82226
|
return context.factory.updateExportAssignment(
|
|
82101
82227
|
node,
|
|
82102
82228
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
82103
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82229
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82104
82230
|
);
|
|
82105
82231
|
},
|
|
82106
82232
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -82124,59 +82250,59 @@ var visitEachChildTable = {
|
|
|
82124
82250
|
node,
|
|
82125
82251
|
node.isTypeOnly,
|
|
82126
82252
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
82127
|
-
nodeVisitor(node.name, visitor, isIdentifier)
|
|
82253
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier))
|
|
82128
82254
|
);
|
|
82129
82255
|
},
|
|
82130
82256
|
// Module references
|
|
82131
82257
|
[280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82132
82258
|
return context.factory.updateExternalModuleReference(
|
|
82133
82259
|
node,
|
|
82134
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82260
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82135
82261
|
);
|
|
82136
82262
|
},
|
|
82137
82263
|
// JSX
|
|
82138
82264
|
[281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82139
82265
|
return context.factory.updateJsxElement(
|
|
82140
82266
|
node,
|
|
82141
|
-
nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
|
|
82267
|
+
Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)),
|
|
82142
82268
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
82143
|
-
nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
|
|
82269
|
+
Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement))
|
|
82144
82270
|
);
|
|
82145
82271
|
},
|
|
82146
82272
|
[282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82147
82273
|
return context.factory.updateJsxSelfClosingElement(
|
|
82148
82274
|
node,
|
|
82149
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
82275
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
82150
82276
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
82151
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
82277
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
82152
82278
|
);
|
|
82153
82279
|
},
|
|
82154
82280
|
[283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82155
82281
|
return context.factory.updateJsxOpeningElement(
|
|
82156
82282
|
node,
|
|
82157
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
82283
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)),
|
|
82158
82284
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
82159
|
-
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
82285
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes))
|
|
82160
82286
|
);
|
|
82161
82287
|
},
|
|
82162
82288
|
[284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82163
82289
|
return context.factory.updateJsxClosingElement(
|
|
82164
82290
|
node,
|
|
82165
|
-
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
|
|
82291
|
+
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression))
|
|
82166
82292
|
);
|
|
82167
82293
|
},
|
|
82168
82294
|
[285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82169
82295
|
return context.factory.updateJsxFragment(
|
|
82170
82296
|
node,
|
|
82171
|
-
nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
|
|
82297
|
+
Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
|
|
82172
82298
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
82173
|
-
nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
|
|
82299
|
+
Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment))
|
|
82174
82300
|
);
|
|
82175
82301
|
},
|
|
82176
82302
|
[288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82177
82303
|
return context.factory.updateJsxAttribute(
|
|
82178
82304
|
node,
|
|
82179
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82305
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82180
82306
|
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
|
|
82181
82307
|
);
|
|
82182
82308
|
},
|
|
@@ -82189,20 +82315,20 @@ var visitEachChildTable = {
|
|
|
82189
82315
|
[290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82190
82316
|
return context.factory.updateJsxSpreadAttribute(
|
|
82191
82317
|
node,
|
|
82192
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82318
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82193
82319
|
);
|
|
82194
82320
|
},
|
|
82195
82321
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82196
82322
|
return context.factory.updateJsxExpression(
|
|
82197
82323
|
node,
|
|
82198
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82324
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82199
82325
|
);
|
|
82200
82326
|
},
|
|
82201
82327
|
// Clauses
|
|
82202
82328
|
[292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82203
82329
|
return context.factory.updateCaseClause(
|
|
82204
82330
|
node,
|
|
82205
|
-
nodeVisitor(node.expression, visitor, isExpression),
|
|
82331
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)),
|
|
82206
82332
|
nodesVisitor(node.statements, visitor, isStatement)
|
|
82207
82333
|
);
|
|
82208
82334
|
},
|
|
@@ -82222,35 +82348,35 @@ var visitEachChildTable = {
|
|
|
82222
82348
|
return context.factory.updateCatchClause(
|
|
82223
82349
|
node,
|
|
82224
82350
|
nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
|
|
82225
|
-
nodeVisitor(node.block, visitor, isBlock)
|
|
82351
|
+
Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock))
|
|
82226
82352
|
);
|
|
82227
82353
|
},
|
|
82228
82354
|
// Property assignments
|
|
82229
82355
|
[299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82230
82356
|
return context.factory.updatePropertyAssignment(
|
|
82231
82357
|
node,
|
|
82232
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
82233
|
-
nodeVisitor(node.initializer, visitor, isExpression)
|
|
82358
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
82359
|
+
Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression))
|
|
82234
82360
|
);
|
|
82235
82361
|
},
|
|
82236
82362
|
[300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82237
82363
|
return context.factory.updateShorthandPropertyAssignment(
|
|
82238
82364
|
node,
|
|
82239
|
-
nodeVisitor(node.name, visitor, isIdentifier),
|
|
82365
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
|
82240
82366
|
nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
|
|
82241
82367
|
);
|
|
82242
82368
|
},
|
|
82243
82369
|
[301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82244
82370
|
return context.factory.updateSpreadAssignment(
|
|
82245
82371
|
node,
|
|
82246
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82372
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82247
82373
|
);
|
|
82248
82374
|
},
|
|
82249
82375
|
// Enum
|
|
82250
82376
|
[302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82251
82377
|
return context.factory.updateEnumMember(
|
|
82252
82378
|
node,
|
|
82253
|
-
nodeVisitor(node.name, visitor, isPropertyName),
|
|
82379
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)),
|
|
82254
82380
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
82255
82381
|
);
|
|
82256
82382
|
},
|
|
@@ -82262,13 +82388,13 @@ var visitEachChildTable = {
|
|
|
82262
82388
|
);
|
|
82263
82389
|
},
|
|
82264
82390
|
// Transformation nodes
|
|
82265
|
-
[
|
|
82391
|
+
[356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
82266
82392
|
return context.factory.updatePartiallyEmittedExpression(
|
|
82267
82393
|
node,
|
|
82268
|
-
nodeVisitor(node.expression, visitor, isExpression)
|
|
82394
|
+
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
82269
82395
|
);
|
|
82270
82396
|
},
|
|
82271
|
-
[
|
|
82397
|
+
[357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
82272
82398
|
return context.factory.updateCommaListExpression(
|
|
82273
82399
|
node,
|
|
82274
82400
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -83051,7 +83177,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
83051
83177
|
location = node = value;
|
|
83052
83178
|
value = node.right;
|
|
83053
83179
|
} else {
|
|
83054
|
-
return visitNode(value, visitor, isExpression);
|
|
83180
|
+
return Debug.checkDefined(visitNode(value, visitor, isExpression));
|
|
83055
83181
|
}
|
|
83056
83182
|
}
|
|
83057
83183
|
}
|
|
@@ -83070,6 +83196,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
83070
83196
|
};
|
|
83071
83197
|
if (value) {
|
|
83072
83198
|
value = visitNode(value, visitor, isExpression);
|
|
83199
|
+
Debug.assert(value);
|
|
83073
83200
|
if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
83074
83201
|
value = ensureIdentifier(
|
|
83075
83202
|
flattenContext,
|
|
@@ -83111,7 +83238,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
83111
83238
|
function emitBindingOrAssignment(target, value2, location2, original) {
|
|
83112
83239
|
Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
|
|
83113
83240
|
const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
|
|
83114
|
-
context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
|
|
83241
|
+
context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2),
|
|
83115
83242
|
location2
|
|
83116
83243
|
);
|
|
83117
83244
|
expression.original = original;
|
|
@@ -83168,7 +83295,7 @@ function flattenDestructuringBinding(node, visitor, context, level, rval, hoistT
|
|
|
83168
83295
|
if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
|
|
83169
83296
|
initializer = ensureIdentifier(
|
|
83170
83297
|
flattenContext,
|
|
83171
|
-
visitNode(initializer, flattenContext.visitor),
|
|
83298
|
+
Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)),
|
|
83172
83299
|
/*reuseIdentifierExpressions*/
|
|
83173
83300
|
false,
|
|
83174
83301
|
initializer
|
|
@@ -83289,7 +83416,7 @@ function flattenObjectBindingOrAssignmentPattern(flattenContext, parent, pattern
|
|
|
83289
83416
|
if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
|
|
83290
83417
|
const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
|
|
83291
83418
|
if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
|
|
83292
|
-
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
|
|
83419
|
+
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement));
|
|
83293
83420
|
} else {
|
|
83294
83421
|
if (bindingElements) {
|
|
83295
83422
|
flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
|
@@ -83427,7 +83554,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
|
|
|
83427
83554
|
if (isComputedPropertyName(propertyName)) {
|
|
83428
83555
|
const argumentExpression = ensureIdentifier(
|
|
83429
83556
|
flattenContext,
|
|
83430
|
-
visitNode(propertyName.expression, flattenContext.visitor),
|
|
83557
|
+
Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)),
|
|
83431
83558
|
/*reuseIdentifierExpressions*/
|
|
83432
83559
|
false,
|
|
83433
83560
|
/*location*/
|
|
@@ -83470,6 +83597,7 @@ function makeArrayBindingPattern(factory2, elements) {
|
|
|
83470
83597
|
return factory2.createArrayBindingPattern(elements);
|
|
83471
83598
|
}
|
|
83472
83599
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
83600
|
+
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
83473
83601
|
return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
83474
83602
|
}
|
|
83475
83603
|
function makeObjectBindingPattern(factory2, elements) {
|
|
@@ -83477,6 +83605,7 @@ function makeObjectBindingPattern(factory2, elements) {
|
|
|
83477
83605
|
return factory2.createObjectBindingPattern(elements);
|
|
83478
83606
|
}
|
|
83479
83607
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
83608
|
+
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
83480
83609
|
return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
83481
83610
|
}
|
|
83482
83611
|
function makeBindingElement(factory2, name) {
|
|
@@ -83495,6 +83624,7 @@ function makeAssignmentElement(name) {
|
|
|
83495
83624
|
// src/compiler/transformers/taggedTemplate.ts
|
|
83496
83625
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
83497
83626
|
const tag = visitNode(node.tag, visitor, isExpression);
|
|
83627
|
+
Debug.assert(tag);
|
|
83498
83628
|
const templateArguments = [void 0];
|
|
83499
83629
|
const cookedStrings = [];
|
|
83500
83630
|
const rawStrings = [];
|
|
@@ -83511,7 +83641,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
|
|
|
83511
83641
|
for (const templateSpan of template.templateSpans) {
|
|
83512
83642
|
cookedStrings.push(createTemplateCooked(templateSpan.literal));
|
|
83513
83643
|
rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
|
|
83514
|
-
templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
|
|
83644
|
+
templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
|
|
83515
83645
|
}
|
|
83516
83646
|
}
|
|
83517
83647
|
const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
|
|
@@ -83884,7 +84014,7 @@ function transformTypeScript(context) {
|
|
|
83884
84014
|
function visitObjectLiteralExpression(node) {
|
|
83885
84015
|
return factory2.updateObjectLiteralExpression(
|
|
83886
84016
|
node,
|
|
83887
|
-
visitNodes2(node.properties, getObjectLiteralElementVisitor(node),
|
|
84017
|
+
visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike)
|
|
83888
84018
|
);
|
|
83889
84019
|
}
|
|
83890
84020
|
function getClassFacts(node, staticProperties) {
|
|
@@ -84082,6 +84212,7 @@ function transformTypeScript(context) {
|
|
|
84082
84212
|
const decorators = [];
|
|
84083
84213
|
for (const parameterDecorator of parameterDecorators) {
|
|
84084
84214
|
const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
|
|
84215
|
+
Debug.assert(expression);
|
|
84085
84216
|
const helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
84086
84217
|
setTextRange(helper, parameterDecorator.expression);
|
|
84087
84218
|
setEmitFlags(helper, 3072 /* NoComments */);
|
|
@@ -84205,6 +84336,7 @@ function transformTypeScript(context) {
|
|
|
84205
84336
|
const name = member.name;
|
|
84206
84337
|
if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
|
|
84207
84338
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
84339
|
+
Debug.assert(expression);
|
|
84208
84340
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
84209
84341
|
if (!isSimpleInlineableExpression(innerExpression)) {
|
|
84210
84342
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
@@ -84212,7 +84344,7 @@ function transformTypeScript(context) {
|
|
|
84212
84344
|
return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
|
|
84213
84345
|
}
|
|
84214
84346
|
}
|
|
84215
|
-
return visitNode(name, visitor, isPropertyName);
|
|
84347
|
+
return Debug.checkDefined(visitNode(name, visitor, isPropertyName));
|
|
84216
84348
|
}
|
|
84217
84349
|
function visitHeritageClause(node) {
|
|
84218
84350
|
if (node.token === 117 /* ImplementsKeyword */) {
|
|
@@ -84223,7 +84355,7 @@ function transformTypeScript(context) {
|
|
|
84223
84355
|
function visitExpressionWithTypeArguments(node) {
|
|
84224
84356
|
return factory2.updateExpressionWithTypeArguments(
|
|
84225
84357
|
node,
|
|
84226
|
-
visitNode(node.expression, visitor, isLeftHandSideExpression),
|
|
84358
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
84227
84359
|
/*typeArguments*/
|
|
84228
84360
|
void 0
|
|
84229
84361
|
);
|
|
@@ -84242,7 +84374,7 @@ function transformTypeScript(context) {
|
|
|
84242
84374
|
return factory2.updatePropertyDeclaration(
|
|
84243
84375
|
node,
|
|
84244
84376
|
concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
|
|
84245
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
84377
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
84246
84378
|
/*questionOrExclamationToken*/
|
|
84247
84379
|
void 0,
|
|
84248
84380
|
/*type*/
|
|
@@ -84259,7 +84391,7 @@ function transformTypeScript(context) {
|
|
|
84259
84391
|
void 0,
|
|
84260
84392
|
/*type*/
|
|
84261
84393
|
void 0,
|
|
84262
|
-
visitNode(node.initializer, visitor)
|
|
84394
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
84263
84395
|
);
|
|
84264
84396
|
}
|
|
84265
84397
|
function visitConstructor(node) {
|
|
@@ -84478,7 +84610,7 @@ function transformTypeScript(context) {
|
|
|
84478
84610
|
elideNodes(factory2, node.modifiers),
|
|
84479
84611
|
// preserve positions, if available
|
|
84480
84612
|
node.dotDotDotToken,
|
|
84481
|
-
visitNode(node.name, visitor, isBindingName),
|
|
84613
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
84482
84614
|
/*questionToken*/
|
|
84483
84615
|
void 0,
|
|
84484
84616
|
/*type*/
|
|
@@ -84527,7 +84659,7 @@ function transformTypeScript(context) {
|
|
|
84527
84659
|
return setTextRange(
|
|
84528
84660
|
factory2.createAssignment(
|
|
84529
84661
|
getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
|
|
84530
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
84662
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
84531
84663
|
),
|
|
84532
84664
|
/*location*/
|
|
84533
84665
|
node
|
|
@@ -84537,7 +84669,7 @@ function transformTypeScript(context) {
|
|
|
84537
84669
|
function visitVariableDeclaration(node) {
|
|
84538
84670
|
const updated = factory2.updateVariableDeclaration(
|
|
84539
84671
|
node,
|
|
84540
|
-
visitNode(node.name, visitor, isBindingName),
|
|
84672
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
84541
84673
|
/*exclamationToken*/
|
|
84542
84674
|
void 0,
|
|
84543
84675
|
/*type*/
|
|
@@ -84553,26 +84685,30 @@ function transformTypeScript(context) {
|
|
|
84553
84685
|
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
84554
84686
|
if (isAssertionExpression(innerExpression)) {
|
|
84555
84687
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
84688
|
+
Debug.assert(expression);
|
|
84556
84689
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84557
84690
|
}
|
|
84558
84691
|
return visitEachChild(node, visitor, context);
|
|
84559
84692
|
}
|
|
84560
84693
|
function visitAssertionExpression(node) {
|
|
84561
84694
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
84695
|
+
Debug.assert(expression);
|
|
84562
84696
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84563
84697
|
}
|
|
84564
84698
|
function visitNonNullExpression(node) {
|
|
84565
84699
|
const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
|
|
84700
|
+
Debug.assert(expression);
|
|
84566
84701
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84567
84702
|
}
|
|
84568
84703
|
function visitSatisfiesExpression(node) {
|
|
84569
84704
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
84705
|
+
Debug.assert(expression);
|
|
84570
84706
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
84571
84707
|
}
|
|
84572
84708
|
function visitCallExpression(node) {
|
|
84573
84709
|
return factory2.updateCallExpression(
|
|
84574
84710
|
node,
|
|
84575
|
-
visitNode(node.expression, visitor, isExpression),
|
|
84711
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
84576
84712
|
/*typeArguments*/
|
|
84577
84713
|
void 0,
|
|
84578
84714
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -84581,7 +84717,7 @@ function transformTypeScript(context) {
|
|
|
84581
84717
|
function visitNewExpression(node) {
|
|
84582
84718
|
return factory2.updateNewExpression(
|
|
84583
84719
|
node,
|
|
84584
|
-
visitNode(node.expression, visitor, isExpression),
|
|
84720
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
84585
84721
|
/*typeArguments*/
|
|
84586
84722
|
void 0,
|
|
84587
84723
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -84590,28 +84726,28 @@ function transformTypeScript(context) {
|
|
|
84590
84726
|
function visitTaggedTemplateExpression(node) {
|
|
84591
84727
|
return factory2.updateTaggedTemplateExpression(
|
|
84592
84728
|
node,
|
|
84593
|
-
visitNode(node.tag, visitor, isExpression),
|
|
84729
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
84594
84730
|
/*typeArguments*/
|
|
84595
84731
|
void 0,
|
|
84596
|
-
visitNode(node.template, visitor,
|
|
84732
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
84597
84733
|
);
|
|
84598
84734
|
}
|
|
84599
84735
|
function visitJsxSelfClosingElement(node) {
|
|
84600
84736
|
return factory2.updateJsxSelfClosingElement(
|
|
84601
84737
|
node,
|
|
84602
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
84738
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84603
84739
|
/*typeArguments*/
|
|
84604
84740
|
void 0,
|
|
84605
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
84741
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
84606
84742
|
);
|
|
84607
84743
|
}
|
|
84608
84744
|
function visitJsxJsxOpeningElement(node) {
|
|
84609
84745
|
return factory2.updateJsxOpeningElement(
|
|
84610
84746
|
node,
|
|
84611
|
-
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
84747
|
+
Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)),
|
|
84612
84748
|
/*typeArguments*/
|
|
84613
84749
|
void 0,
|
|
84614
|
-
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
84750
|
+
Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes))
|
|
84615
84751
|
);
|
|
84616
84752
|
}
|
|
84617
84753
|
function shouldEmitEnumDeclaration(node) {
|
|
@@ -84757,7 +84893,7 @@ function transformTypeScript(context) {
|
|
|
84757
84893
|
} else {
|
|
84758
84894
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
84759
84895
|
if (member.initializer) {
|
|
84760
|
-
return visitNode(member.initializer, visitor, isExpression);
|
|
84896
|
+
return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression));
|
|
84761
84897
|
} else {
|
|
84762
84898
|
return factory2.createVoidZero();
|
|
84763
84899
|
}
|
|
@@ -85038,7 +85174,7 @@ function transformTypeScript(context) {
|
|
|
85038
85174
|
return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
|
|
85039
85175
|
}
|
|
85040
85176
|
function visitNamespaceExports(node) {
|
|
85041
|
-
return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
|
|
85177
|
+
return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier)));
|
|
85042
85178
|
}
|
|
85043
85179
|
function visitNamedExportBindings(node, allowEmpty) {
|
|
85044
85180
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
@@ -85510,6 +85646,7 @@ function transformClassFields(context) {
|
|
|
85510
85646
|
const info = accessPrivateIdentifier(node.left);
|
|
85511
85647
|
if (info) {
|
|
85512
85648
|
const receiver = visitNode(node.right, visitor, isExpression);
|
|
85649
|
+
Debug.assert(receiver);
|
|
85513
85650
|
return setOriginalNode(
|
|
85514
85651
|
context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
|
|
85515
85652
|
node
|
|
@@ -85527,6 +85664,7 @@ function transformClassFields(context) {
|
|
|
85527
85664
|
}
|
|
85528
85665
|
function visitComputedPropertyName(node) {
|
|
85529
85666
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
85667
|
+
Debug.assert(expression);
|
|
85530
85668
|
if (some(pendingExpressions)) {
|
|
85531
85669
|
if (isParenthesizedExpression(expression)) {
|
|
85532
85670
|
expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
|
|
@@ -85608,6 +85746,7 @@ function transformClassFields(context) {
|
|
|
85608
85746
|
const temp = factory2.createTempVariable(hoistVariableDeclaration);
|
|
85609
85747
|
setSourceMapRange(temp, name.expression);
|
|
85610
85748
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
85749
|
+
Debug.assert(expression);
|
|
85611
85750
|
const assignment = factory2.createAssignment(temp, expression);
|
|
85612
85751
|
setSourceMapRange(assignment, name.expression);
|
|
85613
85752
|
getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
|
|
@@ -85690,7 +85829,7 @@ function transformClassFields(context) {
|
|
|
85690
85829
|
return transformFieldInitializer(node);
|
|
85691
85830
|
}
|
|
85692
85831
|
function createPrivateIdentifierAccess(info, receiver) {
|
|
85693
|
-
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
|
|
85832
|
+
return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
|
|
85694
85833
|
}
|
|
85695
85834
|
function createPrivateIdentifierAccessHelper(info, receiver) {
|
|
85696
85835
|
setCommentRange(receiver, moveRangePos(receiver, -1));
|
|
@@ -85760,7 +85899,7 @@ function transformClassFields(context) {
|
|
|
85760
85899
|
if (classConstructor && superClassReference) {
|
|
85761
85900
|
const superProperty = factory2.createReflectGetCall(
|
|
85762
85901
|
superClassReference,
|
|
85763
|
-
visitNode(node.argumentExpression, visitor, isExpression),
|
|
85902
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
|
|
85764
85903
|
classConstructor
|
|
85765
85904
|
);
|
|
85766
85905
|
setOriginalNode(superProperty, node.expression);
|
|
@@ -85777,6 +85916,7 @@ function transformClassFields(context) {
|
|
|
85777
85916
|
let info;
|
|
85778
85917
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
85779
85918
|
const receiver = visitNode(operand.expression, visitor, isExpression);
|
|
85919
|
+
Debug.assert(receiver);
|
|
85780
85920
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
85781
85921
|
let expression = createPrivateIdentifierAccess(info, readExpression);
|
|
85782
85922
|
const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
@@ -85813,7 +85953,7 @@ function transformClassFields(context) {
|
|
|
85813
85953
|
getterName = setterName = operand.argumentExpression;
|
|
85814
85954
|
} else {
|
|
85815
85955
|
getterName = factory2.createTempVariable(hoistVariableDeclaration);
|
|
85816
|
-
setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
|
|
85956
|
+
setterName = factory2.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
|
|
85817
85957
|
}
|
|
85818
85958
|
}
|
|
85819
85959
|
if (setterName && getterName) {
|
|
@@ -85847,7 +85987,7 @@ function transformClassFields(context) {
|
|
|
85847
85987
|
function visitExpressionStatement(node) {
|
|
85848
85988
|
return factory2.updateExpressionStatement(
|
|
85849
85989
|
node,
|
|
85850
|
-
visitNode(node.expression, discardedValueVisitor, isExpression)
|
|
85990
|
+
Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
|
|
85851
85991
|
);
|
|
85852
85992
|
}
|
|
85853
85993
|
function createCopiableReceiverExpr(receiver) {
|
|
@@ -85865,25 +86005,25 @@ function transformClassFields(context) {
|
|
|
85865
86005
|
if (isCallChain(node)) {
|
|
85866
86006
|
return factory2.updateCallChain(
|
|
85867
86007
|
node,
|
|
85868
|
-
factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
|
|
86008
|
+
factory2.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
|
|
85869
86009
|
/*questionDotToken*/
|
|
85870
86010
|
void 0,
|
|
85871
86011
|
/*typeArguments*/
|
|
85872
86012
|
void 0,
|
|
85873
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
86013
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
85874
86014
|
);
|
|
85875
86015
|
}
|
|
85876
86016
|
return factory2.updateCallExpression(
|
|
85877
86017
|
node,
|
|
85878
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
|
|
86018
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
|
|
85879
86019
|
/*typeArguments*/
|
|
85880
86020
|
void 0,
|
|
85881
|
-
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
86021
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
85882
86022
|
);
|
|
85883
86023
|
}
|
|
85884
86024
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
85885
86025
|
const invocation = factory2.createFunctionCallCall(
|
|
85886
|
-
visitNode(node.expression, visitor, isExpression),
|
|
86026
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
85887
86027
|
currentClassLexicalEnvironment.classConstructor,
|
|
85888
86028
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
85889
86029
|
);
|
|
@@ -85899,19 +86039,19 @@ function transformClassFields(context) {
|
|
|
85899
86039
|
return factory2.updateTaggedTemplateExpression(
|
|
85900
86040
|
node,
|
|
85901
86041
|
factory2.createCallExpression(
|
|
85902
|
-
factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
|
|
86042
|
+
factory2.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
|
|
85903
86043
|
/*typeArguments*/
|
|
85904
86044
|
void 0,
|
|
85905
|
-
[visitNode(thisArg, visitor, isExpression)]
|
|
86045
|
+
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
|
|
85906
86046
|
),
|
|
85907
86047
|
/*typeArguments*/
|
|
85908
86048
|
void 0,
|
|
85909
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
86049
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
85910
86050
|
);
|
|
85911
86051
|
}
|
|
85912
86052
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
85913
86053
|
const invocation = factory2.createFunctionBindCall(
|
|
85914
|
-
visitNode(node.tag, visitor, isExpression),
|
|
86054
|
+
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
|
|
85915
86055
|
currentClassLexicalEnvironment.classConstructor,
|
|
85916
86056
|
[]
|
|
85917
86057
|
);
|
|
@@ -85922,7 +86062,7 @@ function transformClassFields(context) {
|
|
|
85922
86062
|
invocation,
|
|
85923
86063
|
/*typeArguments*/
|
|
85924
86064
|
void 0,
|
|
85925
|
-
visitNode(node.template, visitor, isTemplateLiteral)
|
|
86065
|
+
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
|
|
85926
86066
|
);
|
|
85927
86067
|
}
|
|
85928
86068
|
return visitEachChild(node, visitor, context);
|
|
@@ -85952,9 +86092,9 @@ function transformClassFields(context) {
|
|
|
85952
86092
|
pendingExpressions = void 0;
|
|
85953
86093
|
node = factory2.updateBinaryExpression(
|
|
85954
86094
|
node,
|
|
85955
|
-
visitNode(node.left, assignmentTargetVisitor),
|
|
86095
|
+
Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
|
|
85956
86096
|
node.operatorToken,
|
|
85957
|
-
visitNode(node.right, visitor)
|
|
86097
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
85958
86098
|
);
|
|
85959
86099
|
const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
|
|
85960
86100
|
pendingExpressions = savedPendingExpressions;
|
|
@@ -85979,7 +86119,7 @@ function transformClassFields(context) {
|
|
|
85979
86119
|
node,
|
|
85980
86120
|
visitInvalidSuperProperty(node.left),
|
|
85981
86121
|
node.operatorToken,
|
|
85982
|
-
visitNode(node.right, visitor, isExpression)
|
|
86122
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
85983
86123
|
);
|
|
85984
86124
|
}
|
|
85985
86125
|
if (classConstructor && superClassReference) {
|
|
@@ -85999,6 +86139,7 @@ function transformClassFields(context) {
|
|
|
85999
86139
|
);
|
|
86000
86140
|
setOriginalNode(superPropertyGet, node.left);
|
|
86001
86141
|
setTextRange(superPropertyGet, node.left);
|
|
86142
|
+
Debug.assert(expression);
|
|
86002
86143
|
expression = factory2.createBinaryExpression(
|
|
86003
86144
|
superPropertyGet,
|
|
86004
86145
|
getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
|
|
@@ -86008,9 +86149,11 @@ function transformClassFields(context) {
|
|
|
86008
86149
|
}
|
|
86009
86150
|
const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
86010
86151
|
if (temp) {
|
|
86152
|
+
Debug.assert(expression);
|
|
86011
86153
|
expression = factory2.createAssignment(temp, expression);
|
|
86012
86154
|
setTextRange(temp, node);
|
|
86013
86155
|
}
|
|
86156
|
+
Debug.assert(expression);
|
|
86014
86157
|
expression = factory2.createReflectSetCall(
|
|
86015
86158
|
superClassReference,
|
|
86016
86159
|
setterName,
|
|
@@ -86034,8 +86177,8 @@ function transformClassFields(context) {
|
|
|
86034
86177
|
return visitEachChild(node, visitor, context);
|
|
86035
86178
|
}
|
|
86036
86179
|
function createPrivateIdentifierAssignment(info, receiver, right, operator) {
|
|
86037
|
-
receiver = visitNode(receiver, visitor, isExpression);
|
|
86038
|
-
right = visitNode(right, visitor, isExpression);
|
|
86180
|
+
receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
|
|
86181
|
+
right = Debug.checkDefined(visitNode(right, visitor, isExpression));
|
|
86039
86182
|
if (isCompoundAssignment(operator)) {
|
|
86040
86183
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
86041
86184
|
receiver = initializeExpression || readExpression;
|
|
@@ -86138,7 +86281,7 @@ function transformClassFields(context) {
|
|
|
86138
86281
|
node,
|
|
86139
86282
|
factory2.createAssignment(
|
|
86140
86283
|
temp,
|
|
86141
|
-
visitNode(node.expression, visitor, isExpression)
|
|
86284
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
86142
86285
|
),
|
|
86143
86286
|
/*typeArguments*/
|
|
86144
86287
|
void 0
|
|
@@ -86700,7 +86843,7 @@ function transformClassFields(context) {
|
|
|
86700
86843
|
) : factory2.updateElementAccessExpression(
|
|
86701
86844
|
node,
|
|
86702
86845
|
factory2.createVoidZero(),
|
|
86703
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
86846
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
86704
86847
|
);
|
|
86705
86848
|
}
|
|
86706
86849
|
function onEmitNode(hint, node, emitCallback) {
|
|
@@ -86817,6 +86960,7 @@ function transformClassFields(context) {
|
|
|
86817
86960
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
86818
86961
|
if (isComputedPropertyName(name)) {
|
|
86819
86962
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
86963
|
+
Debug.assert(expression);
|
|
86820
86964
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
86821
86965
|
const inlinable = isSimpleInlineableExpression(innerExpression);
|
|
86822
86966
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
@@ -87038,7 +87182,7 @@ function transformClassFields(context) {
|
|
|
87038
87182
|
/*reservedInNestedScopes*/
|
|
87039
87183
|
true
|
|
87040
87184
|
);
|
|
87041
|
-
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
|
|
87185
|
+
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
87042
87186
|
}
|
|
87043
87187
|
return factory2.createAssignmentTargetWrapper(
|
|
87044
87188
|
parameter,
|
|
@@ -87051,6 +87195,7 @@ function transformClassFields(context) {
|
|
|
87051
87195
|
);
|
|
87052
87196
|
}
|
|
87053
87197
|
function visitArrayAssignmentTarget(node) {
|
|
87198
|
+
Debug.assertNode(node, isBindingOrAssignmentElement);
|
|
87054
87199
|
const target = getTargetOfBindingOrAssignmentElement(node);
|
|
87055
87200
|
if (target) {
|
|
87056
87201
|
let wrapped;
|
|
@@ -87085,7 +87230,7 @@ function transformClassFields(context) {
|
|
|
87085
87230
|
node,
|
|
87086
87231
|
wrapped,
|
|
87087
87232
|
node.operatorToken,
|
|
87088
|
-
visitNode(node.right, visitor, isExpression)
|
|
87233
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
87089
87234
|
);
|
|
87090
87235
|
} else if (isSpreadElement(node)) {
|
|
87091
87236
|
return factory2.updateSpreadElement(node, wrapped);
|
|
@@ -87131,14 +87276,14 @@ function transformClassFields(context) {
|
|
|
87131
87276
|
const initializer = getInitializerOfBindingOrAssignmentElement(node);
|
|
87132
87277
|
return factory2.updatePropertyAssignment(
|
|
87133
87278
|
node,
|
|
87134
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87135
|
-
wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
|
|
87279
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87280
|
+
wrapped ? initializer ? factory2.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped : Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
|
|
87136
87281
|
);
|
|
87137
87282
|
}
|
|
87138
87283
|
if (isSpreadAssignment(node)) {
|
|
87139
87284
|
return factory2.updateSpreadAssignment(
|
|
87140
87285
|
node,
|
|
87141
|
-
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
|
|
87286
|
+
wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
|
|
87142
87287
|
);
|
|
87143
87288
|
}
|
|
87144
87289
|
Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
|
|
@@ -87752,7 +87897,7 @@ function transformLegacyDecorators(context) {
|
|
|
87752
87897
|
return factory2.updateConstructorDeclaration(
|
|
87753
87898
|
node,
|
|
87754
87899
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87755
|
-
visitNodes2(node.parameters, visitor,
|
|
87900
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87756
87901
|
visitNode(node.body, visitor, isBlock)
|
|
87757
87902
|
);
|
|
87758
87903
|
}
|
|
@@ -87768,12 +87913,12 @@ function transformLegacyDecorators(context) {
|
|
|
87768
87913
|
node,
|
|
87769
87914
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87770
87915
|
node.asteriskToken,
|
|
87771
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87916
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87772
87917
|
/*questionToken*/
|
|
87773
87918
|
void 0,
|
|
87774
87919
|
/*typeParameters*/
|
|
87775
87920
|
void 0,
|
|
87776
|
-
visitNodes2(node.parameters, visitor,
|
|
87921
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87777
87922
|
/*type*/
|
|
87778
87923
|
void 0,
|
|
87779
87924
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -87783,8 +87928,8 @@ function transformLegacyDecorators(context) {
|
|
|
87783
87928
|
return finishClassElement(factory2.updateGetAccessorDeclaration(
|
|
87784
87929
|
node,
|
|
87785
87930
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87786
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87787
|
-
visitNodes2(node.parameters, visitor,
|
|
87931
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87932
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87788
87933
|
/*type*/
|
|
87789
87934
|
void 0,
|
|
87790
87935
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -87794,8 +87939,8 @@ function transformLegacyDecorators(context) {
|
|
|
87794
87939
|
return finishClassElement(factory2.updateSetAccessorDeclaration(
|
|
87795
87940
|
node,
|
|
87796
87941
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87797
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87798
|
-
visitNodes2(node.parameters, visitor,
|
|
87942
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87943
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
87799
87944
|
visitNode(node.body, visitor, isBlock)
|
|
87800
87945
|
), node);
|
|
87801
87946
|
}
|
|
@@ -87806,7 +87951,7 @@ function transformLegacyDecorators(context) {
|
|
|
87806
87951
|
return finishClassElement(factory2.updatePropertyDeclaration(
|
|
87807
87952
|
node,
|
|
87808
87953
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
87809
|
-
visitNode(node.name, visitor, isPropertyName),
|
|
87954
|
+
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
|
|
87810
87955
|
/*questionOrExclamationToken*/
|
|
87811
87956
|
void 0,
|
|
87812
87957
|
/*type*/
|
|
@@ -87819,7 +87964,7 @@ function transformLegacyDecorators(context) {
|
|
|
87819
87964
|
node,
|
|
87820
87965
|
elideNodes(factory2, node.modifiers),
|
|
87821
87966
|
node.dotDotDotToken,
|
|
87822
|
-
visitNode(node.name, visitor, isBindingName),
|
|
87967
|
+
Debug.checkDefined(visitNode(node.name, visitor, isBindingName)),
|
|
87823
87968
|
/*questionToken*/
|
|
87824
87969
|
void 0,
|
|
87825
87970
|
/*type*/
|
|
@@ -87916,7 +88061,7 @@ function transformLegacyDecorators(context) {
|
|
|
87916
88061
|
return expression;
|
|
87917
88062
|
}
|
|
87918
88063
|
function transformDecorator(decorator) {
|
|
87919
|
-
return visitNode(decorator.expression, visitor, isExpression);
|
|
88064
|
+
return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression));
|
|
87920
88065
|
}
|
|
87921
88066
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
87922
88067
|
let expressions;
|
|
@@ -88182,21 +88327,21 @@ function transformES2017(context) {
|
|
|
88182
88327
|
node.initializer,
|
|
88183
88328
|
/*hasReceiver*/
|
|
88184
88329
|
true
|
|
88185
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
88186
|
-
visitNode(node.expression, visitor, isExpression),
|
|
88330
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
88331
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
88187
88332
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
88188
88333
|
);
|
|
88189
88334
|
}
|
|
88190
88335
|
function visitForOfStatementInAsyncBody(node) {
|
|
88191
88336
|
return factory2.updateForOfStatement(
|
|
88192
88337
|
node,
|
|
88193
|
-
visitNode(node.awaitModifier, visitor,
|
|
88338
|
+
visitNode(node.awaitModifier, visitor, isAwaitKeyword),
|
|
88194
88339
|
isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
|
|
88195
88340
|
node.initializer,
|
|
88196
88341
|
/*hasReceiver*/
|
|
88197
88342
|
true
|
|
88198
|
-
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
88199
|
-
visitNode(node.expression, visitor, isExpression),
|
|
88343
|
+
) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
88344
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
88200
88345
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
88201
88346
|
);
|
|
88202
88347
|
}
|
|
@@ -88233,7 +88378,7 @@ function transformES2017(context) {
|
|
|
88233
88378
|
function visitConstructorDeclaration(node) {
|
|
88234
88379
|
return factory2.updateConstructorDeclaration(
|
|
88235
88380
|
node,
|
|
88236
|
-
visitNodes2(node.modifiers, visitor,
|
|
88381
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
88237
88382
|
visitParameterList(node.parameters, visitor, context),
|
|
88238
88383
|
transformMethodBody(node)
|
|
88239
88384
|
);
|
|
@@ -88291,7 +88436,7 @@ function transformES2017(context) {
|
|
|
88291
88436
|
function visitFunctionExpression(node) {
|
|
88292
88437
|
return factory2.updateFunctionExpression(
|
|
88293
88438
|
node,
|
|
88294
|
-
visitNodes2(node.modifiers, visitor,
|
|
88439
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
88295
88440
|
node.asteriskToken,
|
|
88296
88441
|
node.name,
|
|
88297
88442
|
/*typeParameters*/
|
|
@@ -88305,7 +88450,7 @@ function transformES2017(context) {
|
|
|
88305
88450
|
function visitArrowFunction(node) {
|
|
88306
88451
|
return factory2.updateArrowFunction(
|
|
88307
88452
|
node,
|
|
88308
|
-
visitNodes2(node.modifiers, visitor,
|
|
88453
|
+
visitNodes2(node.modifiers, visitor, isModifier),
|
|
88309
88454
|
/*typeParameters*/
|
|
88310
88455
|
void 0,
|
|
88311
88456
|
visitParameterList(node.parameters, visitor, context),
|
|
@@ -88362,7 +88507,7 @@ function transformES2017(context) {
|
|
|
88362
88507
|
),
|
|
88363
88508
|
node
|
|
88364
88509
|
);
|
|
88365
|
-
return visitNode(converted, visitor, isExpression);
|
|
88510
|
+
return Debug.checkDefined(visitNode(converted, visitor, isExpression));
|
|
88366
88511
|
}
|
|
88367
88512
|
function collidesWithParameterName({ name }) {
|
|
88368
88513
|
if (isIdentifier(name)) {
|
|
@@ -88494,7 +88639,7 @@ function transformES2017(context) {
|
|
|
88494
88639
|
if (isBlock(body)) {
|
|
88495
88640
|
return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start));
|
|
88496
88641
|
} else {
|
|
88497
|
-
return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
|
|
88642
|
+
return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody)));
|
|
88498
88643
|
}
|
|
88499
88644
|
}
|
|
88500
88645
|
function getPromiseConstructor(type) {
|
|
@@ -88849,7 +88994,7 @@ function transformES2018(context) {
|
|
|
88849
88994
|
return visitObjectLiteralExpression(node);
|
|
88850
88995
|
case 223 /* BinaryExpression */:
|
|
88851
88996
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
88852
|
-
case
|
|
88997
|
+
case 357 /* CommaListExpression */:
|
|
88853
88998
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
88854
88999
|
case 295 /* CatchClause */:
|
|
88855
89000
|
return visitCatchClause(node);
|
|
@@ -89607,7 +89752,7 @@ function transformES2018(context) {
|
|
|
89607
89752
|
/*questionToken*/
|
|
89608
89753
|
void 0,
|
|
89609
89754
|
visitor,
|
|
89610
|
-
|
|
89755
|
+
isQuestionToken
|
|
89611
89756
|
),
|
|
89612
89757
|
/*typeParameters*/
|
|
89613
89758
|
void 0,
|
|
@@ -90281,15 +90426,10 @@ function transformES2021(context) {
|
|
|
90281
90426
|
if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
|
|
90282
90427
|
return node;
|
|
90283
90428
|
}
|
|
90284
|
-
|
|
90285
|
-
|
|
90286
|
-
const binaryExpression = node;
|
|
90287
|
-
if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
|
|
90288
|
-
return transformLogicalAssignment(binaryExpression);
|
|
90289
|
-
}
|
|
90290
|
-
default:
|
|
90291
|
-
return visitEachChild(node, visitor, context);
|
|
90429
|
+
if (isLogicalOrCoalescingAssignmentExpression(node)) {
|
|
90430
|
+
return transformLogicalAssignment(node);
|
|
90292
90431
|
}
|
|
90432
|
+
return visitEachChild(node, visitor, context);
|
|
90293
90433
|
}
|
|
90294
90434
|
function transformLogicalAssignment(binaryExpression) {
|
|
90295
90435
|
const operator = binaryExpression.operatorToken;
|
|
@@ -90735,7 +90875,7 @@ function transformJsx(context) {
|
|
|
90735
90875
|
return element;
|
|
90736
90876
|
}
|
|
90737
90877
|
function transformJsxSpreadAttributeToSpreadAssignment(node) {
|
|
90738
|
-
return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
|
|
90878
|
+
return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
90739
90879
|
}
|
|
90740
90880
|
function transformJsxAttributesToObjectProps(attrs, children) {
|
|
90741
90881
|
const target = getEmitScriptTarget(compilerOptions);
|
|
@@ -90765,7 +90905,7 @@ function transformJsx(context) {
|
|
|
90765
90905
|
return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
90766
90906
|
}
|
|
90767
90907
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
90768
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
90908
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
90769
90909
|
}
|
|
90770
90910
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
90771
90911
|
const name = getAttributeName(node);
|
|
@@ -90785,7 +90925,7 @@ function transformJsx(context) {
|
|
|
90785
90925
|
if (node.expression === void 0) {
|
|
90786
90926
|
return factory2.createTrue();
|
|
90787
90927
|
}
|
|
90788
|
-
return visitNode(node.expression, visitor, isExpression);
|
|
90928
|
+
return Debug.checkDefined(visitNode(node.expression, visitor, isExpression));
|
|
90789
90929
|
}
|
|
90790
90930
|
if (isJsxElement(node)) {
|
|
90791
90931
|
return visitJsxElement(
|
|
@@ -91427,7 +91567,7 @@ function transformES2015(context) {
|
|
|
91427
91567
|
return visitParenthesizedExpression(node, expressionResultIsUnused2);
|
|
91428
91568
|
case 223 /* BinaryExpression */:
|
|
91429
91569
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
91430
|
-
case
|
|
91570
|
+
case 357 /* CommaListExpression */:
|
|
91431
91571
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
91432
91572
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
91433
91573
|
case 15 /* TemplateHead */:
|
|
@@ -91530,7 +91670,7 @@ function transformES2015(context) {
|
|
|
91530
91670
|
[
|
|
91531
91671
|
factory2.createPropertyAssignment(
|
|
91532
91672
|
factory2.createIdentifier("value"),
|
|
91533
|
-
node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
|
|
91673
|
+
node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero()
|
|
91534
91674
|
)
|
|
91535
91675
|
]
|
|
91536
91676
|
)
|
|
@@ -91701,7 +91841,7 @@ function transformES2015(context) {
|
|
|
91701
91841
|
outer,
|
|
91702
91842
|
/*typeArguments*/
|
|
91703
91843
|
void 0,
|
|
91704
|
-
extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
|
|
91844
|
+
extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : []
|
|
91705
91845
|
)
|
|
91706
91846
|
);
|
|
91707
91847
|
addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
|
|
@@ -92043,7 +92183,7 @@ function transformES2015(context) {
|
|
|
92043
92183
|
factory2.createExpressionStatement(
|
|
92044
92184
|
factory2.createAssignment(
|
|
92045
92185
|
factory2.getGeneratedNameForNode(parameter),
|
|
92046
|
-
visitNode(initializer, visitor, isExpression)
|
|
92186
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
92047
92187
|
)
|
|
92048
92188
|
),
|
|
92049
92189
|
2097152 /* CustomPrologue */
|
|
@@ -92054,7 +92194,7 @@ function transformES2015(context) {
|
|
|
92054
92194
|
return false;
|
|
92055
92195
|
}
|
|
92056
92196
|
function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
|
|
92057
|
-
initializer = visitNode(initializer, visitor, isExpression);
|
|
92197
|
+
initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
92058
92198
|
const statement = factory2.createIfStatement(
|
|
92059
92199
|
factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
|
|
92060
92200
|
setEmitFlags(
|
|
@@ -92330,6 +92470,7 @@ function transformES2015(context) {
|
|
|
92330
92470
|
container
|
|
92331
92471
|
);
|
|
92332
92472
|
const propertyName = visitNode(member.name, visitor, isPropertyName);
|
|
92473
|
+
Debug.assert(propertyName);
|
|
92333
92474
|
let e;
|
|
92334
92475
|
if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
92335
92476
|
const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
|
|
@@ -92373,6 +92514,7 @@ function transformES2015(context) {
|
|
|
92373
92514
|
setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
|
|
92374
92515
|
setSourceMapRange(target, firstAccessor.name);
|
|
92375
92516
|
const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
|
|
92517
|
+
Debug.assert(visitedAccessorName);
|
|
92376
92518
|
if (isPrivateIdentifier(visitedAccessorName)) {
|
|
92377
92519
|
return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
92378
92520
|
}
|
|
@@ -92645,9 +92787,9 @@ function transformES2015(context) {
|
|
|
92645
92787
|
if (node.operatorToken.kind === 27 /* CommaToken */) {
|
|
92646
92788
|
return factory2.updateBinaryExpression(
|
|
92647
92789
|
node,
|
|
92648
|
-
visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
|
|
92790
|
+
Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)),
|
|
92649
92791
|
node.operatorToken,
|
|
92650
|
-
visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
|
|
92792
|
+
Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression))
|
|
92651
92793
|
);
|
|
92652
92794
|
}
|
|
92653
92795
|
return visitEachChild(node, visitor, context);
|
|
@@ -92662,6 +92804,7 @@ function transformES2015(context) {
|
|
|
92662
92804
|
const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
|
|
92663
92805
|
if (result || visited !== element) {
|
|
92664
92806
|
result || (result = node.elements.slice(0, i));
|
|
92807
|
+
Debug.assert(visited);
|
|
92665
92808
|
result.push(visited);
|
|
92666
92809
|
}
|
|
92667
92810
|
}
|
|
@@ -92688,7 +92831,7 @@ function transformES2015(context) {
|
|
|
92688
92831
|
0 /* All */
|
|
92689
92832
|
);
|
|
92690
92833
|
} else {
|
|
92691
|
-
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
|
|
92834
|
+
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression)));
|
|
92692
92835
|
setTextRange(assignment, decl);
|
|
92693
92836
|
}
|
|
92694
92837
|
assignments = append(assignments, assignment);
|
|
@@ -92710,7 +92853,7 @@ function transformES2015(context) {
|
|
|
92710
92853
|
if (node.flags & 3 /* BlockScoped */) {
|
|
92711
92854
|
enableSubstitutionsForBlockScopedBindings();
|
|
92712
92855
|
}
|
|
92713
|
-
const declarations =
|
|
92856
|
+
const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration);
|
|
92714
92857
|
const declarationList = factory2.createVariableDeclarationList(declarations);
|
|
92715
92858
|
setOriginalNode(declarationList, node);
|
|
92716
92859
|
setTextRange(declarationList, node);
|
|
@@ -92794,7 +92937,7 @@ function transformES2015(context) {
|
|
|
92794
92937
|
statement,
|
|
92795
92938
|
/*outermostLabeledStatement*/
|
|
92796
92939
|
node
|
|
92797
|
-
) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
|
|
92940
|
+
) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel);
|
|
92798
92941
|
}
|
|
92799
92942
|
function visitIterationStatement(node, outermostLabeledStatement) {
|
|
92800
92943
|
switch (node.kind) {
|
|
@@ -92837,7 +92980,7 @@ function transformES2015(context) {
|
|
|
92837
92980
|
visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
|
|
92838
92981
|
visitNode(node.condition, visitor, isExpression),
|
|
92839
92982
|
visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
|
|
92840
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
92983
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
92841
92984
|
);
|
|
92842
92985
|
}
|
|
92843
92986
|
function visitForInStatement(node, outermostLabeledStatement) {
|
|
@@ -92923,13 +93066,14 @@ function transformES2015(context) {
|
|
|
92923
93066
|
)));
|
|
92924
93067
|
} else {
|
|
92925
93068
|
setTextRangeEnd(assignment, initializer.end);
|
|
92926
|
-
statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
|
|
93069
|
+
statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1)));
|
|
92927
93070
|
}
|
|
92928
93071
|
}
|
|
92929
93072
|
if (convertedLoopBodyStatements) {
|
|
92930
93073
|
return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
|
|
92931
93074
|
} else {
|
|
92932
93075
|
const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
|
|
93076
|
+
Debug.assert(statement);
|
|
92933
93077
|
if (isBlock(statement)) {
|
|
92934
93078
|
return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
|
|
92935
93079
|
} else {
|
|
@@ -92950,6 +93094,7 @@ function transformES2015(context) {
|
|
|
92950
93094
|
}
|
|
92951
93095
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
92952
93096
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
93097
|
+
Debug.assert(expression);
|
|
92953
93098
|
const counter = factory2.createLoopVariable();
|
|
92954
93099
|
const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
92955
93100
|
/*recordTempVariable*/
|
|
@@ -93009,6 +93154,7 @@ function transformES2015(context) {
|
|
|
93009
93154
|
}
|
|
93010
93155
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
93011
93156
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
93157
|
+
Debug.assert(expression);
|
|
93012
93158
|
const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
93013
93159
|
/*recordTempVariable*/
|
|
93014
93160
|
void 0
|
|
@@ -93266,7 +93412,7 @@ function transformES2015(context) {
|
|
|
93266
93412
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
93267
93413
|
}
|
|
93268
93414
|
} else {
|
|
93269
|
-
const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
|
|
93415
|
+
const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)));
|
|
93270
93416
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
93271
93417
|
}
|
|
93272
93418
|
statements.push(loop);
|
|
@@ -93304,16 +93450,16 @@ function transformES2015(context) {
|
|
|
93304
93450
|
node,
|
|
93305
93451
|
/*awaitModifier*/
|
|
93306
93452
|
void 0,
|
|
93307
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
93308
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93453
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
93454
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93309
93455
|
convertedLoopBody
|
|
93310
93456
|
);
|
|
93311
93457
|
}
|
|
93312
93458
|
function convertForInStatement(node, convertedLoopBody) {
|
|
93313
93459
|
return factory2.updateForInStatement(
|
|
93314
93460
|
node,
|
|
93315
|
-
visitNode(node.initializer, visitor, isForInitializer),
|
|
93316
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93461
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)),
|
|
93462
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93317
93463
|
convertedLoopBody
|
|
93318
93464
|
);
|
|
93319
93465
|
}
|
|
@@ -93321,13 +93467,13 @@ function transformES2015(context) {
|
|
|
93321
93467
|
return factory2.updateDoStatement(
|
|
93322
93468
|
node,
|
|
93323
93469
|
convertedLoopBody,
|
|
93324
|
-
visitNode(node.expression, visitor, isExpression)
|
|
93470
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
|
|
93325
93471
|
);
|
|
93326
93472
|
}
|
|
93327
93473
|
function convertWhileStatement(node, convertedLoopBody) {
|
|
93328
93474
|
return factory2.updateWhileStatement(
|
|
93329
93475
|
node,
|
|
93330
|
-
visitNode(node.expression, visitor, isExpression),
|
|
93476
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
93331
93477
|
convertedLoopBody
|
|
93332
93478
|
);
|
|
93333
93479
|
}
|
|
@@ -93489,7 +93635,7 @@ function transformES2015(context) {
|
|
|
93489
93635
|
void 0,
|
|
93490
93636
|
/*type*/
|
|
93491
93637
|
void 0,
|
|
93492
|
-
visitNode(
|
|
93638
|
+
Debug.checkDefined(visitNode(
|
|
93493
93639
|
factory2.createBlock(
|
|
93494
93640
|
statements,
|
|
93495
93641
|
/*multiLine*/
|
|
@@ -93497,7 +93643,7 @@ function transformES2015(context) {
|
|
|
93497
93643
|
),
|
|
93498
93644
|
visitor,
|
|
93499
93645
|
isBlock
|
|
93500
|
-
)
|
|
93646
|
+
))
|
|
93501
93647
|
),
|
|
93502
93648
|
emitFlags
|
|
93503
93649
|
)
|
|
@@ -93520,7 +93666,7 @@ function transformES2015(context) {
|
|
|
93520
93666
|
if (node.incrementor) {
|
|
93521
93667
|
statements.push(factory2.createIfStatement(
|
|
93522
93668
|
currentState.conditionVariable,
|
|
93523
|
-
factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
|
|
93669
|
+
factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))),
|
|
93524
93670
|
factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
|
|
93525
93671
|
));
|
|
93526
93672
|
} else {
|
|
@@ -93531,11 +93677,12 @@ function transformES2015(context) {
|
|
|
93531
93677
|
}
|
|
93532
93678
|
if (shouldConvertConditionOfForStatement(node)) {
|
|
93533
93679
|
statements.push(factory2.createIfStatement(
|
|
93534
|
-
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
|
|
93535
|
-
visitNode(factory2.createBreakStatement(), visitor, isStatement)
|
|
93680
|
+
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))),
|
|
93681
|
+
Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement))
|
|
93536
93682
|
));
|
|
93537
93683
|
}
|
|
93538
93684
|
}
|
|
93685
|
+
Debug.assert(statement);
|
|
93539
93686
|
if (isBlock(statement)) {
|
|
93540
93687
|
addRange(statements, statement.statements);
|
|
93541
93688
|
} else {
|
|
@@ -93803,9 +93950,9 @@ function transformES2015(context) {
|
|
|
93803
93950
|
createMemberAccessForPropertyName(
|
|
93804
93951
|
factory2,
|
|
93805
93952
|
receiver,
|
|
93806
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
93953
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
93807
93954
|
),
|
|
93808
|
-
visitNode(property.initializer, visitor, isExpression)
|
|
93955
|
+
Debug.checkDefined(visitNode(property.initializer, visitor, isExpression))
|
|
93809
93956
|
);
|
|
93810
93957
|
setTextRange(expression, property);
|
|
93811
93958
|
if (startsOnNewLine) {
|
|
@@ -93818,7 +93965,7 @@ function transformES2015(context) {
|
|
|
93818
93965
|
createMemberAccessForPropertyName(
|
|
93819
93966
|
factory2,
|
|
93820
93967
|
receiver,
|
|
93821
|
-
visitNode(property.name, visitor, isPropertyName)
|
|
93968
|
+
Debug.checkDefined(visitNode(property.name, visitor, isPropertyName))
|
|
93822
93969
|
),
|
|
93823
93970
|
factory2.cloneNode(property.name)
|
|
93824
93971
|
);
|
|
@@ -93833,7 +93980,7 @@ function transformES2015(context) {
|
|
|
93833
93980
|
createMemberAccessForPropertyName(
|
|
93834
93981
|
factory2,
|
|
93835
93982
|
receiver,
|
|
93836
|
-
visitNode(method.name, visitor, isPropertyName)
|
|
93983
|
+
Debug.checkDefined(visitNode(method.name, visitor, isPropertyName))
|
|
93837
93984
|
),
|
|
93838
93985
|
transformFunctionLikeToExpression(
|
|
93839
93986
|
method,
|
|
@@ -93967,7 +94114,7 @@ function transformES2015(context) {
|
|
|
93967
94114
|
}
|
|
93968
94115
|
return factory2.updateCallExpression(
|
|
93969
94116
|
node,
|
|
93970
|
-
visitNode(node.expression, callExpressionVisitor, isExpression),
|
|
94117
|
+
Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)),
|
|
93971
94118
|
/*typeArguments*/
|
|
93972
94119
|
void 0,
|
|
93973
94120
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -94079,8 +94226,8 @@ function transformES2015(context) {
|
|
|
94079
94226
|
let resultingCall;
|
|
94080
94227
|
if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
|
|
94081
94228
|
resultingCall = factory2.createFunctionApplyCall(
|
|
94082
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
94083
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
94229
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
94230
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
94084
94231
|
transformAndSpreadElements(
|
|
94085
94232
|
node.arguments,
|
|
94086
94233
|
/*isArgumentList*/
|
|
@@ -94094,8 +94241,8 @@ function transformES2015(context) {
|
|
|
94094
94241
|
} else {
|
|
94095
94242
|
resultingCall = setTextRange(
|
|
94096
94243
|
factory2.createFunctionCallCall(
|
|
94097
|
-
visitNode(target, callExpressionVisitor, isExpression),
|
|
94098
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
94244
|
+
Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)),
|
|
94245
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)),
|
|
94099
94246
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
94100
94247
|
),
|
|
94101
94248
|
node
|
|
@@ -94117,7 +94264,7 @@ function transformES2015(context) {
|
|
|
94117
94264
|
const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
|
|
94118
94265
|
return factory2.createNewExpression(
|
|
94119
94266
|
factory2.createFunctionApplyCall(
|
|
94120
|
-
visitNode(target, visitor, isExpression),
|
|
94267
|
+
Debug.checkDefined(visitNode(target, visitor, isExpression)),
|
|
94121
94268
|
thisArg,
|
|
94122
94269
|
transformAndSpreadElements(
|
|
94123
94270
|
factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
|
|
@@ -94174,7 +94321,9 @@ function transformES2015(context) {
|
|
|
94174
94321
|
return map(chunk, visitExpressionOfSpread);
|
|
94175
94322
|
}
|
|
94176
94323
|
function visitExpressionOfSpread(node) {
|
|
94324
|
+
Debug.assertNode(node, isSpreadElement);
|
|
94177
94325
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
94326
|
+
Debug.assert(expression);
|
|
94178
94327
|
const isCallToReadHelper = isCallToHelper(expression, "___read");
|
|
94179
94328
|
let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
|
|
94180
94329
|
if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -94225,7 +94374,7 @@ function transformES2015(context) {
|
|
|
94225
94374
|
function visitTemplateExpression(node) {
|
|
94226
94375
|
let expression = factory2.createStringLiteral(node.head.text);
|
|
94227
94376
|
for (const span of node.templateSpans) {
|
|
94228
|
-
const args = [visitNode(span.expression, visitor, isExpression)];
|
|
94377
|
+
const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))];
|
|
94229
94378
|
if (span.literal.text.length > 0) {
|
|
94230
94379
|
args.push(factory2.createStringLiteral(span.literal.text));
|
|
94231
94380
|
}
|
|
@@ -94579,7 +94728,7 @@ function transformGenerators(context) {
|
|
|
94579
94728
|
switch (node.kind) {
|
|
94580
94729
|
case 223 /* BinaryExpression */:
|
|
94581
94730
|
return visitBinaryExpression(node);
|
|
94582
|
-
case
|
|
94731
|
+
case 357 /* CommaListExpression */:
|
|
94583
94732
|
return visitCommaListExpression(node);
|
|
94584
94733
|
case 224 /* ConditionalExpression */:
|
|
94585
94734
|
return visitConditionalExpression(node);
|
|
@@ -94791,19 +94940,19 @@ function transformGenerators(context) {
|
|
|
94791
94940
|
case 208 /* PropertyAccessExpression */:
|
|
94792
94941
|
target = factory2.updatePropertyAccessExpression(
|
|
94793
94942
|
left,
|
|
94794
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
94943
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
94795
94944
|
left.name
|
|
94796
94945
|
);
|
|
94797
94946
|
break;
|
|
94798
94947
|
case 209 /* ElementAccessExpression */:
|
|
94799
94948
|
target = factory2.updateElementAccessExpression(
|
|
94800
94949
|
left,
|
|
94801
|
-
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
94802
|
-
cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
|
|
94950
|
+
cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))),
|
|
94951
|
+
cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))
|
|
94803
94952
|
);
|
|
94804
94953
|
break;
|
|
94805
94954
|
default:
|
|
94806
|
-
target = visitNode(left, visitor, isExpression);
|
|
94955
|
+
target = Debug.checkDefined(visitNode(left, visitor, isExpression));
|
|
94807
94956
|
break;
|
|
94808
94957
|
}
|
|
94809
94958
|
const operator = node.operatorToken.kind;
|
|
@@ -94815,7 +94964,7 @@ function transformGenerators(context) {
|
|
|
94815
94964
|
factory2.createBinaryExpression(
|
|
94816
94965
|
cacheExpression(target),
|
|
94817
94966
|
getNonAssignmentOperatorForCompoundAssignment(operator),
|
|
94818
|
-
visitNode(right, visitor, isExpression)
|
|
94967
|
+
Debug.checkDefined(visitNode(right, visitor, isExpression))
|
|
94819
94968
|
),
|
|
94820
94969
|
node
|
|
94821
94970
|
)
|
|
@@ -94823,7 +94972,7 @@ function transformGenerators(context) {
|
|
|
94823
94972
|
node
|
|
94824
94973
|
);
|
|
94825
94974
|
} else {
|
|
94826
|
-
return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
|
|
94975
|
+
return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression)));
|
|
94827
94976
|
}
|
|
94828
94977
|
}
|
|
94829
94978
|
return visitEachChild(node, visitor, context);
|
|
@@ -94837,9 +94986,9 @@ function transformGenerators(context) {
|
|
|
94837
94986
|
}
|
|
94838
94987
|
return factory2.updateBinaryExpression(
|
|
94839
94988
|
node,
|
|
94840
|
-
cacheExpression(visitNode(node.left, visitor, isExpression)),
|
|
94989
|
+
cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))),
|
|
94841
94990
|
node.operatorToken,
|
|
94842
|
-
visitNode(node.right, visitor, isExpression)
|
|
94991
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
|
|
94843
94992
|
);
|
|
94844
94993
|
}
|
|
94845
94994
|
return visitEachChild(node, visitor, context);
|
|
@@ -94858,7 +95007,7 @@ function transformGenerators(context) {
|
|
|
94858
95007
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
94859
95008
|
pendingExpressions = [];
|
|
94860
95009
|
}
|
|
94861
|
-
pendingExpressions.push(visitNode(node2, visitor, isExpression));
|
|
95010
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression)));
|
|
94862
95011
|
}
|
|
94863
95012
|
}
|
|
94864
95013
|
}
|
|
@@ -94872,7 +95021,7 @@ function transformGenerators(context) {
|
|
|
94872
95021
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
94873
95022
|
pendingExpressions = [];
|
|
94874
95023
|
}
|
|
94875
|
-
pendingExpressions.push(visitNode(elem, visitor, isExpression));
|
|
95024
|
+
pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression)));
|
|
94876
95025
|
}
|
|
94877
95026
|
}
|
|
94878
95027
|
return factory2.inlineExpressions(pendingExpressions);
|
|
@@ -94882,7 +95031,7 @@ function transformGenerators(context) {
|
|
|
94882
95031
|
const resultLocal = declareLocal();
|
|
94883
95032
|
emitAssignment(
|
|
94884
95033
|
resultLocal,
|
|
94885
|
-
visitNode(node.left, visitor, isExpression),
|
|
95034
|
+
Debug.checkDefined(visitNode(node.left, visitor, isExpression)),
|
|
94886
95035
|
/*location*/
|
|
94887
95036
|
node.left
|
|
94888
95037
|
);
|
|
@@ -94903,7 +95052,7 @@ function transformGenerators(context) {
|
|
|
94903
95052
|
}
|
|
94904
95053
|
emitAssignment(
|
|
94905
95054
|
resultLocal,
|
|
94906
|
-
visitNode(node.right, visitor, isExpression),
|
|
95055
|
+
Debug.checkDefined(visitNode(node.right, visitor, isExpression)),
|
|
94907
95056
|
/*location*/
|
|
94908
95057
|
node.right
|
|
94909
95058
|
);
|
|
@@ -94917,13 +95066,13 @@ function transformGenerators(context) {
|
|
|
94917
95066
|
const resultLocal = declareLocal();
|
|
94918
95067
|
emitBreakWhenFalse(
|
|
94919
95068
|
whenFalseLabel,
|
|
94920
|
-
visitNode(node.condition, visitor, isExpression),
|
|
95069
|
+
Debug.checkDefined(visitNode(node.condition, visitor, isExpression)),
|
|
94921
95070
|
/*location*/
|
|
94922
95071
|
node.condition
|
|
94923
95072
|
);
|
|
94924
95073
|
emitAssignment(
|
|
94925
95074
|
resultLocal,
|
|
94926
|
-
visitNode(node.whenTrue, visitor, isExpression),
|
|
95075
|
+
Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)),
|
|
94927
95076
|
/*location*/
|
|
94928
95077
|
node.whenTrue
|
|
94929
95078
|
);
|
|
@@ -94931,7 +95080,7 @@ function transformGenerators(context) {
|
|
|
94931
95080
|
markLabel(whenFalseLabel);
|
|
94932
95081
|
emitAssignment(
|
|
94933
95082
|
resultLocal,
|
|
94934
|
-
visitNode(node.whenFalse, visitor, isExpression),
|
|
95083
|
+
Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)),
|
|
94935
95084
|
/*location*/
|
|
94936
95085
|
node.whenFalse
|
|
94937
95086
|
);
|
|
@@ -95011,7 +95160,7 @@ function transformGenerators(context) {
|
|
|
95011
95160
|
leadingElement = void 0;
|
|
95012
95161
|
expressions2 = [];
|
|
95013
95162
|
}
|
|
95014
|
-
expressions2.push(visitNode(element, visitor, isExpression));
|
|
95163
|
+
expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression)));
|
|
95015
95164
|
return expressions2;
|
|
95016
95165
|
}
|
|
95017
95166
|
}
|
|
@@ -95050,8 +95199,8 @@ function transformGenerators(context) {
|
|
|
95050
95199
|
if (containsYield(node.argumentExpression)) {
|
|
95051
95200
|
return factory2.updateElementAccessExpression(
|
|
95052
95201
|
node,
|
|
95053
|
-
cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
95054
|
-
visitNode(node.argumentExpression, visitor, isExpression)
|
|
95202
|
+
cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))),
|
|
95203
|
+
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))
|
|
95055
95204
|
);
|
|
95056
95205
|
}
|
|
95057
95206
|
return visitEachChild(node, visitor, context);
|
|
@@ -95068,7 +95217,7 @@ function transformGenerators(context) {
|
|
|
95068
95217
|
return setOriginalNode(
|
|
95069
95218
|
setTextRange(
|
|
95070
95219
|
factory2.createFunctionApplyCall(
|
|
95071
|
-
cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
|
|
95220
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))),
|
|
95072
95221
|
thisArg,
|
|
95073
95222
|
visitElements(node.arguments)
|
|
95074
95223
|
),
|
|
@@ -95086,7 +95235,7 @@ function transformGenerators(context) {
|
|
|
95086
95235
|
setTextRange(
|
|
95087
95236
|
factory2.createNewExpression(
|
|
95088
95237
|
factory2.createFunctionApplyCall(
|
|
95089
|
-
cacheExpression(visitNode(target, visitor, isExpression)),
|
|
95238
|
+
cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))),
|
|
95090
95239
|
thisArg,
|
|
95091
95240
|
visitElements(
|
|
95092
95241
|
node.arguments,
|
|
@@ -95202,7 +95351,7 @@ function transformGenerators(context) {
|
|
|
95202
95351
|
return setSourceMapRange(
|
|
95203
95352
|
factory2.createAssignment(
|
|
95204
95353
|
setSourceMapRange(factory2.cloneNode(node.name), node.name),
|
|
95205
|
-
visitNode(node.initializer, visitor, isExpression)
|
|
95354
|
+
Debug.checkDefined(visitNode(node.initializer, visitor, isExpression))
|
|
95206
95355
|
),
|
|
95207
95356
|
node
|
|
95208
95357
|
);
|
|
@@ -95214,7 +95363,7 @@ function transformGenerators(context) {
|
|
|
95214
95363
|
const elseLabel = node.elseStatement ? defineLabel() : void 0;
|
|
95215
95364
|
emitBreakWhenFalse(
|
|
95216
95365
|
node.elseStatement ? elseLabel : endLabel,
|
|
95217
|
-
visitNode(node.expression, visitor, isExpression),
|
|
95366
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
95218
95367
|
/*location*/
|
|
95219
95368
|
node.expression
|
|
95220
95369
|
);
|
|
@@ -95243,7 +95392,7 @@ function transformGenerators(context) {
|
|
|
95243
95392
|
markLabel(loopLabel);
|
|
95244
95393
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95245
95394
|
markLabel(conditionLabel);
|
|
95246
|
-
emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
|
|
95395
|
+
emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95247
95396
|
endLoopBlock();
|
|
95248
95397
|
} else {
|
|
95249
95398
|
emitStatement(visitNode(node, visitor, isStatement));
|
|
@@ -95264,7 +95413,7 @@ function transformGenerators(context) {
|
|
|
95264
95413
|
const loopLabel = defineLabel();
|
|
95265
95414
|
const endLabel = beginLoopBlock(loopLabel);
|
|
95266
95415
|
markLabel(loopLabel);
|
|
95267
|
-
emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
|
|
95416
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95268
95417
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95269
95418
|
emitBreak(loopLabel);
|
|
95270
95419
|
endLoopBlock();
|
|
@@ -95295,7 +95444,7 @@ function transformGenerators(context) {
|
|
|
95295
95444
|
emitStatement(
|
|
95296
95445
|
setTextRange(
|
|
95297
95446
|
factory2.createExpressionStatement(
|
|
95298
|
-
visitNode(initializer, visitor, isExpression)
|
|
95447
|
+
Debug.checkDefined(visitNode(initializer, visitor, isExpression))
|
|
95299
95448
|
),
|
|
95300
95449
|
initializer
|
|
95301
95450
|
)
|
|
@@ -95304,7 +95453,7 @@ function transformGenerators(context) {
|
|
|
95304
95453
|
}
|
|
95305
95454
|
markLabel(conditionLabel);
|
|
95306
95455
|
if (node.condition) {
|
|
95307
|
-
emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
|
|
95456
|
+
emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression)));
|
|
95308
95457
|
}
|
|
95309
95458
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95310
95459
|
markLabel(incrementLabel);
|
|
@@ -95312,7 +95461,7 @@ function transformGenerators(context) {
|
|
|
95312
95461
|
emitStatement(
|
|
95313
95462
|
setTextRange(
|
|
95314
95463
|
factory2.createExpressionStatement(
|
|
95315
|
-
visitNode(node.incrementor, visitor, isExpression)
|
|
95464
|
+
Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))
|
|
95316
95465
|
),
|
|
95317
95466
|
node.incrementor
|
|
95318
95467
|
)
|
|
@@ -95357,7 +95506,7 @@ function transformGenerators(context) {
|
|
|
95357
95506
|
const keysIndex = factory2.createLoopVariable();
|
|
95358
95507
|
const initializer = node.initializer;
|
|
95359
95508
|
hoistVariableDeclaration(keysIndex);
|
|
95360
|
-
emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
|
|
95509
|
+
emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95361
95510
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
95362
95511
|
emitStatement(
|
|
95363
95512
|
factory2.createForInStatement(
|
|
@@ -95388,7 +95537,7 @@ function transformGenerators(context) {
|
|
|
95388
95537
|
}
|
|
95389
95538
|
variable = factory2.cloneNode(initializer.declarations[0].name);
|
|
95390
95539
|
} else {
|
|
95391
|
-
variable = visitNode(initializer, visitor, isExpression);
|
|
95540
|
+
variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression));
|
|
95392
95541
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
95393
95542
|
}
|
|
95394
95543
|
emitAssignment(variable, key);
|
|
@@ -95413,8 +95562,8 @@ function transformGenerators(context) {
|
|
|
95413
95562
|
node = factory2.updateForInStatement(
|
|
95414
95563
|
node,
|
|
95415
95564
|
initializer.declarations[0].name,
|
|
95416
|
-
visitNode(node.expression, visitor, isExpression),
|
|
95417
|
-
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
95565
|
+
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
|
|
95566
|
+
Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))
|
|
95418
95567
|
);
|
|
95419
95568
|
} else {
|
|
95420
95569
|
node = visitEachChild(node, visitor, context);
|
|
@@ -95490,7 +95639,7 @@ function transformGenerators(context) {
|
|
|
95490
95639
|
}
|
|
95491
95640
|
function transformAndEmitWithStatement(node) {
|
|
95492
95641
|
if (containsYield(node)) {
|
|
95493
|
-
beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
|
|
95642
|
+
beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
|
|
95494
95643
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
95495
95644
|
endWithBlock();
|
|
95496
95645
|
} else {
|
|
@@ -95502,7 +95651,7 @@ function transformGenerators(context) {
|
|
|
95502
95651
|
const caseBlock = node.caseBlock;
|
|
95503
95652
|
const numClauses = caseBlock.clauses.length;
|
|
95504
95653
|
const endLabel = beginSwitchBlock();
|
|
95505
|
-
const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
|
|
95654
|
+
const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)));
|
|
95506
95655
|
const clauseLabels = [];
|
|
95507
95656
|
let defaultClauseIndex = -1;
|
|
95508
95657
|
for (let i = 0; i < numClauses; i++) {
|
|
@@ -95524,7 +95673,7 @@ function transformGenerators(context) {
|
|
|
95524
95673
|
}
|
|
95525
95674
|
pendingClauses.push(
|
|
95526
95675
|
factory2.createCaseClause(
|
|
95527
|
-
visitNode(clause.expression, visitor, isExpression),
|
|
95676
|
+
Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)),
|
|
95528
95677
|
[
|
|
95529
95678
|
createInlineBreak(
|
|
95530
95679
|
clauseLabels[i],
|
|
@@ -95594,7 +95743,7 @@ function transformGenerators(context) {
|
|
|
95594
95743
|
function transformAndEmitThrowStatement(node) {
|
|
95595
95744
|
var _a2;
|
|
95596
95745
|
emitThrow(
|
|
95597
|
-
visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
|
|
95746
|
+
Debug.checkDefined(visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression)),
|
|
95598
95747
|
/*location*/
|
|
95599
95748
|
node
|
|
95600
95749
|
);
|
|
@@ -96878,7 +97027,7 @@ function transformModule(context) {
|
|
|
96878
97027
|
}
|
|
96879
97028
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
96880
97029
|
if (currentModuleInfo.exportEquals) {
|
|
96881
|
-
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
97030
|
+
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression);
|
|
96882
97031
|
if (expressionResult) {
|
|
96883
97032
|
if (emitAsReturn) {
|
|
96884
97033
|
const statement = factory2.createReturnStatement(expressionResult);
|
|
@@ -96918,9 +97067,9 @@ function transformModule(context) {
|
|
|
96918
97067
|
return visitFunctionDeclaration(node);
|
|
96919
97068
|
case 260 /* ClassDeclaration */:
|
|
96920
97069
|
return visitClassDeclaration(node);
|
|
96921
|
-
case
|
|
97070
|
+
case 358 /* MergeDeclarationMarker */:
|
|
96922
97071
|
return visitMergeDeclarationMarker(node);
|
|
96923
|
-
case
|
|
97072
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
96924
97073
|
return visitEndOfDeclarationMarker(node);
|
|
96925
97074
|
default:
|
|
96926
97075
|
return visitor(node);
|
|
@@ -96937,7 +97086,7 @@ function transformModule(context) {
|
|
|
96937
97086
|
return visitExpressionStatement(node);
|
|
96938
97087
|
case 214 /* ParenthesizedExpression */:
|
|
96939
97088
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
96940
|
-
case
|
|
97089
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
96941
97090
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
96942
97091
|
case 210 /* CallExpression */:
|
|
96943
97092
|
if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
|
|
@@ -97073,7 +97222,7 @@ function transformModule(context) {
|
|
|
97073
97222
|
}
|
|
97074
97223
|
function visitImportCallExpression(node) {
|
|
97075
97224
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
97076
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
97225
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
97077
97226
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
97078
97227
|
const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
|
|
97079
97228
|
switch (compilerOptions.module) {
|
|
@@ -97602,7 +97751,7 @@ function transformModule(context) {
|
|
|
97602
97751
|
deferredExports[id] = appendExportStatement(
|
|
97603
97752
|
deferredExports[id],
|
|
97604
97753
|
factory2.createIdentifier("default"),
|
|
97605
|
-
visitNode(node.expression, visitor),
|
|
97754
|
+
visitNode(node.expression, visitor, isExpression),
|
|
97606
97755
|
/*location*/
|
|
97607
97756
|
node,
|
|
97608
97757
|
/*allowComments*/
|
|
@@ -97612,7 +97761,7 @@ function transformModule(context) {
|
|
|
97612
97761
|
statements = appendExportStatement(
|
|
97613
97762
|
statements,
|
|
97614
97763
|
factory2.createIdentifier("default"),
|
|
97615
|
-
visitNode(node.expression, visitor),
|
|
97764
|
+
visitNode(node.expression, visitor, isExpression),
|
|
97616
97765
|
/*location*/
|
|
97617
97766
|
node,
|
|
97618
97767
|
/*allowComments*/
|
|
@@ -97640,7 +97789,7 @@ function transformModule(context) {
|
|
|
97640
97789
|
),
|
|
97641
97790
|
/*typeParameters*/
|
|
97642
97791
|
void 0,
|
|
97643
|
-
visitNodes2(node.parameters, visitor),
|
|
97792
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
97644
97793
|
/*type*/
|
|
97645
97794
|
void 0,
|
|
97646
97795
|
visitEachChild(node.body, visitor, context)
|
|
@@ -97681,8 +97830,8 @@ function transformModule(context) {
|
|
|
97681
97830
|
),
|
|
97682
97831
|
/*typeParameters*/
|
|
97683
97832
|
void 0,
|
|
97684
|
-
visitNodes2(node.heritageClauses, visitor),
|
|
97685
|
-
visitNodes2(node.members, visitor)
|
|
97833
|
+
visitNodes2(node.heritageClauses, visitor, isHeritageClause),
|
|
97834
|
+
visitNodes2(node.members, visitor, isClassElement)
|
|
97686
97835
|
),
|
|
97687
97836
|
node
|
|
97688
97837
|
),
|
|
@@ -97730,7 +97879,7 @@ function transformModule(context) {
|
|
|
97730
97879
|
variable.name,
|
|
97731
97880
|
variable.exclamationToken,
|
|
97732
97881
|
variable.type,
|
|
97733
|
-
visitNode(variable.initializer, visitor)
|
|
97882
|
+
visitNode(variable.initializer, visitor, isExpression)
|
|
97734
97883
|
);
|
|
97735
97884
|
variables = append(variables, updatedVariable);
|
|
97736
97885
|
expressions = append(expressions, expression);
|
|
@@ -97781,9 +97930,8 @@ function transformModule(context) {
|
|
|
97781
97930
|
function transformInitializedVariable(node) {
|
|
97782
97931
|
if (isBindingPattern(node.name)) {
|
|
97783
97932
|
return flattenDestructuringAssignment(
|
|
97784
|
-
visitNode(node, visitor),
|
|
97785
|
-
|
|
97786
|
-
void 0,
|
|
97933
|
+
visitNode(node, visitor, isInitializedVariable),
|
|
97934
|
+
visitor,
|
|
97787
97935
|
context,
|
|
97788
97936
|
0 /* All */,
|
|
97789
97937
|
/*needsValue*/
|
|
@@ -97800,7 +97948,7 @@ function transformModule(context) {
|
|
|
97800
97948
|
/*location*/
|
|
97801
97949
|
node.name
|
|
97802
97950
|
),
|
|
97803
|
-
node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
|
|
97951
|
+
node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero()
|
|
97804
97952
|
);
|
|
97805
97953
|
}
|
|
97806
97954
|
}
|
|
@@ -98743,7 +98891,7 @@ function transformSystemModule(context) {
|
|
|
98743
98891
|
),
|
|
98744
98892
|
/*typeParameters*/
|
|
98745
98893
|
void 0,
|
|
98746
|
-
visitNodes2(node.parameters, visitor,
|
|
98894
|
+
visitNodes2(node.parameters, visitor, isParameter),
|
|
98747
98895
|
/*type*/
|
|
98748
98896
|
void 0,
|
|
98749
98897
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -99053,9 +99201,9 @@ function transformSystemModule(context) {
|
|
|
99053
99201
|
return visitCatchClause(node);
|
|
99054
99202
|
case 238 /* Block */:
|
|
99055
99203
|
return visitBlock(node);
|
|
99056
|
-
case
|
|
99204
|
+
case 358 /* MergeDeclarationMarker */:
|
|
99057
99205
|
return visitMergeDeclarationMarker(node);
|
|
99058
|
-
case
|
|
99206
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
99059
99207
|
return visitEndOfDeclarationMarker(node);
|
|
99060
99208
|
default:
|
|
99061
99209
|
return visitor(node);
|
|
@@ -99117,7 +99265,7 @@ function transformSystemModule(context) {
|
|
|
99117
99265
|
}
|
|
99118
99266
|
return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
|
|
99119
99267
|
} else {
|
|
99120
|
-
return visitNode(node, discardedValueVisitor,
|
|
99268
|
+
return visitNode(node, discardedValueVisitor, isForInitializer);
|
|
99121
99269
|
}
|
|
99122
99270
|
}
|
|
99123
99271
|
function visitDoStatement(node) {
|
|
@@ -99138,21 +99286,21 @@ function transformSystemModule(context) {
|
|
|
99138
99286
|
return factory2.updateLabeledStatement(
|
|
99139
99287
|
node,
|
|
99140
99288
|
node.label,
|
|
99141
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
99289
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
99142
99290
|
);
|
|
99143
99291
|
}
|
|
99144
99292
|
function visitWithStatement(node) {
|
|
99145
99293
|
return factory2.updateWithStatement(
|
|
99146
99294
|
node,
|
|
99147
99295
|
visitNode(node.expression, visitor, isExpression),
|
|
99148
|
-
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
99296
|
+
Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
|
|
99149
99297
|
);
|
|
99150
99298
|
}
|
|
99151
99299
|
function visitSwitchStatement(node) {
|
|
99152
99300
|
return factory2.updateSwitchStatement(
|
|
99153
99301
|
node,
|
|
99154
99302
|
visitNode(node.expression, visitor, isExpression),
|
|
99155
|
-
visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
|
|
99303
|
+
Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
|
|
99156
99304
|
);
|
|
99157
99305
|
}
|
|
99158
99306
|
function visitCaseBlock(node) {
|
|
@@ -99184,7 +99332,7 @@ function transformSystemModule(context) {
|
|
|
99184
99332
|
node = factory2.updateCatchClause(
|
|
99185
99333
|
node,
|
|
99186
99334
|
node.variableDeclaration,
|
|
99187
|
-
visitNode(node.block, topLevelNestedVisitor, isBlock)
|
|
99335
|
+
Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
|
|
99188
99336
|
);
|
|
99189
99337
|
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
|
|
99190
99338
|
return node;
|
|
@@ -99211,7 +99359,7 @@ function transformSystemModule(context) {
|
|
|
99211
99359
|
return visitExpressionStatement(node);
|
|
99212
99360
|
case 214 /* ParenthesizedExpression */:
|
|
99213
99361
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
99214
|
-
case
|
|
99362
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
99215
99363
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
99216
99364
|
case 223 /* BinaryExpression */:
|
|
99217
99365
|
if (isDestructuringAssignment(node)) {
|
|
@@ -99254,7 +99402,7 @@ function transformSystemModule(context) {
|
|
|
99254
99402
|
}
|
|
99255
99403
|
function visitImportCallExpression(node) {
|
|
99256
99404
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
99257
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
99405
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression);
|
|
99258
99406
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
99259
99407
|
return factory2.createCallExpression(
|
|
99260
99408
|
factory2.createPropertyAccessExpression(
|
|
@@ -100375,7 +100523,7 @@ function transformDeclarations(context) {
|
|
|
100375
100523
|
sourceFile,
|
|
100376
100524
|
/*bundled*/
|
|
100377
100525
|
true
|
|
100378
|
-
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
100526
|
+
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
100379
100527
|
const newFile = factory2.updateSourceFile(
|
|
100380
100528
|
sourceFile,
|
|
100381
100529
|
[factory2.createModuleDeclaration(
|
|
@@ -100397,7 +100545,7 @@ function transformDeclarations(context) {
|
|
|
100397
100545
|
return newFile;
|
|
100398
100546
|
}
|
|
100399
100547
|
needsDeclare = true;
|
|
100400
|
-
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
100548
|
+
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement);
|
|
100401
100549
|
return factory2.updateSourceFile(
|
|
100402
100550
|
sourceFile,
|
|
100403
100551
|
transformAndReplaceLatePaintedStatements(updated2),
|
|
@@ -100466,7 +100614,7 @@ function transformDeclarations(context) {
|
|
|
100466
100614
|
refs.forEach(referenceVisitor);
|
|
100467
100615
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
100468
100616
|
} else {
|
|
100469
|
-
const statements = visitNodes2(node.statements, visitDeclarationStatements);
|
|
100617
|
+
const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement);
|
|
100470
100618
|
combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
100471
100619
|
refs.forEach(referenceVisitor);
|
|
100472
100620
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
@@ -100583,9 +100731,9 @@ function transformDeclarations(context) {
|
|
|
100583
100731
|
return name;
|
|
100584
100732
|
} else {
|
|
100585
100733
|
if (name.kind === 204 /* ArrayBindingPattern */) {
|
|
100586
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
100734
|
+
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement));
|
|
100587
100735
|
} else {
|
|
100588
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
100736
|
+
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement));
|
|
100589
100737
|
}
|
|
100590
100738
|
}
|
|
100591
100739
|
function visitBindingElement(elem) {
|
|
@@ -100655,10 +100803,10 @@ function transformDeclarations(context) {
|
|
|
100655
100803
|
}
|
|
100656
100804
|
const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
|
|
100657
100805
|
if (type && !shouldUseResolverType) {
|
|
100658
|
-
return visitNode(type, visitDeclarationSubtree);
|
|
100806
|
+
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
100659
100807
|
}
|
|
100660
100808
|
if (!getParseTreeNode(node)) {
|
|
100661
|
-
return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
100809
|
+
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
100662
100810
|
}
|
|
100663
100811
|
if (node.kind === 175 /* SetAccessor */) {
|
|
100664
100812
|
return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
@@ -100772,7 +100920,7 @@ function transformDeclarations(context) {
|
|
|
100772
100920
|
return factory2.createNodeArray(newParams || emptyArray);
|
|
100773
100921
|
}
|
|
100774
100922
|
function ensureTypeParams(node, params) {
|
|
100775
|
-
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
|
|
100923
|
+
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration);
|
|
100776
100924
|
}
|
|
100777
100925
|
function isEnclosingDeclaration(node) {
|
|
100778
100926
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
@@ -100907,7 +101055,7 @@ function transformDeclarations(context) {
|
|
|
100907
101055
|
needsDeclare = priorNeedsDeclare;
|
|
100908
101056
|
lateStatementReplacementMap.set(getOriginalNodeId(i), result);
|
|
100909
101057
|
}
|
|
100910
|
-
return visitNodes2(statements, visitLateVisibilityMarkedStatements);
|
|
101058
|
+
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
100911
101059
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
100912
101060
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
100913
101061
|
const key = getOriginalNodeId(statement);
|
|
@@ -101121,7 +101269,7 @@ function transformDeclarations(context) {
|
|
|
101121
101269
|
input,
|
|
101122
101270
|
ensureModifiers(input),
|
|
101123
101271
|
updateParamsList(input, input.parameters),
|
|
101124
|
-
visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
101272
|
+
visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
101125
101273
|
));
|
|
101126
101274
|
}
|
|
101127
101275
|
case 257 /* VariableDeclaration */: {
|
|
@@ -101154,20 +101302,24 @@ function transformDeclarations(context) {
|
|
|
101154
101302
|
return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
|
|
101155
101303
|
}
|
|
101156
101304
|
case 191 /* ConditionalType */: {
|
|
101157
|
-
const checkType = visitNode(input.checkType, visitDeclarationSubtree);
|
|
101158
|
-
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
|
|
101305
|
+
const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode);
|
|
101306
|
+
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode);
|
|
101159
101307
|
const oldEnclosingDecl = enclosingDeclaration;
|
|
101160
101308
|
enclosingDeclaration = input.trueType;
|
|
101161
|
-
const trueType = visitNode(input.trueType, visitDeclarationSubtree);
|
|
101309
|
+
const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode);
|
|
101162
101310
|
enclosingDeclaration = oldEnclosingDecl;
|
|
101163
|
-
const falseType = visitNode(input.falseType, visitDeclarationSubtree);
|
|
101311
|
+
const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode);
|
|
101312
|
+
Debug.assert(checkType);
|
|
101313
|
+
Debug.assert(extendsType);
|
|
101314
|
+
Debug.assert(trueType);
|
|
101315
|
+
Debug.assert(falseType);
|
|
101164
101316
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
101165
101317
|
}
|
|
101166
101318
|
case 181 /* FunctionType */: {
|
|
101167
|
-
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
101319
|
+
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
101168
101320
|
}
|
|
101169
101321
|
case 182 /* ConstructorType */: {
|
|
101170
|
-
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
101322
|
+
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))));
|
|
101171
101323
|
}
|
|
101172
101324
|
case 202 /* ImportType */: {
|
|
101173
101325
|
if (!isLiteralImportTypeNode(input))
|
|
@@ -101311,7 +101463,7 @@ function transformDeclarations(context) {
|
|
|
101311
101463
|
ensureModifiers(input),
|
|
101312
101464
|
input.name,
|
|
101313
101465
|
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
101314
|
-
visitNode(input.type, visitDeclarationSubtree, isTypeNode)
|
|
101466
|
+
Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode))
|
|
101315
101467
|
));
|
|
101316
101468
|
needsDeclare = previousNeedsDeclare;
|
|
101317
101469
|
return clean2;
|
|
@@ -101323,7 +101475,7 @@ function transformDeclarations(context) {
|
|
|
101323
101475
|
input.name,
|
|
101324
101476
|
ensureTypeParams(input, input.typeParameters),
|
|
101325
101477
|
transformHeritageClauses(input.heritageClauses),
|
|
101326
|
-
visitNodes2(input.members, visitDeclarationSubtree)
|
|
101478
|
+
visitNodes2(input.members, visitDeclarationSubtree, isTypeElement)
|
|
101327
101479
|
));
|
|
101328
101480
|
}
|
|
101329
101481
|
case 259 /* FunctionDeclaration */: {
|
|
@@ -101440,7 +101592,7 @@ function transformDeclarations(context) {
|
|
|
101440
101592
|
const oldHasScopeFix = resultHasScopeMarker;
|
|
101441
101593
|
resultHasScopeMarker = false;
|
|
101442
101594
|
needsScopeFixMarker = false;
|
|
101443
|
-
const statements = visitNodes2(inner.statements, visitDeclarationStatements);
|
|
101595
|
+
const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement);
|
|
101444
101596
|
let lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
101445
101597
|
if (input.flags & 16777216 /* Ambient */) {
|
|
101446
101598
|
needsScopeFixMarker = false;
|
|
@@ -101449,7 +101601,7 @@ function transformDeclarations(context) {
|
|
|
101449
101601
|
if (needsScopeFixMarker) {
|
|
101450
101602
|
lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
|
|
101451
101603
|
} else {
|
|
101452
|
-
lateStatements = visitNodes2(lateStatements, stripExportModifiers);
|
|
101604
|
+
lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement);
|
|
101453
101605
|
}
|
|
101454
101606
|
}
|
|
101455
101607
|
const body = factory2.updateModuleBlock(inner, lateStatements);
|
|
@@ -101545,7 +101697,7 @@ function transformDeclarations(context) {
|
|
|
101545
101697
|
void 0
|
|
101546
101698
|
)
|
|
101547
101699
|
] : void 0;
|
|
101548
|
-
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
|
|
101700
|
+
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement));
|
|
101549
101701
|
const members = factory2.createNodeArray(memberNodes);
|
|
101550
101702
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
101551
101703
|
if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
|
|
@@ -101569,11 +101721,11 @@ function transformDeclarations(context) {
|
|
|
101569
101721
|
if (clause.token === 94 /* ExtendsKeyword */) {
|
|
101570
101722
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
101571
101723
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
101572
|
-
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
|
|
101724
|
+
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
101573
101725
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
101574
101726
|
return newClause;
|
|
101575
101727
|
}
|
|
101576
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
|
|
101728
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments));
|
|
101577
101729
|
}));
|
|
101578
101730
|
return [statement, cleanup(factory2.updateClassDeclaration(
|
|
101579
101731
|
input,
|
|
@@ -101629,7 +101781,7 @@ function transformDeclarations(context) {
|
|
|
101629
101781
|
function transformVariableStatement(input) {
|
|
101630
101782
|
if (!forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
101631
101783
|
return;
|
|
101632
|
-
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
|
|
101784
|
+
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration);
|
|
101633
101785
|
if (!length(nodes))
|
|
101634
101786
|
return;
|
|
101635
101787
|
return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -101720,7 +101872,7 @@ function transformDeclarations(context) {
|
|
|
101720
101872
|
function transformHeritageClauses(nodes) {
|
|
101721
101873
|
return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
|
|
101722
101874
|
return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
|
|
101723
|
-
})), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
|
|
101875
|
+
})), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length));
|
|
101724
101876
|
}
|
|
101725
101877
|
}
|
|
101726
101878
|
function isAlwaysType(node) {
|
|
@@ -101898,7 +102050,7 @@ function noEmitNotification(hint, node, callback) {
|
|
|
101898
102050
|
}
|
|
101899
102051
|
function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
101900
102052
|
var _a2, _b;
|
|
101901
|
-
const enabledSyntaxKindFeatures = new Array(
|
|
102053
|
+
const enabledSyntaxKindFeatures = new Array(361 /* Count */);
|
|
101902
102054
|
let lexicalEnvironmentVariableDeclarations;
|
|
101903
102055
|
let lexicalEnvironmentFunctionDeclarations;
|
|
101904
102056
|
let lexicalEnvironmentStatements;
|
|
@@ -103772,6 +103924,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
103772
103924
|
case 346 /* JSDocThisTag */:
|
|
103773
103925
|
case 347 /* JSDocTypeTag */:
|
|
103774
103926
|
case 352 /* JSDocThrowsTag */:
|
|
103927
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
103775
103928
|
return emitJSDocSimpleTypedTag(node);
|
|
103776
103929
|
case 348 /* JSDocTemplateTag */:
|
|
103777
103930
|
return emitJSDocTemplateTag(node);
|
|
@@ -103779,9 +103932,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
103779
103932
|
return emitJSDocTypedefTag(node);
|
|
103780
103933
|
case 350 /* JSDocSeeTag */:
|
|
103781
103934
|
return emitJSDocSeeTag(node);
|
|
103782
|
-
case
|
|
103783
|
-
case
|
|
103784
|
-
case
|
|
103935
|
+
case 355 /* NotEmittedStatement */:
|
|
103936
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
103937
|
+
case 358 /* MergeDeclarationMarker */:
|
|
103785
103938
|
return;
|
|
103786
103939
|
}
|
|
103787
103940
|
if (isExpression(node)) {
|
|
@@ -103880,18 +104033,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
103880
104033
|
return emitJsxSelfClosingElement(node);
|
|
103881
104034
|
case 285 /* JsxFragment */:
|
|
103882
104035
|
return emitJsxFragment(node);
|
|
103883
|
-
case
|
|
104036
|
+
case 354 /* SyntaxList */:
|
|
103884
104037
|
return Debug.fail("SyntaxList should not be printed");
|
|
103885
|
-
case
|
|
104038
|
+
case 355 /* NotEmittedStatement */:
|
|
103886
104039
|
return;
|
|
103887
|
-
case
|
|
104040
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
103888
104041
|
return emitPartiallyEmittedExpression(node);
|
|
103889
|
-
case
|
|
104042
|
+
case 357 /* CommaListExpression */:
|
|
103890
104043
|
return emitCommaList(node);
|
|
103891
|
-
case
|
|
103892
|
-
case
|
|
104044
|
+
case 358 /* MergeDeclarationMarker */:
|
|
104045
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
103893
104046
|
return;
|
|
103894
|
-
case
|
|
104047
|
+
case 360 /* SyntheticReferenceExpression */:
|
|
103895
104048
|
return Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
103896
104049
|
}
|
|
103897
104050
|
}
|
|
@@ -107139,7 +107292,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107139
107292
|
emitLeadingComments(
|
|
107140
107293
|
pos,
|
|
107141
107294
|
/*isEmittedNode*/
|
|
107142
|
-
node.kind !==
|
|
107295
|
+
node.kind !== 355 /* NotEmittedStatement */
|
|
107143
107296
|
);
|
|
107144
107297
|
}
|
|
107145
107298
|
if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
|
|
@@ -107163,7 +107316,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107163
107316
|
containerPos = savedContainerPos;
|
|
107164
107317
|
containerEnd = savedContainerEnd;
|
|
107165
107318
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
107166
|
-
if (!skipTrailingComments && node.kind !==
|
|
107319
|
+
if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
|
|
107167
107320
|
emitTrailingComments(end);
|
|
107168
107321
|
}
|
|
107169
107322
|
}
|
|
@@ -107435,7 +107588,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107435
107588
|
}
|
|
107436
107589
|
} else {
|
|
107437
107590
|
const source = sourceMapRange.source || sourceMapSource;
|
|
107438
|
-
if (node.kind !==
|
|
107591
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
|
|
107439
107592
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
107440
107593
|
}
|
|
107441
107594
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
@@ -107450,7 +107603,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107450
107603
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
107451
107604
|
sourceMapsDisabled = false;
|
|
107452
107605
|
}
|
|
107453
|
-
if (node.kind !==
|
|
107606
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
|
|
107454
107607
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
107455
107608
|
}
|
|
107456
107609
|
}
|
|
@@ -111137,7 +111290,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
111137
111290
|
createOptionValueDiagnostic("importsNotUsedAsValues", Diagnostics.Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later);
|
|
111138
111291
|
}
|
|
111139
111292
|
if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) {
|
|
111140
|
-
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.
|
|
111293
|
+
createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);
|
|
111141
111294
|
}
|
|
111142
111295
|
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
111143
111296
|
if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
@@ -114366,6 +114519,9 @@ function getFilesInErrorForSummary(diagnostics) {
|
|
|
114366
114519
|
}
|
|
114367
114520
|
);
|
|
114368
114521
|
return filesInError.map((fileName) => {
|
|
114522
|
+
if (fileName === void 0) {
|
|
114523
|
+
return void 0;
|
|
114524
|
+
}
|
|
114369
114525
|
const diagnosticForFileName = find(
|
|
114370
114526
|
diagnostics,
|
|
114371
114527
|
(diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
|
|
@@ -115014,6 +115170,8 @@ function createWatchProgram(host) {
|
|
|
115014
115170
|
parseConfigFile2();
|
|
115015
115171
|
newLine = updateNewLine();
|
|
115016
115172
|
}
|
|
115173
|
+
Debug.assert(compilerOptions);
|
|
115174
|
+
Debug.assert(rootFileNames);
|
|
115017
115175
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
115018
115176
|
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
115019
115177
|
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
|
|
@@ -115116,6 +115274,8 @@ function createWatchProgram(host) {
|
|
|
115116
115274
|
}
|
|
115117
115275
|
function synchronizeProgram() {
|
|
115118
115276
|
writeLog(`Synchronizing program`);
|
|
115277
|
+
Debug.assert(compilerOptions);
|
|
115278
|
+
Debug.assert(rootFileNames);
|
|
115119
115279
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
115120
115280
|
const program = getCurrentBuilderProgram();
|
|
115121
115281
|
if (hasChangedCompilerOptions) {
|
|
@@ -115355,6 +115515,8 @@ function createWatchProgram(host) {
|
|
|
115355
115515
|
}
|
|
115356
115516
|
function reloadFileNamesFromConfigFile() {
|
|
115357
115517
|
writeLog("Reloading new file names and options");
|
|
115518
|
+
Debug.assert(compilerOptions);
|
|
115519
|
+
Debug.assert(configFileName);
|
|
115358
115520
|
reloadLevel = 0 /* None */;
|
|
115359
115521
|
rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
115360
115522
|
if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -115363,6 +115525,7 @@ function createWatchProgram(host) {
|
|
|
115363
115525
|
synchronizeProgram();
|
|
115364
115526
|
}
|
|
115365
115527
|
function reloadConfigFile() {
|
|
115528
|
+
Debug.assert(configFileName);
|
|
115366
115529
|
writeLog(`Reloading config file: ${configFileName}`);
|
|
115367
115530
|
reloadLevel = 0 /* None */;
|
|
115368
115531
|
if (cachedDirectoryStructureHost) {
|
|
@@ -115375,6 +115538,7 @@ function createWatchProgram(host) {
|
|
|
115375
115538
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
115376
115539
|
}
|
|
115377
115540
|
function parseConfigFile2() {
|
|
115541
|
+
Debug.assert(configFileName);
|
|
115378
115542
|
setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
|
|
115379
115543
|
configFileName,
|
|
115380
115544
|
optionsToExtendForConfigFile,
|
|
@@ -115402,6 +115566,7 @@ function createWatchProgram(host) {
|
|
|
115402
115566
|
return config.parsedCommandLine;
|
|
115403
115567
|
if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
|
|
115404
115568
|
writeLog("Reloading new file names and options");
|
|
115569
|
+
Debug.assert(compilerOptions);
|
|
115405
115570
|
const fileNames = getFileNamesFromConfigSpecs(
|
|
115406
115571
|
config.parsedCommandLine.options.configFile.configFileSpecs,
|
|
115407
115572
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
|
|
@@ -115493,7 +115658,8 @@ function createWatchProgram(host) {
|
|
|
115493
115658
|
return watchDirectory(
|
|
115494
115659
|
directory,
|
|
115495
115660
|
(fileOrDirectory) => {
|
|
115496
|
-
Debug.assert(
|
|
115661
|
+
Debug.assert(configFileName);
|
|
115662
|
+
Debug.assert(compilerOptions);
|
|
115497
115663
|
const fileOrDirectoryPath = toPath3(fileOrDirectory);
|
|
115498
115664
|
if (cachedDirectoryStructureHost) {
|
|
115499
115665
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -115524,6 +115690,7 @@ function createWatchProgram(host) {
|
|
|
115524
115690
|
);
|
|
115525
115691
|
}
|
|
115526
115692
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
115693
|
+
Debug.assert(configFileName);
|
|
115527
115694
|
updateSharedExtendedConfigFileWatcher(
|
|
115528
115695
|
forProjectPath,
|
|
115529
115696
|
options,
|