@typescript-deploys/pr-build 5.0.0-pr-49929-73 → 5.0.0-pr-52280-2
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 +592 -595
- package/lib/tsserver.js +641 -647
- package/lib/tsserverlibrary.d.ts +41 -86
- package/lib/tsserverlibrary.js +634 -643
- package/lib/typescript.d.ts +37 -76
- package/lib/typescript.js +627 -638
- package/lib/typingsInstaller.js +263 -240
- package/package.json +1 -1
package/lib/tsserver.js
CHANGED
|
@@ -1001,6 +1001,8 @@ __export(server_exports, {
|
|
|
1001
1001
|
getJSDocReturnTag: () => getJSDocReturnTag,
|
|
1002
1002
|
getJSDocReturnType: () => getJSDocReturnType,
|
|
1003
1003
|
getJSDocRoot: () => getJSDocRoot,
|
|
1004
|
+
getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
|
|
1005
|
+
getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
|
|
1004
1006
|
getJSDocTags: () => getJSDocTags,
|
|
1005
1007
|
getJSDocTagsNoCache: () => getJSDocTagsNoCache,
|
|
1006
1008
|
getJSDocTemplateTag: () => getJSDocTemplateTag,
|
|
@@ -1340,7 +1342,6 @@ __export(server_exports, {
|
|
|
1340
1342
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
1341
1343
|
isArray: () => isArray,
|
|
1342
1344
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
1343
|
-
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
1344
1345
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
1345
1346
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
1346
1347
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -1373,7 +1374,6 @@ __export(server_exports, {
|
|
|
1373
1374
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
1374
1375
|
isBindingElement: () => isBindingElement,
|
|
1375
1376
|
isBindingName: () => isBindingName,
|
|
1376
|
-
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
1377
1377
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
1378
1378
|
isBindingPattern: () => isBindingPattern,
|
|
1379
1379
|
isBlock: () => isBlock,
|
|
@@ -1580,7 +1580,6 @@ __export(server_exports, {
|
|
|
1580
1580
|
isInferTypeNode: () => isInferTypeNode,
|
|
1581
1581
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
1582
1582
|
isInitializedProperty: () => isInitializedProperty,
|
|
1583
|
-
isInitializedVariable: () => isInitializedVariable,
|
|
1584
1583
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
1585
1584
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
1586
1585
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -1630,6 +1629,8 @@ __export(server_exports, {
|
|
|
1630
1629
|
isJSDocPublicTag: () => isJSDocPublicTag,
|
|
1631
1630
|
isJSDocReadonlyTag: () => isJSDocReadonlyTag,
|
|
1632
1631
|
isJSDocReturnTag: () => isJSDocReturnTag,
|
|
1632
|
+
isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
|
|
1633
|
+
isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
|
|
1633
1634
|
isJSDocSeeTag: () => isJSDocSeeTag,
|
|
1634
1635
|
isJSDocSignature: () => isJSDocSignature,
|
|
1635
1636
|
isJSDocTag: () => isJSDocTag,
|
|
@@ -1685,12 +1686,13 @@ __export(server_exports, {
|
|
|
1685
1686
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
1686
1687
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
1687
1688
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
1688
|
-
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
1689
1689
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
1690
1690
|
isLocalName: () => isLocalName,
|
|
1691
1691
|
isLogicalOperator: () => isLogicalOperator,
|
|
1692
1692
|
isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
|
|
1693
1693
|
isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
|
|
1694
|
+
isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
|
|
1695
|
+
isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
|
|
1694
1696
|
isMappedTypeNode: () => isMappedTypeNode,
|
|
1695
1697
|
isMemberName: () => isMemberName,
|
|
1696
1698
|
isMergeDeclarationMarker: () => isMergeDeclarationMarker,
|
|
@@ -2376,6 +2378,7 @@ __export(server_exports, {
|
|
|
2376
2378
|
tryGetDirectories: () => tryGetDirectories,
|
|
2377
2379
|
tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
|
|
2378
2380
|
tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
|
|
2381
|
+
tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
|
|
2379
2382
|
tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
|
|
2380
2383
|
tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
|
|
2381
2384
|
tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
|
|
@@ -2675,7 +2678,7 @@ __export(ts_server_exports3, {
|
|
|
2675
2678
|
|
|
2676
2679
|
// src/compiler/corePublic.ts
|
|
2677
2680
|
var versionMajorMinor = "5.0";
|
|
2678
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2681
|
+
var version = `${versionMajorMinor}.0-insiders.20230117`;
|
|
2679
2682
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2680
2683
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2681
2684
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6475,14 +6478,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
|
|
|
6475
6478
|
SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 350] = "JSDocSeeTag";
|
|
6476
6479
|
SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 351] = "JSDocPropertyTag";
|
|
6477
6480
|
SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 352] = "JSDocThrowsTag";
|
|
6478
|
-
SyntaxKind5[SyntaxKind5["
|
|
6479
|
-
SyntaxKind5[SyntaxKind5["
|
|
6480
|
-
SyntaxKind5[SyntaxKind5["
|
|
6481
|
-
SyntaxKind5[SyntaxKind5["
|
|
6482
|
-
SyntaxKind5[SyntaxKind5["
|
|
6483
|
-
SyntaxKind5[SyntaxKind5["
|
|
6484
|
-
SyntaxKind5[SyntaxKind5["
|
|
6485
|
-
SyntaxKind5[SyntaxKind5["
|
|
6481
|
+
SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 353] = "JSDocSatisfiesTag";
|
|
6482
|
+
SyntaxKind5[SyntaxKind5["SyntaxList"] = 354] = "SyntaxList";
|
|
6483
|
+
SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 355] = "NotEmittedStatement";
|
|
6484
|
+
SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression";
|
|
6485
|
+
SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression";
|
|
6486
|
+
SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 358] = "MergeDeclarationMarker";
|
|
6487
|
+
SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 359] = "EndOfDeclarationMarker";
|
|
6488
|
+
SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 360] = "SyntheticReferenceExpression";
|
|
6489
|
+
SyntaxKind5[SyntaxKind5["Count"] = 361] = "Count";
|
|
6486
6490
|
SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
|
|
6487
6491
|
SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
|
|
6488
6492
|
SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -6511,9 +6515,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
|
|
|
6511
6515
|
SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
|
|
6512
6516
|
SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
|
|
6513
6517
|
SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
|
|
6514
|
-
SyntaxKind5[SyntaxKind5["LastJSDocNode"] =
|
|
6518
|
+
SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocNode";
|
|
6515
6519
|
SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
|
|
6516
|
-
SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] =
|
|
6520
|
+
SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 353 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
|
|
6517
6521
|
SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
|
|
6518
6522
|
SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
|
|
6519
6523
|
return SyntaxKind5;
|
|
@@ -9729,7 +9733,6 @@ var Diagnostics = {
|
|
|
9729
9733
|
An_export_declaration_cannot_have_modifiers: diag(1193, 1 /* Error */, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."),
|
|
9730
9734
|
Export_declarations_are_not_permitted_in_a_namespace: diag(1194, 1 /* Error */, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."),
|
|
9731
9735
|
export_Asterisk_does_not_re_export_a_default: diag(1195, 1 /* Error */, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."),
|
|
9732
|
-
Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, 1 /* Error */, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."),
|
|
9733
9736
|
Catch_clause_variable_cannot_have_an_initializer: diag(1197, 1 /* Error */, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."),
|
|
9734
9737
|
An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, 1 /* Error */, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),
|
|
9735
9738
|
Unterminated_Unicode_escape_sequence: diag(1199, 1 /* Error */, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."),
|
|
@@ -11597,7 +11600,8 @@ var Diagnostics = {
|
|
|
11597
11600
|
_0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
11598
11601
|
_0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
11599
11602
|
_0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
11600
|
-
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.")
|
|
11603
|
+
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."),
|
|
11604
|
+
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.")
|
|
11601
11605
|
};
|
|
11602
11606
|
|
|
11603
11607
|
// src/compiler/scanner.ts
|
|
@@ -12208,7 +12212,10 @@ function reduceEachTrailingCommentRange(text, pos, cb, state, initial) {
|
|
|
12208
12212
|
initial
|
|
12209
12213
|
);
|
|
12210
12214
|
}
|
|
12211
|
-
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments
|
|
12215
|
+
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
12216
|
+
if (!comments) {
|
|
12217
|
+
comments = [];
|
|
12218
|
+
}
|
|
12212
12219
|
comments.push({ kind, pos, end, hasTrailingNewLine });
|
|
12213
12220
|
return comments;
|
|
12214
12221
|
}
|
|
@@ -13991,10 +13998,7 @@ function getOriginalNode(node, nodeTest) {
|
|
|
13991
13998
|
node = node.original;
|
|
13992
13999
|
}
|
|
13993
14000
|
}
|
|
13994
|
-
|
|
13995
|
-
return node;
|
|
13996
|
-
}
|
|
13997
|
-
return nodeTest(node) ? node : void 0;
|
|
14001
|
+
return !nodeTest || nodeTest(node) ? node : void 0;
|
|
13998
14002
|
}
|
|
13999
14003
|
function findAncestor(node, callback) {
|
|
14000
14004
|
while (node) {
|
|
@@ -14312,6 +14316,9 @@ function getJSDocReturnTag(node) {
|
|
|
14312
14316
|
function getJSDocTemplateTag(node) {
|
|
14313
14317
|
return getFirstJSDocTag(node, isJSDocTemplateTag);
|
|
14314
14318
|
}
|
|
14319
|
+
function getJSDocSatisfiesTag(node) {
|
|
14320
|
+
return getFirstJSDocTag(node, isJSDocSatisfiesTag);
|
|
14321
|
+
}
|
|
14315
14322
|
function getJSDocTypeTag(node) {
|
|
14316
14323
|
const tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
14317
14324
|
if (tag && tag.typeExpression && tag.typeExpression.type) {
|
|
@@ -14735,9 +14742,6 @@ function isDeclarationBindingElement(bindingElement) {
|
|
|
14735
14742
|
}
|
|
14736
14743
|
return false;
|
|
14737
14744
|
}
|
|
14738
|
-
function isBindingOrAssignmentElement(node) {
|
|
14739
|
-
return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node);
|
|
14740
|
-
}
|
|
14741
14745
|
function isBindingOrAssignmentPattern(node) {
|
|
14742
14746
|
return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node);
|
|
14743
14747
|
}
|
|
@@ -14767,24 +14771,6 @@ function isArrayBindingOrAssignmentPattern(node) {
|
|
|
14767
14771
|
}
|
|
14768
14772
|
return false;
|
|
14769
14773
|
}
|
|
14770
|
-
function isArrayBindingOrAssignmentElement(node) {
|
|
14771
|
-
switch (node.kind) {
|
|
14772
|
-
case 205 /* BindingElement */:
|
|
14773
|
-
case 229 /* OmittedExpression */:
|
|
14774
|
-
case 227 /* SpreadElement */:
|
|
14775
|
-
case 206 /* ArrayLiteralExpression */:
|
|
14776
|
-
case 207 /* ObjectLiteralExpression */:
|
|
14777
|
-
case 79 /* Identifier */:
|
|
14778
|
-
case 208 /* PropertyAccessExpression */:
|
|
14779
|
-
case 209 /* ElementAccessExpression */:
|
|
14780
|
-
return true;
|
|
14781
|
-
}
|
|
14782
|
-
return isAssignmentExpression(
|
|
14783
|
-
node,
|
|
14784
|
-
/*excludeCompoundAssignment*/
|
|
14785
|
-
true
|
|
14786
|
-
);
|
|
14787
|
-
}
|
|
14788
14774
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
14789
14775
|
const kind = node.kind;
|
|
14790
14776
|
return kind === 208 /* PropertyAccessExpression */ || kind === 163 /* QualifiedName */ || kind === 202 /* ImportType */;
|
|
@@ -14880,18 +14866,6 @@ function isUnaryExpressionWithWrite(expr) {
|
|
|
14880
14866
|
return false;
|
|
14881
14867
|
}
|
|
14882
14868
|
}
|
|
14883
|
-
function isLiteralTypeLiteral(node) {
|
|
14884
|
-
node = skipPartiallyEmittedExpressions(node);
|
|
14885
|
-
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
14886
|
-
case 104 /* NullKeyword */:
|
|
14887
|
-
case 110 /* TrueKeyword */:
|
|
14888
|
-
case 95 /* FalseKeyword */:
|
|
14889
|
-
case 221 /* PrefixUnaryExpression */:
|
|
14890
|
-
return true;
|
|
14891
|
-
default:
|
|
14892
|
-
return isLiteralExpression(node);
|
|
14893
|
-
}
|
|
14894
|
-
}
|
|
14895
14869
|
function isExpression(node) {
|
|
14896
14870
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
14897
14871
|
}
|
|
@@ -14904,8 +14878,8 @@ function isExpressionKind(kind) {
|
|
|
14904
14878
|
case 227 /* SpreadElement */:
|
|
14905
14879
|
case 231 /* AsExpression */:
|
|
14906
14880
|
case 229 /* OmittedExpression */:
|
|
14907
|
-
case
|
|
14908
|
-
case
|
|
14881
|
+
case 357 /* CommaListExpression */:
|
|
14882
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
14909
14883
|
case 235 /* SatisfiesExpression */:
|
|
14910
14884
|
return true;
|
|
14911
14885
|
default:
|
|
@@ -15090,7 +15064,7 @@ function isDeclarationStatementKind(kind) {
|
|
|
15090
15064
|
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 */;
|
|
15091
15065
|
}
|
|
15092
15066
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
15093
|
-
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 ===
|
|
15067
|
+
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 */;
|
|
15094
15068
|
}
|
|
15095
15069
|
function isDeclaration(node) {
|
|
15096
15070
|
if (node.kind === 165 /* TypeParameter */) {
|
|
@@ -15151,13 +15125,13 @@ function isCaseOrDefaultClause(node) {
|
|
|
15151
15125
|
return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
|
|
15152
15126
|
}
|
|
15153
15127
|
function isJSDocNode(node) {
|
|
15154
|
-
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <=
|
|
15128
|
+
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 353 /* LastJSDocNode */;
|
|
15155
15129
|
}
|
|
15156
15130
|
function isJSDocCommentContainingNode(node) {
|
|
15157
15131
|
return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
|
|
15158
15132
|
}
|
|
15159
15133
|
function isJSDocTag(node) {
|
|
15160
|
-
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <=
|
|
15134
|
+
return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 353 /* LastJSDocTagNode */;
|
|
15161
15135
|
}
|
|
15162
15136
|
function isSetAccessor(node) {
|
|
15163
15137
|
return node.kind === 175 /* SetAccessor */;
|
|
@@ -15573,7 +15547,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
15573
15547
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
15574
15548
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
15575
15549
|
}
|
|
15576
|
-
if (node.kind ===
|
|
15550
|
+
if (node.kind === 354 /* SyntaxList */ && node._children.length > 0) {
|
|
15577
15551
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
15578
15552
|
}
|
|
15579
15553
|
return skipTrivia(
|
|
@@ -15882,7 +15856,6 @@ function isBlockScope(node, parentNode) {
|
|
|
15882
15856
|
return false;
|
|
15883
15857
|
}
|
|
15884
15858
|
function isDeclarationWithTypeParameters(node) {
|
|
15885
|
-
Debug.type(node);
|
|
15886
15859
|
switch (node.kind) {
|
|
15887
15860
|
case 341 /* JSDocCallbackTag */:
|
|
15888
15861
|
case 349 /* JSDocTypedefTag */:
|
|
@@ -15894,7 +15867,6 @@ function isDeclarationWithTypeParameters(node) {
|
|
|
15894
15867
|
}
|
|
15895
15868
|
}
|
|
15896
15869
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
15897
|
-
Debug.type(node);
|
|
15898
15870
|
switch (node.kind) {
|
|
15899
15871
|
case 176 /* CallSignature */:
|
|
15900
15872
|
case 177 /* ConstructSignature */:
|
|
@@ -17453,7 +17425,7 @@ function filterOwnedJSDocTags(hostNode, jsDoc) {
|
|
|
17453
17425
|
return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0;
|
|
17454
17426
|
}
|
|
17455
17427
|
function ownsJSDocTag(hostNode, tag) {
|
|
17456
|
-
return !isJSDocTypeTag(tag) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
17428
|
+
return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
17457
17429
|
}
|
|
17458
17430
|
function getNextJSDocCommentLocation(node) {
|
|
17459
17431
|
const parent2 = node.parent;
|
|
@@ -18036,7 +18008,7 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => {
|
|
|
18036
18008
|
})(OperatorPrecedence || {});
|
|
18037
18009
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
18038
18010
|
switch (nodeKind) {
|
|
18039
|
-
case
|
|
18011
|
+
case 357 /* CommaListExpression */:
|
|
18040
18012
|
return 0 /* Comma */;
|
|
18041
18013
|
case 227 /* SpreadElement */:
|
|
18042
18014
|
return 1 /* Spread */;
|
|
@@ -19038,14 +19010,23 @@ function modifierToFlag(token) {
|
|
|
19038
19010
|
}
|
|
19039
19011
|
return 0 /* None */;
|
|
19040
19012
|
}
|
|
19013
|
+
function isBinaryLogicalOperator(token) {
|
|
19014
|
+
return token === 56 /* BarBarToken */ || token === 55 /* AmpersandAmpersandToken */;
|
|
19015
|
+
}
|
|
19041
19016
|
function isLogicalOperator(token) {
|
|
19042
|
-
return token
|
|
19017
|
+
return isBinaryLogicalOperator(token) || token === 53 /* ExclamationToken */;
|
|
19043
19018
|
}
|
|
19044
19019
|
function isLogicalOrCoalescingAssignmentOperator(token) {
|
|
19045
19020
|
return token === 75 /* BarBarEqualsToken */ || token === 76 /* AmpersandAmpersandEqualsToken */ || token === 77 /* QuestionQuestionEqualsToken */;
|
|
19046
19021
|
}
|
|
19047
19022
|
function isLogicalOrCoalescingAssignmentExpression(expr) {
|
|
19048
|
-
return isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
19023
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind);
|
|
19024
|
+
}
|
|
19025
|
+
function isLogicalOrCoalescingBinaryOperator(token) {
|
|
19026
|
+
return isBinaryLogicalOperator(token) || token === 60 /* QuestionQuestionToken */;
|
|
19027
|
+
}
|
|
19028
|
+
function isLogicalOrCoalescingBinaryExpression(expr) {
|
|
19029
|
+
return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind);
|
|
19049
19030
|
}
|
|
19050
19031
|
function isAssignmentOperator(token) {
|
|
19051
19032
|
return token >= 63 /* FirstAssignment */ && token <= 78 /* LastAssignment */;
|
|
@@ -19422,7 +19403,7 @@ function getInitializedVariables(node) {
|
|
|
19422
19403
|
return filter(node.declarations, isInitializedVariable);
|
|
19423
19404
|
}
|
|
19424
19405
|
function isInitializedVariable(node) {
|
|
19425
|
-
return
|
|
19406
|
+
return node.initializer !== void 0;
|
|
19426
19407
|
}
|
|
19427
19408
|
function isWatchSet(options) {
|
|
19428
19409
|
return options.watch && hasProperty(options, "watch");
|
|
@@ -19609,7 +19590,7 @@ function isObjectTypeDeclaration(node) {
|
|
|
19609
19590
|
return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node);
|
|
19610
19591
|
}
|
|
19611
19592
|
function isTypeNodeKind(kind) {
|
|
19612
|
-
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 ===
|
|
19593
|
+
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 */;
|
|
19613
19594
|
}
|
|
19614
19595
|
function isAccessExpression(node) {
|
|
19615
19596
|
return node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */;
|
|
@@ -19691,7 +19672,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
|
|
|
19691
19672
|
case 209 /* ElementAccessExpression */:
|
|
19692
19673
|
case 208 /* PropertyAccessExpression */:
|
|
19693
19674
|
case 232 /* NonNullExpression */:
|
|
19694
|
-
case
|
|
19675
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
19695
19676
|
case 235 /* SatisfiesExpression */:
|
|
19696
19677
|
node = node.expression;
|
|
19697
19678
|
continue;
|
|
@@ -21005,7 +20986,7 @@ function getContainingNodeArray(node) {
|
|
|
21005
20986
|
return parent2.types;
|
|
21006
20987
|
case 186 /* TupleType */:
|
|
21007
20988
|
case 206 /* ArrayLiteralExpression */:
|
|
21008
|
-
case
|
|
20989
|
+
case 357 /* CommaListExpression */:
|
|
21009
20990
|
case 272 /* NamedImports */:
|
|
21010
20991
|
case 276 /* NamedExports */:
|
|
21011
20992
|
return parent2.elements;
|
|
@@ -21190,6 +21171,16 @@ function isNonNullAccess(node) {
|
|
|
21190
21171
|
const kind = node.kind;
|
|
21191
21172
|
return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
|
|
21192
21173
|
}
|
|
21174
|
+
function isJSDocSatisfiesExpression(node) {
|
|
21175
|
+
return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node);
|
|
21176
|
+
}
|
|
21177
|
+
function getJSDocSatisfiesExpressionType(node) {
|
|
21178
|
+
return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node));
|
|
21179
|
+
}
|
|
21180
|
+
function tryGetJSDocSatisfiesTypeNode(node) {
|
|
21181
|
+
const tag = getJSDocSatisfiesTag(node);
|
|
21182
|
+
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
21183
|
+
}
|
|
21193
21184
|
|
|
21194
21185
|
// src/compiler/factory/baseNodeFactory.ts
|
|
21195
21186
|
function createBaseNodeFactory() {
|
|
@@ -22214,6 +22205,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
22214
22205
|
get updateJSDocThrowsTag() {
|
|
22215
22206
|
return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocThrowsTag */);
|
|
22216
22207
|
},
|
|
22208
|
+
get createJSDocSatisfiesTag() {
|
|
22209
|
+
return getJSDocTypeLikeTagCreateFunction(353 /* JSDocSatisfiesTag */);
|
|
22210
|
+
},
|
|
22211
|
+
get updateJSDocSatisfiesTag() {
|
|
22212
|
+
return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocSatisfiesTag */);
|
|
22213
|
+
},
|
|
22217
22214
|
createJSDocEnumTag: createJSDocEnumTag2,
|
|
22218
22215
|
updateJSDocEnumTag,
|
|
22219
22216
|
createJSDocUnknownTag,
|
|
@@ -25373,18 +25370,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25373
25370
|
return node;
|
|
25374
25371
|
}
|
|
25375
25372
|
function createSyntaxList3(children) {
|
|
25376
|
-
const node = createBaseNode(
|
|
25373
|
+
const node = createBaseNode(354 /* SyntaxList */);
|
|
25377
25374
|
node._children = children;
|
|
25378
25375
|
return node;
|
|
25379
25376
|
}
|
|
25380
25377
|
function createNotEmittedStatement2(original) {
|
|
25381
|
-
const node = createBaseNode(
|
|
25378
|
+
const node = createBaseNode(355 /* NotEmittedStatement */);
|
|
25382
25379
|
node.original = original;
|
|
25383
25380
|
setTextRange(node, original);
|
|
25384
25381
|
return node;
|
|
25385
25382
|
}
|
|
25386
25383
|
function createPartiallyEmittedExpression2(expression, original) {
|
|
25387
|
-
const node = createBaseNode(
|
|
25384
|
+
const node = createBaseNode(356 /* PartiallyEmittedExpression */);
|
|
25388
25385
|
node.expression = expression;
|
|
25389
25386
|
node.original = original;
|
|
25390
25387
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -25406,7 +25403,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25406
25403
|
return node;
|
|
25407
25404
|
}
|
|
25408
25405
|
function createCommaListExpression(elements) {
|
|
25409
|
-
const node = createBaseNode(
|
|
25406
|
+
const node = createBaseNode(357 /* CommaListExpression */);
|
|
25410
25407
|
node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements));
|
|
25411
25408
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
25412
25409
|
return node;
|
|
@@ -25415,19 +25412,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25415
25412
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
25416
25413
|
}
|
|
25417
25414
|
function createEndOfDeclarationMarker(original) {
|
|
25418
|
-
const node = createBaseNode(
|
|
25415
|
+
const node = createBaseNode(359 /* EndOfDeclarationMarker */);
|
|
25419
25416
|
node.emitNode = {};
|
|
25420
25417
|
node.original = original;
|
|
25421
25418
|
return node;
|
|
25422
25419
|
}
|
|
25423
25420
|
function createMergeDeclarationMarker(original) {
|
|
25424
|
-
const node = createBaseNode(
|
|
25421
|
+
const node = createBaseNode(358 /* MergeDeclarationMarker */);
|
|
25425
25422
|
node.emitNode = {};
|
|
25426
25423
|
node.original = original;
|
|
25427
25424
|
return node;
|
|
25428
25425
|
}
|
|
25429
25426
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
25430
|
-
const node = createBaseNode(
|
|
25427
|
+
const node = createBaseNode(360 /* SyntheticReferenceExpression */);
|
|
25431
25428
|
node.expression = expression;
|
|
25432
25429
|
node.thisArg = thisArg;
|
|
25433
25430
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -25667,7 +25664,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25667
25664
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
25668
25665
|
case 232 /* NonNullExpression */:
|
|
25669
25666
|
return updateNonNullExpression2(outerExpression, expression);
|
|
25670
|
-
case
|
|
25667
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
25671
25668
|
return updatePartiallyEmittedExpression2(outerExpression, expression);
|
|
25672
25669
|
}
|
|
25673
25670
|
}
|
|
@@ -26203,7 +26200,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
|
|
|
26203
26200
|
case 213 /* TypeAssertionExpression */:
|
|
26204
26201
|
case 235 /* SatisfiesExpression */:
|
|
26205
26202
|
case 231 /* AsExpression */:
|
|
26206
|
-
case
|
|
26203
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
26207
26204
|
case 214 /* ParenthesizedExpression */:
|
|
26208
26205
|
case 106 /* SuperKeyword */:
|
|
26209
26206
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -27842,10 +27839,10 @@ function isSyntheticExpression(node) {
|
|
|
27842
27839
|
return node.kind === 234 /* SyntheticExpression */;
|
|
27843
27840
|
}
|
|
27844
27841
|
function isPartiallyEmittedExpression(node) {
|
|
27845
|
-
return node.kind ===
|
|
27842
|
+
return node.kind === 356 /* PartiallyEmittedExpression */;
|
|
27846
27843
|
}
|
|
27847
27844
|
function isCommaListExpression(node) {
|
|
27848
|
-
return node.kind ===
|
|
27845
|
+
return node.kind === 357 /* CommaListExpression */;
|
|
27849
27846
|
}
|
|
27850
27847
|
function isTemplateSpan(node) {
|
|
27851
27848
|
return node.kind === 236 /* TemplateSpan */;
|
|
@@ -27989,16 +27986,16 @@ function isMissingDeclaration(node) {
|
|
|
27989
27986
|
return node.kind === 279 /* MissingDeclaration */;
|
|
27990
27987
|
}
|
|
27991
27988
|
function isNotEmittedStatement(node) {
|
|
27992
|
-
return node.kind ===
|
|
27989
|
+
return node.kind === 355 /* NotEmittedStatement */;
|
|
27993
27990
|
}
|
|
27994
27991
|
function isSyntheticReference(node) {
|
|
27995
|
-
return node.kind ===
|
|
27992
|
+
return node.kind === 360 /* SyntheticReferenceExpression */;
|
|
27996
27993
|
}
|
|
27997
27994
|
function isMergeDeclarationMarker(node) {
|
|
27998
|
-
return node.kind ===
|
|
27995
|
+
return node.kind === 358 /* MergeDeclarationMarker */;
|
|
27999
27996
|
}
|
|
28000
27997
|
function isEndOfDeclarationMarker(node) {
|
|
28001
|
-
return node.kind ===
|
|
27998
|
+
return node.kind === 359 /* EndOfDeclarationMarker */;
|
|
28002
27999
|
}
|
|
28003
28000
|
function isExternalModuleReference(node) {
|
|
28004
28001
|
return node.kind === 280 /* ExternalModuleReference */;
|
|
@@ -28189,11 +28186,14 @@ function isJSDocPropertyTag(node) {
|
|
|
28189
28186
|
function isJSDocImplementsTag(node) {
|
|
28190
28187
|
return node.kind === 332 /* JSDocImplementsTag */;
|
|
28191
28188
|
}
|
|
28189
|
+
function isJSDocSatisfiesTag(node) {
|
|
28190
|
+
return node.kind === 353 /* JSDocSatisfiesTag */;
|
|
28191
|
+
}
|
|
28192
28192
|
function isJSDocThrowsTag(node) {
|
|
28193
28193
|
return node.kind === 352 /* JSDocThrowsTag */;
|
|
28194
28194
|
}
|
|
28195
28195
|
function isSyntaxList(n) {
|
|
28196
|
-
return n.kind ===
|
|
28196
|
+
return n.kind === 354 /* SyntaxList */;
|
|
28197
28197
|
}
|
|
28198
28198
|
|
|
28199
28199
|
// src/compiler/factory/utilities.ts
|
|
@@ -28561,7 +28561,7 @@ function startsWithUseStrict(statements) {
|
|
|
28561
28561
|
return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
|
|
28562
28562
|
}
|
|
28563
28563
|
function isCommaSequence(node) {
|
|
28564
|
-
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind ===
|
|
28564
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 357 /* CommaListExpression */;
|
|
28565
28565
|
}
|
|
28566
28566
|
function isJSDocTypeAssertion(node) {
|
|
28567
28567
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -28584,7 +28584,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
28584
28584
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
28585
28585
|
case 232 /* NonNullExpression */:
|
|
28586
28586
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
28587
|
-
case
|
|
28587
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
28588
28588
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
28589
28589
|
}
|
|
28590
28590
|
return false;
|
|
@@ -29587,7 +29587,7 @@ var forEachChildTable = {
|
|
|
29587
29587
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
29588
29588
|
return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
|
|
29589
29589
|
},
|
|
29590
|
-
[
|
|
29590
|
+
[357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
29591
29591
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
29592
29592
|
},
|
|
29593
29593
|
[281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -29659,6 +29659,7 @@ var forEachChildTable = {
|
|
|
29659
29659
|
[347 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
|
|
29660
29660
|
[346 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
|
|
29661
29661
|
[343 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
|
|
29662
|
+
[353 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
|
|
29662
29663
|
[352 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
|
|
29663
29664
|
[342 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag,
|
|
29664
29665
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
@@ -29678,7 +29679,7 @@ var forEachChildTable = {
|
|
|
29678
29679
|
[339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
29679
29680
|
[334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
29680
29681
|
[340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
29681
|
-
[
|
|
29682
|
+
[356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
29682
29683
|
};
|
|
29683
29684
|
function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
|
|
29684
29685
|
return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -35754,6 +35755,9 @@ var Parser;
|
|
|
35754
35755
|
case "overload":
|
|
35755
35756
|
tag = parseOverloadTag(start3, tagName, margin, indentText);
|
|
35756
35757
|
break;
|
|
35758
|
+
case "satisfies":
|
|
35759
|
+
tag = parseSatisfiesTag(start3, tagName, margin, indentText);
|
|
35760
|
+
break;
|
|
35757
35761
|
case "see":
|
|
35758
35762
|
tag = parseSeeTag(start3, tagName, margin, indentText);
|
|
35759
35763
|
break;
|
|
@@ -36062,6 +36066,14 @@ var Parser;
|
|
|
36062
36066
|
const className = parseExpressionWithTypeArgumentsForAugments();
|
|
36063
36067
|
return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start3, getNodePos(), margin, indentText)), start3);
|
|
36064
36068
|
}
|
|
36069
|
+
function parseSatisfiesTag(start3, tagName, margin, indentText) {
|
|
36070
|
+
const typeExpression = parseJSDocTypeExpression(
|
|
36071
|
+
/*mayOmitBraces*/
|
|
36072
|
+
false
|
|
36073
|
+
);
|
|
36074
|
+
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), margin, indentText) : void 0;
|
|
36075
|
+
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start3);
|
|
36076
|
+
}
|
|
36065
36077
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
36066
36078
|
const usedBrace = parseOptional(18 /* OpenBraceToken */);
|
|
36067
36079
|
const pos = getNodePos();
|
|
@@ -39685,7 +39697,7 @@ function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) {
|
|
|
39685
39697
|
const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors);
|
|
39686
39698
|
json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
|
|
39687
39699
|
let extendedConfigPath;
|
|
39688
|
-
if (json.extends) {
|
|
39700
|
+
if (json.extends || json.extends === "") {
|
|
39689
39701
|
if (!isCompilerOptionsValue(extendsOptionDeclaration, json.extends)) {
|
|
39690
39702
|
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", getCompilerOptionValueTypeString(extendsOptionDeclaration)));
|
|
39691
39703
|
} else {
|
|
@@ -39812,7 +39824,11 @@ function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiag
|
|
|
39812
39824
|
if (resolved.resolvedModule) {
|
|
39813
39825
|
return resolved.resolvedModule.resolvedFileName;
|
|
39814
39826
|
}
|
|
39815
|
-
|
|
39827
|
+
if (extendedConfig === "") {
|
|
39828
|
+
errors.push(createDiagnostic(Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends"));
|
|
39829
|
+
} else {
|
|
39830
|
+
errors.push(createDiagnostic(Diagnostics.File_0_not_found, extendedConfig));
|
|
39831
|
+
}
|
|
39816
39832
|
return void 0;
|
|
39817
39833
|
}
|
|
39818
39834
|
function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
|
|
@@ -40095,7 +40111,6 @@ function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile,
|
|
|
40095
40111
|
}
|
|
40096
40112
|
}
|
|
40097
40113
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
40098
|
-
Debug.assert(typeof spec === "string");
|
|
40099
40114
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
40100
40115
|
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
40101
40116
|
} else if (invalidDotDotAfterRecursiveWildcard(spec)) {
|
|
@@ -43552,13 +43567,12 @@ function createBinder() {
|
|
|
43552
43567
|
} else if (node.kind === 221 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) {
|
|
43553
43568
|
node = node.operand;
|
|
43554
43569
|
} else {
|
|
43555
|
-
return
|
|
43570
|
+
return isLogicalOrCoalescingBinaryExpression(node);
|
|
43556
43571
|
}
|
|
43557
43572
|
}
|
|
43558
43573
|
}
|
|
43559
43574
|
function isLogicalAssignmentExpression(node) {
|
|
43560
|
-
|
|
43561
|
-
return isBinaryExpression(node) && isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind);
|
|
43575
|
+
return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node));
|
|
43562
43576
|
}
|
|
43563
43577
|
function isTopLevelLogicalExpression(node) {
|
|
43564
43578
|
while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 53 /* ExclamationToken */) {
|
|
@@ -43941,7 +43955,7 @@ function createBinder() {
|
|
|
43941
43955
|
};
|
|
43942
43956
|
}
|
|
43943
43957
|
const operator = node.operatorToken.kind;
|
|
43944
|
-
if (operator
|
|
43958
|
+
if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) {
|
|
43945
43959
|
if (isTopLevelLogicalExpression(node)) {
|
|
43946
43960
|
const postExpressionLabel = createBranchLabel();
|
|
43947
43961
|
bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
|
|
@@ -47455,7 +47469,7 @@ function createTypeChecker(host) {
|
|
|
47455
47469
|
if (jsxFragmentPragma) {
|
|
47456
47470
|
const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
47457
47471
|
file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
47458
|
-
visitNode(file.localJsxFragmentFactory, markAsSynthetic
|
|
47472
|
+
visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
47459
47473
|
if (file.localJsxFragmentFactory) {
|
|
47460
47474
|
return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
47461
47475
|
}
|
|
@@ -47498,7 +47512,7 @@ function createTypeChecker(host) {
|
|
|
47498
47512
|
if (jsxPragma) {
|
|
47499
47513
|
const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
47500
47514
|
file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
47501
|
-
visitNode(file.localJsxFactory, markAsSynthetic
|
|
47515
|
+
visitNode(file.localJsxFactory, markAsSynthetic);
|
|
47502
47516
|
if (file.localJsxFactory) {
|
|
47503
47517
|
return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
47504
47518
|
}
|
|
@@ -49009,7 +49023,6 @@ function createTypeChecker(host) {
|
|
|
49009
49023
|
return valueSymbol;
|
|
49010
49024
|
}
|
|
49011
49025
|
const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
49012
|
-
Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
49013
49026
|
result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues);
|
|
49014
49027
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
49015
49028
|
if (valueSymbol.valueDeclaration)
|
|
@@ -52649,7 +52662,7 @@ function createTypeChecker(host) {
|
|
|
52649
52662
|
}
|
|
52650
52663
|
let hadError = false;
|
|
52651
52664
|
const file = getSourceFileOfNode(existing);
|
|
52652
|
-
const transformed = visitNode(existing, visitExistingNodeTreeSymbols
|
|
52665
|
+
const transformed = visitNode(existing, visitExistingNodeTreeSymbols);
|
|
52653
52666
|
if (hadError) {
|
|
52654
52667
|
return void 0;
|
|
52655
52668
|
}
|
|
@@ -52662,16 +52675,16 @@ function createTypeChecker(host) {
|
|
|
52662
52675
|
return factory.createKeywordTypeNode(157 /* UnknownKeyword */);
|
|
52663
52676
|
}
|
|
52664
52677
|
if (isJSDocNullableType(node)) {
|
|
52665
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols
|
|
52678
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
|
|
52666
52679
|
}
|
|
52667
52680
|
if (isJSDocOptionalType(node)) {
|
|
52668
|
-
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols
|
|
52681
|
+
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(155 /* UndefinedKeyword */)]);
|
|
52669
52682
|
}
|
|
52670
52683
|
if (isJSDocNonNullableType(node)) {
|
|
52671
52684
|
return visitNode(node.type, visitExistingNodeTreeSymbols);
|
|
52672
52685
|
}
|
|
52673
52686
|
if (isJSDocVariadicType(node)) {
|
|
52674
|
-
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols
|
|
52687
|
+
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
|
|
52675
52688
|
}
|
|
52676
52689
|
if (isJSDocTypeLiteral(node)) {
|
|
52677
52690
|
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => {
|
|
@@ -52683,7 +52696,7 @@ function createTypeChecker(host) {
|
|
|
52683
52696
|
void 0,
|
|
52684
52697
|
name,
|
|
52685
52698
|
t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
52686
|
-
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols
|
|
52699
|
+
overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52687
52700
|
);
|
|
52688
52701
|
}));
|
|
52689
52702
|
}
|
|
@@ -52702,9 +52715,9 @@ function createTypeChecker(host) {
|
|
|
52702
52715
|
"x",
|
|
52703
52716
|
/*questionToken*/
|
|
52704
52717
|
void 0,
|
|
52705
|
-
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols
|
|
52718
|
+
visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols)
|
|
52706
52719
|
)],
|
|
52707
|
-
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols
|
|
52720
|
+
visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols)
|
|
52708
52721
|
)]);
|
|
52709
52722
|
}
|
|
52710
52723
|
if (isJSDocFunctionType(node)) {
|
|
@@ -52713,33 +52726,33 @@ function createTypeChecker(host) {
|
|
|
52713
52726
|
return factory.createConstructorTypeNode(
|
|
52714
52727
|
/*modifiers*/
|
|
52715
52728
|
void 0,
|
|
52716
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols
|
|
52729
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
52717
52730
|
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration(
|
|
52718
52731
|
/*modifiers*/
|
|
52719
52732
|
void 0,
|
|
52720
52733
|
getEffectiveDotDotDotForParameter(p),
|
|
52721
52734
|
getNameForJSDocFunctionParameter(p, i),
|
|
52722
52735
|
p.questionToken,
|
|
52723
|
-
visitNode(p.type, visitExistingNodeTreeSymbols
|
|
52736
|
+
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
52724
52737
|
/*initializer*/
|
|
52725
52738
|
void 0
|
|
52726
52739
|
)),
|
|
52727
|
-
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols
|
|
52740
|
+
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52728
52741
|
);
|
|
52729
52742
|
} else {
|
|
52730
52743
|
return factory.createFunctionTypeNode(
|
|
52731
|
-
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols
|
|
52744
|
+
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols),
|
|
52732
52745
|
map(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
52733
52746
|
/*modifiers*/
|
|
52734
52747
|
void 0,
|
|
52735
52748
|
getEffectiveDotDotDotForParameter(p),
|
|
52736
52749
|
getNameForJSDocFunctionParameter(p, i),
|
|
52737
52750
|
p.questionToken,
|
|
52738
|
-
visitNode(p.type, visitExistingNodeTreeSymbols
|
|
52751
|
+
visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
52739
52752
|
/*initializer*/
|
|
52740
52753
|
void 0
|
|
52741
52754
|
)),
|
|
52742
|
-
visitNode(node.type, visitExistingNodeTreeSymbols
|
|
52755
|
+
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
52743
52756
|
);
|
|
52744
52757
|
}
|
|
52745
52758
|
}
|
|
@@ -53661,7 +53674,7 @@ function createTypeChecker(host) {
|
|
|
53661
53674
|
break;
|
|
53662
53675
|
}
|
|
53663
53676
|
case 268 /* ImportEqualsDeclaration */:
|
|
53664
|
-
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations,
|
|
53677
|
+
if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) {
|
|
53665
53678
|
serializeMaybeAliasAssignment(symbol);
|
|
53666
53679
|
break;
|
|
53667
53680
|
}
|
|
@@ -54756,6 +54769,9 @@ function createTypeChecker(host) {
|
|
|
54756
54769
|
const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);
|
|
54757
54770
|
const isOptional = includeOptionality && isOptionalDeclaration(declaration);
|
|
54758
54771
|
const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
54772
|
+
if (!declaredType && isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
|
|
54773
|
+
return useUnknownInCatchVariables ? unknownType : anyType;
|
|
54774
|
+
}
|
|
54759
54775
|
if (declaredType) {
|
|
54760
54776
|
return addOptionality(declaredType, isProperty, isOptional);
|
|
54761
54777
|
}
|
|
@@ -55334,14 +55350,6 @@ function createTypeChecker(host) {
|
|
|
55334
55350
|
}
|
|
55335
55351
|
Debug.assertIsDefined(symbol.valueDeclaration);
|
|
55336
55352
|
const declaration = symbol.valueDeclaration;
|
|
55337
|
-
if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
|
|
55338
|
-
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
55339
|
-
if (typeNode === void 0) {
|
|
55340
|
-
return useUnknownInCatchVariables ? unknownType : anyType;
|
|
55341
|
-
}
|
|
55342
|
-
const type2 = getTypeOfNode(typeNode);
|
|
55343
|
-
return isTypeAny(type2) || type2 === unknownType ? type2 : errorType;
|
|
55344
|
-
}
|
|
55345
55353
|
if (isSourceFile(declaration) && isJsonSourceFile(declaration)) {
|
|
55346
55354
|
if (!declaration.statements.length) {
|
|
55347
55355
|
return emptyObjectType;
|
|
@@ -69930,7 +69938,7 @@ function createTypeChecker(host) {
|
|
|
69930
69938
|
}
|
|
69931
69939
|
}
|
|
69932
69940
|
function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) {
|
|
69933
|
-
const typeNode = getEffectiveTypeAnnotationNode(declaration);
|
|
69941
|
+
const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0);
|
|
69934
69942
|
if (typeNode) {
|
|
69935
69943
|
return getTypeFromTypeNode(typeNode);
|
|
69936
69944
|
}
|
|
@@ -70539,8 +70547,16 @@ function createTypeChecker(host) {
|
|
|
70539
70547
|
Debug.assert(parent2.parent.kind === 225 /* TemplateExpression */);
|
|
70540
70548
|
return getContextualTypeForSubstitutionExpression(parent2.parent, node);
|
|
70541
70549
|
case 214 /* ParenthesizedExpression */: {
|
|
70542
|
-
|
|
70543
|
-
|
|
70550
|
+
if (isInJSFile(parent2)) {
|
|
70551
|
+
if (isJSDocSatisfiesExpression(parent2)) {
|
|
70552
|
+
return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2));
|
|
70553
|
+
}
|
|
70554
|
+
const typeTag = getJSDocTypeTag(parent2);
|
|
70555
|
+
if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) {
|
|
70556
|
+
return getTypeFromTypeNode(typeTag.typeExpression.type);
|
|
70557
|
+
}
|
|
70558
|
+
}
|
|
70559
|
+
return getContextualType2(parent2, contextFlags);
|
|
70544
70560
|
}
|
|
70545
70561
|
case 232 /* NonNullExpression */:
|
|
70546
70562
|
return getContextualType2(parent2, contextFlags);
|
|
@@ -74744,12 +74760,15 @@ function createTypeChecker(host) {
|
|
|
74744
74760
|
}
|
|
74745
74761
|
function checkSatisfiesExpression(node) {
|
|
74746
74762
|
checkSourceElement(node.type);
|
|
74747
|
-
|
|
74748
|
-
|
|
74763
|
+
return checkSatisfiesExpressionWorker(node.expression, node.type);
|
|
74764
|
+
}
|
|
74765
|
+
function checkSatisfiesExpressionWorker(expression, target, checkMode) {
|
|
74766
|
+
const exprType = checkExpression(expression, checkMode);
|
|
74767
|
+
const targetType = getTypeFromTypeNode(target);
|
|
74749
74768
|
if (isErrorType(targetType)) {
|
|
74750
74769
|
return targetType;
|
|
74751
74770
|
}
|
|
74752
|
-
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType,
|
|
74771
|
+
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
|
|
74753
74772
|
return exprType;
|
|
74754
74773
|
}
|
|
74755
74774
|
function checkMetaProperty(node) {
|
|
@@ -76156,12 +76175,12 @@ function createTypeChecker(host) {
|
|
|
76156
76175
|
void 0
|
|
76157
76176
|
);
|
|
76158
76177
|
const operator = operatorToken.kind;
|
|
76159
|
-
if (operator
|
|
76160
|
-
|
|
76161
|
-
|
|
76162
|
-
|
|
76163
|
-
|
|
76164
|
-
|
|
76178
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
76179
|
+
let parent2 = node.parent;
|
|
76180
|
+
while (parent2.kind === 214 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) {
|
|
76181
|
+
parent2 = parent2.parent;
|
|
76182
|
+
}
|
|
76183
|
+
if (operator === 55 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) {
|
|
76165
76184
|
checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0);
|
|
76166
76185
|
}
|
|
76167
76186
|
checkTruthinessOfType(leftType, node.left);
|
|
@@ -76238,7 +76257,7 @@ function createTypeChecker(host) {
|
|
|
76238
76257
|
return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108 /* ThisKeyword */);
|
|
76239
76258
|
}
|
|
76240
76259
|
let leftType;
|
|
76241
|
-
if (operator
|
|
76260
|
+
if (isLogicalOrCoalescingBinaryOperator(operator)) {
|
|
76242
76261
|
leftType = checkTruthinessExpression(left, checkMode);
|
|
76243
76262
|
} else {
|
|
76244
76263
|
leftType = checkExpression(left, checkMode);
|
|
@@ -76781,6 +76800,12 @@ function createTypeChecker(host) {
|
|
|
76781
76800
|
}
|
|
76782
76801
|
function checkDeclarationInitializer(declaration, checkMode, contextualType) {
|
|
76783
76802
|
const initializer = getEffectiveInitializer(declaration);
|
|
76803
|
+
if (isInJSFile(declaration)) {
|
|
76804
|
+
const typeNode = tryGetJSDocSatisfiesTypeNode(declaration);
|
|
76805
|
+
if (typeNode) {
|
|
76806
|
+
return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode);
|
|
76807
|
+
}
|
|
76808
|
+
}
|
|
76784
76809
|
const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(
|
|
76785
76810
|
initializer,
|
|
76786
76811
|
contextualType,
|
|
@@ -77108,9 +77133,14 @@ function createTypeChecker(host) {
|
|
|
77108
77133
|
}
|
|
77109
77134
|
}
|
|
77110
77135
|
function checkParenthesizedExpression(node, checkMode) {
|
|
77111
|
-
if (hasJSDocNodes(node)
|
|
77112
|
-
|
|
77113
|
-
|
|
77136
|
+
if (hasJSDocNodes(node)) {
|
|
77137
|
+
if (isJSDocSatisfiesExpression(node)) {
|
|
77138
|
+
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
77139
|
+
}
|
|
77140
|
+
if (isJSDocTypeAssertion(node)) {
|
|
77141
|
+
const type = getJSDocTypeAssertionType(node);
|
|
77142
|
+
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
77143
|
+
}
|
|
77114
77144
|
}
|
|
77115
77145
|
return checkExpression(node.expression, checkMode);
|
|
77116
77146
|
}
|
|
@@ -78812,6 +78842,19 @@ function createTypeChecker(host) {
|
|
|
78812
78842
|
function checkJSDocTypeTag(node) {
|
|
78813
78843
|
checkSourceElement(node.typeExpression);
|
|
78814
78844
|
}
|
|
78845
|
+
function checkJSDocSatisfiesTag(node) {
|
|
78846
|
+
checkSourceElement(node.typeExpression);
|
|
78847
|
+
const host2 = getEffectiveJSDocHost(node);
|
|
78848
|
+
if (host2) {
|
|
78849
|
+
const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag);
|
|
78850
|
+
if (length(tags) > 1) {
|
|
78851
|
+
for (let i = 1; i < length(tags); i++) {
|
|
78852
|
+
const tagName = tags[i].tagName;
|
|
78853
|
+
error(tagName, Diagnostics._0_tag_already_specified, idText(tagName));
|
|
78854
|
+
}
|
|
78855
|
+
}
|
|
78856
|
+
}
|
|
78857
|
+
}
|
|
78815
78858
|
function checkJSDocLinkLikeTag(node) {
|
|
78816
78859
|
if (node.name) {
|
|
78817
78860
|
resolveJSDocMemberName(
|
|
@@ -79597,15 +79640,24 @@ function createTypeChecker(host) {
|
|
|
79597
79640
|
function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) {
|
|
79598
79641
|
if (!strictNullChecks)
|
|
79599
79642
|
return;
|
|
79600
|
-
|
|
79601
|
-
|
|
79602
|
-
|
|
79603
|
-
helper(
|
|
79643
|
+
bothHelper(condExpr, body);
|
|
79644
|
+
function bothHelper(condExpr2, body2) {
|
|
79645
|
+
condExpr2 = skipParentheses(condExpr2);
|
|
79646
|
+
helper(condExpr2, body2);
|
|
79647
|
+
while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 56 /* BarBarToken */ || condExpr2.operatorToken.kind === 60 /* QuestionQuestionToken */)) {
|
|
79648
|
+
condExpr2 = skipParentheses(condExpr2.left);
|
|
79649
|
+
helper(condExpr2, body2);
|
|
79650
|
+
}
|
|
79604
79651
|
}
|
|
79605
79652
|
function helper(condExpr2, body2) {
|
|
79606
|
-
const location =
|
|
79607
|
-
if (isModuleExportsAccessExpression(location))
|
|
79653
|
+
const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2;
|
|
79654
|
+
if (isModuleExportsAccessExpression(location)) {
|
|
79655
|
+
return;
|
|
79656
|
+
}
|
|
79657
|
+
if (isLogicalOrCoalescingBinaryExpression(location)) {
|
|
79658
|
+
bothHelper(location, body2);
|
|
79608
79659
|
return;
|
|
79660
|
+
}
|
|
79609
79661
|
const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
|
|
79610
79662
|
const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion3(location.expression);
|
|
79611
79663
|
if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
|
|
@@ -79615,7 +79667,7 @@ function createTypeChecker(host) {
|
|
|
79615
79667
|
if (callSignatures.length === 0 && !isPromise) {
|
|
79616
79668
|
return;
|
|
79617
79669
|
}
|
|
79618
|
-
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name :
|
|
79670
|
+
const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0;
|
|
79619
79671
|
const testedSymbol = testedNode && getSymbolAtLocation(testedNode);
|
|
79620
79672
|
if (!testedSymbol && !isPromise) {
|
|
79621
79673
|
return;
|
|
@@ -80573,18 +80625,8 @@ function createTypeChecker(host) {
|
|
|
80573
80625
|
if (catchClause) {
|
|
80574
80626
|
if (catchClause.variableDeclaration) {
|
|
80575
80627
|
const declaration = catchClause.variableDeclaration;
|
|
80576
|
-
|
|
80577
|
-
if (
|
|
80578
|
-
const type = getTypeForVariableLikeDeclaration(
|
|
80579
|
-
declaration,
|
|
80580
|
-
/*includeOptionality*/
|
|
80581
|
-
false,
|
|
80582
|
-
0 /* Normal */
|
|
80583
|
-
);
|
|
80584
|
-
if (type && !(type.flags & 3 /* AnyOrUnknown */)) {
|
|
80585
|
-
grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
|
|
80586
|
-
}
|
|
80587
|
-
} else if (declaration.initializer) {
|
|
80628
|
+
checkVariableLikeDeclaration(declaration);
|
|
80629
|
+
if (declaration.initializer) {
|
|
80588
80630
|
grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
|
|
80589
80631
|
} else {
|
|
80590
80632
|
const blockLocals = catchClause.block.locals;
|
|
@@ -82416,6 +82458,8 @@ function createTypeChecker(host) {
|
|
|
82416
82458
|
case 338 /* JSDocProtectedTag */:
|
|
82417
82459
|
case 337 /* JSDocPrivateTag */:
|
|
82418
82460
|
return checkJSDocAccessibilityModifiers(node);
|
|
82461
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
82462
|
+
return checkJSDocSatisfiesTag(node);
|
|
82419
82463
|
case 196 /* IndexedAccessType */:
|
|
82420
82464
|
return checkIndexedAccessType(node);
|
|
82421
82465
|
case 197 /* MappedType */:
|
|
@@ -85974,10 +86018,13 @@ var SymbolTrackerImpl = class {
|
|
|
85974
86018
|
|
|
85975
86019
|
// src/compiler/visitorPublic.ts
|
|
85976
86020
|
function visitNode(node, visitor, test, lift) {
|
|
85977
|
-
if (node === void 0) {
|
|
86021
|
+
if (node === void 0 || visitor === void 0) {
|
|
85978
86022
|
return node;
|
|
85979
86023
|
}
|
|
85980
86024
|
const visited = visitor(node);
|
|
86025
|
+
if (visited === node) {
|
|
86026
|
+
return node;
|
|
86027
|
+
}
|
|
85981
86028
|
let visitedNode;
|
|
85982
86029
|
if (visited === void 0) {
|
|
85983
86030
|
return void 0;
|
|
@@ -85990,7 +86037,7 @@ function visitNode(node, visitor, test, lift) {
|
|
|
85990
86037
|
return visitedNode;
|
|
85991
86038
|
}
|
|
85992
86039
|
function visitNodes2(nodes, visitor, test, start2, count) {
|
|
85993
|
-
if (nodes === void 0) {
|
|
86040
|
+
if (nodes === void 0 || visitor === void 0) {
|
|
85994
86041
|
return nodes;
|
|
85995
86042
|
}
|
|
85996
86043
|
const length2 = nodes.length;
|
|
@@ -86039,30 +86086,25 @@ function visitArrayWorker(nodes, visitor, test, start2, count) {
|
|
|
86039
86086
|
}
|
|
86040
86087
|
for (let i = 0; i < count; i++) {
|
|
86041
86088
|
const node = nodes[i + start2];
|
|
86042
|
-
const visited = node !== void 0 ? visitor
|
|
86089
|
+
const visited = node !== void 0 ? visitor(node) : void 0;
|
|
86043
86090
|
if (updated !== void 0 || visited === void 0 || visited !== node) {
|
|
86044
86091
|
if (updated === void 0) {
|
|
86045
86092
|
updated = nodes.slice(0, i);
|
|
86046
|
-
Debug.assertEachNode(updated, test);
|
|
86047
86093
|
}
|
|
86048
86094
|
if (visited) {
|
|
86049
86095
|
if (isArray(visited)) {
|
|
86050
86096
|
for (const visitedNode of visited) {
|
|
86051
|
-
Debug.assertNode(visitedNode, test);
|
|
86097
|
+
void Debug.assertNode(visitedNode, test);
|
|
86052
86098
|
updated.push(visitedNode);
|
|
86053
86099
|
}
|
|
86054
86100
|
} else {
|
|
86055
|
-
Debug.assertNode(visited, test);
|
|
86101
|
+
void Debug.assertNode(visited, test);
|
|
86056
86102
|
updated.push(visited);
|
|
86057
86103
|
}
|
|
86058
86104
|
}
|
|
86059
86105
|
}
|
|
86060
86106
|
}
|
|
86061
|
-
|
|
86062
|
-
return updated;
|
|
86063
|
-
}
|
|
86064
|
-
Debug.assertEachNode(nodes, test);
|
|
86065
|
-
return nodes;
|
|
86107
|
+
return updated != null ? updated : nodes;
|
|
86066
86108
|
}
|
|
86067
86109
|
function visitLexicalEnvironment(statements, visitor, context, start2, ensureUseStrict, nodesVisitor = visitNodes2) {
|
|
86068
86110
|
context.startLexicalEnvironment();
|
|
@@ -86076,7 +86118,7 @@ function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2)
|
|
|
86076
86118
|
context.startLexicalEnvironment();
|
|
86077
86119
|
if (nodes) {
|
|
86078
86120
|
context.setLexicalEnvironmentFlags(1 /* InParameters */, true);
|
|
86079
|
-
updated = nodesVisitor(nodes, visitor,
|
|
86121
|
+
updated = nodesVisitor(nodes, visitor, isParameterDeclaration);
|
|
86080
86122
|
if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) {
|
|
86081
86123
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
86082
86124
|
}
|
|
@@ -86198,7 +86240,6 @@ function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) {
|
|
|
86198
86240
|
function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) {
|
|
86199
86241
|
context.startBlockScope();
|
|
86200
86242
|
const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock);
|
|
86201
|
-
Debug.assert(updated);
|
|
86202
86243
|
const declarations = context.endBlockScope();
|
|
86203
86244
|
if (some(declarations)) {
|
|
86204
86245
|
if (isBlock(updated)) {
|
|
@@ -86221,14 +86262,14 @@ var visitEachChildTable = {
|
|
|
86221
86262
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86222
86263
|
return context.factory.updateQualifiedName(
|
|
86223
86264
|
node,
|
|
86224
|
-
|
|
86225
|
-
|
|
86265
|
+
nodeVisitor(node.left, visitor, isEntityName),
|
|
86266
|
+
nodeVisitor(node.right, visitor, isIdentifier)
|
|
86226
86267
|
);
|
|
86227
86268
|
},
|
|
86228
86269
|
[164 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86229
86270
|
return context.factory.updateComputedPropertyName(
|
|
86230
86271
|
node,
|
|
86231
|
-
|
|
86272
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86232
86273
|
);
|
|
86233
86274
|
},
|
|
86234
86275
|
// Signature elements
|
|
@@ -86236,7 +86277,7 @@ var visitEachChildTable = {
|
|
|
86236
86277
|
return context.factory.updateTypeParameterDeclaration(
|
|
86237
86278
|
node,
|
|
86238
86279
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86239
|
-
|
|
86280
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86240
86281
|
nodeVisitor(node.constraint, visitor, isTypeNode),
|
|
86241
86282
|
nodeVisitor(node.default, visitor, isTypeNode)
|
|
86242
86283
|
);
|
|
@@ -86245,9 +86286,9 @@ var visitEachChildTable = {
|
|
|
86245
86286
|
return context.factory.updateParameterDeclaration(
|
|
86246
86287
|
node,
|
|
86247
86288
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86248
|
-
|
|
86249
|
-
|
|
86250
|
-
|
|
86289
|
+
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
86290
|
+
nodeVisitor(node.name, visitor, isBindingName),
|
|
86291
|
+
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86251
86292
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86252
86293
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86253
86294
|
);
|
|
@@ -86255,7 +86296,7 @@ var visitEachChildTable = {
|
|
|
86255
86296
|
[167 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86256
86297
|
return context.factory.updateDecorator(
|
|
86257
86298
|
node,
|
|
86258
|
-
|
|
86299
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86259
86300
|
);
|
|
86260
86301
|
},
|
|
86261
86302
|
// Type elements
|
|
@@ -86263,19 +86304,19 @@ var visitEachChildTable = {
|
|
|
86263
86304
|
return context.factory.updatePropertySignature(
|
|
86264
86305
|
node,
|
|
86265
86306
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86266
|
-
|
|
86267
|
-
|
|
86307
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86308
|
+
nodeVisitor(node.questionToken, tokenVisitor, isToken),
|
|
86268
86309
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86269
86310
|
);
|
|
86270
86311
|
},
|
|
86271
86312
|
[169 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86272
|
-
var _a2
|
|
86313
|
+
var _a2;
|
|
86273
86314
|
return context.factory.updatePropertyDeclaration(
|
|
86274
86315
|
node,
|
|
86275
86316
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86276
|
-
|
|
86317
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86277
86318
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
86278
|
-
|
|
86319
|
+
nodeVisitor((_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken),
|
|
86279
86320
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86280
86321
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86281
86322
|
);
|
|
@@ -86284,10 +86325,10 @@ var visitEachChildTable = {
|
|
|
86284
86325
|
return context.factory.updateMethodSignature(
|
|
86285
86326
|
node,
|
|
86286
86327
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86287
|
-
|
|
86288
|
-
|
|
86328
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86329
|
+
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86289
86330
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86290
|
-
nodesVisitor(node.parameters, visitor,
|
|
86331
|
+
nodesVisitor(node.parameters, visitor, isParameterDeclaration),
|
|
86291
86332
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86292
86333
|
);
|
|
86293
86334
|
},
|
|
@@ -86295,9 +86336,9 @@ var visitEachChildTable = {
|
|
|
86295
86336
|
return context.factory.updateMethodDeclaration(
|
|
86296
86337
|
node,
|
|
86297
86338
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86298
|
-
|
|
86299
|
-
|
|
86300
|
-
|
|
86339
|
+
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86340
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86341
|
+
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86301
86342
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86302
86343
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86303
86344
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
@@ -86316,7 +86357,7 @@ var visitEachChildTable = {
|
|
|
86316
86357
|
return context.factory.updateGetAccessorDeclaration(
|
|
86317
86358
|
node,
|
|
86318
86359
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86319
|
-
|
|
86360
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86320
86361
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86321
86362
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86322
86363
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
@@ -86326,7 +86367,7 @@ var visitEachChildTable = {
|
|
|
86326
86367
|
return context.factory.updateSetAccessorDeclaration(
|
|
86327
86368
|
node,
|
|
86328
86369
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
86329
|
-
|
|
86370
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
86330
86371
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86331
86372
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
86332
86373
|
);
|
|
@@ -86343,7 +86384,7 @@ var visitEachChildTable = {
|
|
|
86343
86384
|
return context.factory.updateCallSignature(
|
|
86344
86385
|
node,
|
|
86345
86386
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86346
|
-
nodesVisitor(node.parameters, visitor,
|
|
86387
|
+
nodesVisitor(node.parameters, visitor, isParameterDeclaration),
|
|
86347
86388
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86348
86389
|
);
|
|
86349
86390
|
},
|
|
@@ -86351,7 +86392,7 @@ var visitEachChildTable = {
|
|
|
86351
86392
|
return context.factory.updateConstructSignature(
|
|
86352
86393
|
node,
|
|
86353
86394
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86354
|
-
nodesVisitor(node.parameters, visitor,
|
|
86395
|
+
nodesVisitor(node.parameters, visitor, isParameterDeclaration),
|
|
86355
86396
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86356
86397
|
);
|
|
86357
86398
|
},
|
|
@@ -86359,8 +86400,8 @@ var visitEachChildTable = {
|
|
|
86359
86400
|
return context.factory.updateIndexSignature(
|
|
86360
86401
|
node,
|
|
86361
86402
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86362
|
-
nodesVisitor(node.parameters, visitor,
|
|
86363
|
-
|
|
86403
|
+
nodesVisitor(node.parameters, visitor, isParameterDeclaration),
|
|
86404
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86364
86405
|
);
|
|
86365
86406
|
},
|
|
86366
86407
|
// Types
|
|
@@ -86368,14 +86409,14 @@ var visitEachChildTable = {
|
|
|
86368
86409
|
return context.factory.updateTypePredicateNode(
|
|
86369
86410
|
node,
|
|
86370
86411
|
nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword),
|
|
86371
|
-
|
|
86412
|
+
nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode),
|
|
86372
86413
|
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86373
86414
|
);
|
|
86374
86415
|
},
|
|
86375
86416
|
[180 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86376
86417
|
return context.factory.updateTypeReferenceNode(
|
|
86377
86418
|
node,
|
|
86378
|
-
|
|
86419
|
+
nodeVisitor(node.typeName, visitor, isEntityName),
|
|
86379
86420
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
86380
86421
|
);
|
|
86381
86422
|
},
|
|
@@ -86383,8 +86424,8 @@ var visitEachChildTable = {
|
|
|
86383
86424
|
return context.factory.updateFunctionTypeNode(
|
|
86384
86425
|
node,
|
|
86385
86426
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86386
|
-
nodesVisitor(node.parameters, visitor,
|
|
86387
|
-
|
|
86427
|
+
nodesVisitor(node.parameters, visitor, isParameterDeclaration),
|
|
86428
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86388
86429
|
);
|
|
86389
86430
|
},
|
|
86390
86431
|
[182 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -86392,14 +86433,14 @@ var visitEachChildTable = {
|
|
|
86392
86433
|
node,
|
|
86393
86434
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86394
86435
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86395
|
-
nodesVisitor(node.parameters, visitor,
|
|
86396
|
-
|
|
86436
|
+
nodesVisitor(node.parameters, visitor, isParameterDeclaration),
|
|
86437
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86397
86438
|
);
|
|
86398
86439
|
},
|
|
86399
86440
|
[183 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86400
86441
|
return context.factory.updateTypeQueryNode(
|
|
86401
86442
|
node,
|
|
86402
|
-
|
|
86443
|
+
nodeVisitor(node.exprName, visitor, isEntityName),
|
|
86403
86444
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
86404
86445
|
);
|
|
86405
86446
|
},
|
|
@@ -86412,7 +86453,7 @@ var visitEachChildTable = {
|
|
|
86412
86453
|
[185 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86413
86454
|
return context.factory.updateArrayTypeNode(
|
|
86414
86455
|
node,
|
|
86415
|
-
|
|
86456
|
+
nodeVisitor(node.elementType, visitor, isTypeNode)
|
|
86416
86457
|
);
|
|
86417
86458
|
},
|
|
86418
86459
|
[186 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -86424,13 +86465,13 @@ var visitEachChildTable = {
|
|
|
86424
86465
|
[187 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86425
86466
|
return context.factory.updateOptionalTypeNode(
|
|
86426
86467
|
node,
|
|
86427
|
-
|
|
86468
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86428
86469
|
);
|
|
86429
86470
|
},
|
|
86430
86471
|
[188 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86431
86472
|
return context.factory.updateRestTypeNode(
|
|
86432
86473
|
node,
|
|
86433
|
-
|
|
86474
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86434
86475
|
);
|
|
86435
86476
|
},
|
|
86436
86477
|
[189 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -86448,22 +86489,22 @@ var visitEachChildTable = {
|
|
|
86448
86489
|
[191 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86449
86490
|
return context.factory.updateConditionalTypeNode(
|
|
86450
86491
|
node,
|
|
86451
|
-
|
|
86452
|
-
|
|
86453
|
-
|
|
86454
|
-
|
|
86492
|
+
nodeVisitor(node.checkType, visitor, isTypeNode),
|
|
86493
|
+
nodeVisitor(node.extendsType, visitor, isTypeNode),
|
|
86494
|
+
nodeVisitor(node.trueType, visitor, isTypeNode),
|
|
86495
|
+
nodeVisitor(node.falseType, visitor, isTypeNode)
|
|
86455
86496
|
);
|
|
86456
86497
|
},
|
|
86457
86498
|
[192 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86458
86499
|
return context.factory.updateInferTypeNode(
|
|
86459
86500
|
node,
|
|
86460
|
-
|
|
86501
|
+
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)
|
|
86461
86502
|
);
|
|
86462
86503
|
},
|
|
86463
86504
|
[202 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86464
86505
|
return context.factory.updateImportTypeNode(
|
|
86465
86506
|
node,
|
|
86466
|
-
|
|
86507
|
+
nodeVisitor(node.argument, visitor, isTypeNode),
|
|
86467
86508
|
nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer),
|
|
86468
86509
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
86469
86510
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
@@ -86473,45 +86514,45 @@ var visitEachChildTable = {
|
|
|
86473
86514
|
[298 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86474
86515
|
return context.factory.updateImportTypeAssertionContainer(
|
|
86475
86516
|
node,
|
|
86476
|
-
|
|
86517
|
+
nodeVisitor(node.assertClause, visitor, isAssertClause),
|
|
86477
86518
|
node.multiLine
|
|
86478
86519
|
);
|
|
86479
86520
|
},
|
|
86480
86521
|
[199 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86481
86522
|
return context.factory.updateNamedTupleMember(
|
|
86482
86523
|
node,
|
|
86483
|
-
|
|
86484
|
-
|
|
86485
|
-
|
|
86486
|
-
|
|
86524
|
+
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
86525
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86526
|
+
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86527
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86487
86528
|
);
|
|
86488
86529
|
},
|
|
86489
86530
|
[193 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86490
86531
|
return context.factory.updateParenthesizedType(
|
|
86491
86532
|
node,
|
|
86492
|
-
|
|
86533
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86493
86534
|
);
|
|
86494
86535
|
},
|
|
86495
86536
|
[195 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86496
86537
|
return context.factory.updateTypeOperatorNode(
|
|
86497
86538
|
node,
|
|
86498
|
-
|
|
86539
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86499
86540
|
);
|
|
86500
86541
|
},
|
|
86501
86542
|
[196 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86502
86543
|
return context.factory.updateIndexedAccessTypeNode(
|
|
86503
86544
|
node,
|
|
86504
|
-
|
|
86505
|
-
|
|
86545
|
+
nodeVisitor(node.objectType, visitor, isTypeNode),
|
|
86546
|
+
nodeVisitor(node.indexType, visitor, isTypeNode)
|
|
86506
86547
|
);
|
|
86507
86548
|
},
|
|
86508
86549
|
[197 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86509
86550
|
return context.factory.updateMappedTypeNode(
|
|
86510
86551
|
node,
|
|
86511
|
-
|
|
86512
|
-
|
|
86552
|
+
nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken),
|
|
86553
|
+
nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration),
|
|
86513
86554
|
nodeVisitor(node.nameType, visitor, isTypeNode),
|
|
86514
|
-
|
|
86555
|
+
nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken),
|
|
86515
86556
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86516
86557
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
86517
86558
|
);
|
|
@@ -86519,21 +86560,21 @@ var visitEachChildTable = {
|
|
|
86519
86560
|
[198 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86520
86561
|
return context.factory.updateLiteralTypeNode(
|
|
86521
86562
|
node,
|
|
86522
|
-
|
|
86563
|
+
nodeVisitor(node.literal, visitor, isExpression)
|
|
86523
86564
|
);
|
|
86524
86565
|
},
|
|
86525
86566
|
[200 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86526
86567
|
return context.factory.updateTemplateLiteralType(
|
|
86527
86568
|
node,
|
|
86528
|
-
|
|
86569
|
+
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
86529
86570
|
nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan)
|
|
86530
86571
|
);
|
|
86531
86572
|
},
|
|
86532
86573
|
[201 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86533
86574
|
return context.factory.updateTemplateLiteralTypeSpan(
|
|
86534
86575
|
node,
|
|
86535
|
-
|
|
86536
|
-
|
|
86576
|
+
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86577
|
+
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
86537
86578
|
);
|
|
86538
86579
|
},
|
|
86539
86580
|
// Binding patterns
|
|
@@ -86552,9 +86593,9 @@ var visitEachChildTable = {
|
|
|
86552
86593
|
[205 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86553
86594
|
return context.factory.updateBindingElement(
|
|
86554
86595
|
node,
|
|
86555
|
-
|
|
86596
|
+
nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken),
|
|
86556
86597
|
nodeVisitor(node.propertyName, visitor, isPropertyName),
|
|
86557
|
-
|
|
86598
|
+
nodeVisitor(node.name, visitor, isBindingName),
|
|
86558
86599
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86559
86600
|
);
|
|
86560
86601
|
},
|
|
@@ -86574,37 +86615,37 @@ var visitEachChildTable = {
|
|
|
86574
86615
|
[208 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86575
86616
|
return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain(
|
|
86576
86617
|
node,
|
|
86577
|
-
|
|
86578
|
-
|
|
86579
|
-
|
|
86618
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86619
|
+
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
86620
|
+
nodeVisitor(node.name, visitor, isMemberName)
|
|
86580
86621
|
) : context.factory.updatePropertyAccessExpression(
|
|
86581
86622
|
node,
|
|
86582
|
-
|
|
86583
|
-
|
|
86623
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86624
|
+
nodeVisitor(node.name, visitor, isMemberName)
|
|
86584
86625
|
);
|
|
86585
86626
|
},
|
|
86586
86627
|
[209 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86587
86628
|
return isElementAccessChain(node) ? context.factory.updateElementAccessChain(
|
|
86588
86629
|
node,
|
|
86589
|
-
|
|
86590
|
-
|
|
86591
|
-
|
|
86630
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86631
|
+
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
86632
|
+
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
86592
86633
|
) : context.factory.updateElementAccessExpression(
|
|
86593
86634
|
node,
|
|
86594
|
-
|
|
86595
|
-
|
|
86635
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86636
|
+
nodeVisitor(node.argumentExpression, visitor, isExpression)
|
|
86596
86637
|
);
|
|
86597
86638
|
},
|
|
86598
86639
|
[210 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86599
86640
|
return isCallChain(node) ? context.factory.updateCallChain(
|
|
86600
86641
|
node,
|
|
86601
|
-
|
|
86602
|
-
|
|
86642
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86643
|
+
nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken),
|
|
86603
86644
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86604
86645
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
86605
86646
|
) : context.factory.updateCallExpression(
|
|
86606
86647
|
node,
|
|
86607
|
-
|
|
86648
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86608
86649
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86609
86650
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
86610
86651
|
);
|
|
@@ -86612,7 +86653,7 @@ var visitEachChildTable = {
|
|
|
86612
86653
|
[211 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86613
86654
|
return context.factory.updateNewExpression(
|
|
86614
86655
|
node,
|
|
86615
|
-
|
|
86656
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86616
86657
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86617
86658
|
nodesVisitor(node.arguments, visitor, isExpression)
|
|
86618
86659
|
);
|
|
@@ -86620,29 +86661,29 @@ var visitEachChildTable = {
|
|
|
86620
86661
|
[212 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86621
86662
|
return context.factory.updateTaggedTemplateExpression(
|
|
86622
86663
|
node,
|
|
86623
|
-
|
|
86664
|
+
nodeVisitor(node.tag, visitor, isExpression),
|
|
86624
86665
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
86625
|
-
|
|
86666
|
+
nodeVisitor(node.template, visitor, isTemplateLiteral)
|
|
86626
86667
|
);
|
|
86627
86668
|
},
|
|
86628
86669
|
[213 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86629
86670
|
return context.factory.updateTypeAssertion(
|
|
86630
86671
|
node,
|
|
86631
|
-
|
|
86632
|
-
|
|
86672
|
+
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86673
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86633
86674
|
);
|
|
86634
86675
|
},
|
|
86635
86676
|
[214 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86636
86677
|
return context.factory.updateParenthesizedExpression(
|
|
86637
86678
|
node,
|
|
86638
|
-
|
|
86679
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86639
86680
|
);
|
|
86640
86681
|
},
|
|
86641
86682
|
[215 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86642
86683
|
return context.factory.updateFunctionExpression(
|
|
86643
86684
|
node,
|
|
86644
86685
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86645
|
-
|
|
86686
|
+
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86646
86687
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86647
86688
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86648
86689
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -86657,82 +86698,82 @@ var visitEachChildTable = {
|
|
|
86657
86698
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86658
86699
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
86659
86700
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86660
|
-
|
|
86701
|
+
nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken),
|
|
86661
86702
|
visitFunctionBody(node.body, visitor, context, nodeVisitor)
|
|
86662
86703
|
);
|
|
86663
86704
|
},
|
|
86664
86705
|
[217 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86665
86706
|
return context.factory.updateDeleteExpression(
|
|
86666
86707
|
node,
|
|
86667
|
-
|
|
86708
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86668
86709
|
);
|
|
86669
86710
|
},
|
|
86670
86711
|
[218 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86671
86712
|
return context.factory.updateTypeOfExpression(
|
|
86672
86713
|
node,
|
|
86673
|
-
|
|
86714
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86674
86715
|
);
|
|
86675
86716
|
},
|
|
86676
86717
|
[219 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86677
86718
|
return context.factory.updateVoidExpression(
|
|
86678
86719
|
node,
|
|
86679
|
-
|
|
86720
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86680
86721
|
);
|
|
86681
86722
|
},
|
|
86682
86723
|
[220 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86683
86724
|
return context.factory.updateAwaitExpression(
|
|
86684
86725
|
node,
|
|
86685
|
-
|
|
86726
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86686
86727
|
);
|
|
86687
86728
|
},
|
|
86688
86729
|
[221 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86689
86730
|
return context.factory.updatePrefixUnaryExpression(
|
|
86690
86731
|
node,
|
|
86691
|
-
|
|
86732
|
+
nodeVisitor(node.operand, visitor, isExpression)
|
|
86692
86733
|
);
|
|
86693
86734
|
},
|
|
86694
86735
|
[222 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86695
86736
|
return context.factory.updatePostfixUnaryExpression(
|
|
86696
86737
|
node,
|
|
86697
|
-
|
|
86738
|
+
nodeVisitor(node.operand, visitor, isExpression)
|
|
86698
86739
|
);
|
|
86699
86740
|
},
|
|
86700
86741
|
[223 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86701
86742
|
return context.factory.updateBinaryExpression(
|
|
86702
86743
|
node,
|
|
86703
|
-
|
|
86704
|
-
|
|
86705
|
-
|
|
86744
|
+
nodeVisitor(node.left, visitor, isExpression),
|
|
86745
|
+
nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken),
|
|
86746
|
+
nodeVisitor(node.right, visitor, isExpression)
|
|
86706
86747
|
);
|
|
86707
86748
|
},
|
|
86708
86749
|
[224 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86709
86750
|
return context.factory.updateConditionalExpression(
|
|
86710
86751
|
node,
|
|
86711
|
-
|
|
86712
|
-
|
|
86713
|
-
|
|
86714
|
-
|
|
86715
|
-
|
|
86752
|
+
nodeVisitor(node.condition, visitor, isExpression),
|
|
86753
|
+
nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken),
|
|
86754
|
+
nodeVisitor(node.whenTrue, visitor, isExpression),
|
|
86755
|
+
nodeVisitor(node.colonToken, tokenVisitor, isColonToken),
|
|
86756
|
+
nodeVisitor(node.whenFalse, visitor, isExpression)
|
|
86716
86757
|
);
|
|
86717
86758
|
},
|
|
86718
86759
|
[225 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86719
86760
|
return context.factory.updateTemplateExpression(
|
|
86720
86761
|
node,
|
|
86721
|
-
|
|
86762
|
+
nodeVisitor(node.head, visitor, isTemplateHead),
|
|
86722
86763
|
nodesVisitor(node.templateSpans, visitor, isTemplateSpan)
|
|
86723
86764
|
);
|
|
86724
86765
|
},
|
|
86725
86766
|
[226 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86726
86767
|
return context.factory.updateYieldExpression(
|
|
86727
86768
|
node,
|
|
86728
|
-
|
|
86769
|
+
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86729
86770
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
86730
86771
|
);
|
|
86731
86772
|
},
|
|
86732
86773
|
[227 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86733
86774
|
return context.factory.updateSpreadElement(
|
|
86734
86775
|
node,
|
|
86735
|
-
|
|
86776
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86736
86777
|
);
|
|
86737
86778
|
},
|
|
86738
86779
|
[228 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -86748,45 +86789,45 @@ var visitEachChildTable = {
|
|
|
86748
86789
|
[230 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86749
86790
|
return context.factory.updateExpressionWithTypeArguments(
|
|
86750
86791
|
node,
|
|
86751
|
-
|
|
86792
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86752
86793
|
nodesVisitor(node.typeArguments, visitor, isTypeNode)
|
|
86753
86794
|
);
|
|
86754
86795
|
},
|
|
86755
86796
|
[231 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86756
86797
|
return context.factory.updateAsExpression(
|
|
86757
86798
|
node,
|
|
86758
|
-
|
|
86759
|
-
|
|
86799
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86800
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86760
86801
|
);
|
|
86761
86802
|
},
|
|
86762
86803
|
[235 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86763
86804
|
return context.factory.updateSatisfiesExpression(
|
|
86764
86805
|
node,
|
|
86765
|
-
|
|
86766
|
-
|
|
86806
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86807
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86767
86808
|
);
|
|
86768
86809
|
},
|
|
86769
86810
|
[232 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86770
86811
|
return isOptionalChain(node) ? context.factory.updateNonNullChain(
|
|
86771
86812
|
node,
|
|
86772
|
-
|
|
86813
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86773
86814
|
) : context.factory.updateNonNullExpression(
|
|
86774
86815
|
node,
|
|
86775
|
-
|
|
86816
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86776
86817
|
);
|
|
86777
86818
|
},
|
|
86778
86819
|
[233 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86779
86820
|
return context.factory.updateMetaProperty(
|
|
86780
86821
|
node,
|
|
86781
|
-
|
|
86822
|
+
nodeVisitor(node.name, visitor, isIdentifier)
|
|
86782
86823
|
);
|
|
86783
86824
|
},
|
|
86784
86825
|
// Misc
|
|
86785
86826
|
[236 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86786
86827
|
return context.factory.updateTemplateSpan(
|
|
86787
86828
|
node,
|
|
86788
|
-
|
|
86789
|
-
|
|
86829
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86830
|
+
nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)
|
|
86790
86831
|
);
|
|
86791
86832
|
},
|
|
86792
86833
|
// Element
|
|
@@ -86800,20 +86841,20 @@ var visitEachChildTable = {
|
|
|
86800
86841
|
return context.factory.updateVariableStatement(
|
|
86801
86842
|
node,
|
|
86802
86843
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86803
|
-
|
|
86844
|
+
nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)
|
|
86804
86845
|
);
|
|
86805
86846
|
},
|
|
86806
86847
|
[241 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86807
86848
|
return context.factory.updateExpressionStatement(
|
|
86808
86849
|
node,
|
|
86809
|
-
|
|
86850
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86810
86851
|
);
|
|
86811
86852
|
},
|
|
86812
86853
|
[242 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86813
86854
|
return context.factory.updateIfStatement(
|
|
86814
86855
|
node,
|
|
86815
|
-
|
|
86816
|
-
|
|
86856
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86857
|
+
nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock),
|
|
86817
86858
|
nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock)
|
|
86818
86859
|
);
|
|
86819
86860
|
},
|
|
@@ -86821,13 +86862,13 @@ var visitEachChildTable = {
|
|
|
86821
86862
|
return context.factory.updateDoStatement(
|
|
86822
86863
|
node,
|
|
86823
86864
|
visitIterationBody(node.statement, visitor, context, nodeVisitor),
|
|
86824
|
-
|
|
86865
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86825
86866
|
);
|
|
86826
86867
|
},
|
|
86827
86868
|
[244 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86828
86869
|
return context.factory.updateWhileStatement(
|
|
86829
86870
|
node,
|
|
86830
|
-
|
|
86871
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86831
86872
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
86832
86873
|
);
|
|
86833
86874
|
},
|
|
@@ -86843,17 +86884,17 @@ var visitEachChildTable = {
|
|
|
86843
86884
|
[246 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86844
86885
|
return context.factory.updateForInStatement(
|
|
86845
86886
|
node,
|
|
86846
|
-
|
|
86847
|
-
|
|
86887
|
+
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
86888
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86848
86889
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
86849
86890
|
);
|
|
86850
86891
|
},
|
|
86851
86892
|
[247 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86852
86893
|
return context.factory.updateForOfStatement(
|
|
86853
86894
|
node,
|
|
86854
|
-
|
|
86855
|
-
|
|
86856
|
-
|
|
86895
|
+
nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword),
|
|
86896
|
+
nodeVisitor(node.initializer, visitor, isForInitializer),
|
|
86897
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86857
86898
|
visitIterationBody(node.statement, visitor, context, nodeVisitor)
|
|
86858
86899
|
);
|
|
86859
86900
|
},
|
|
@@ -86878,34 +86919,34 @@ var visitEachChildTable = {
|
|
|
86878
86919
|
[251 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86879
86920
|
return context.factory.updateWithStatement(
|
|
86880
86921
|
node,
|
|
86881
|
-
|
|
86882
|
-
|
|
86922
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86923
|
+
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
86883
86924
|
);
|
|
86884
86925
|
},
|
|
86885
86926
|
[252 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86886
86927
|
return context.factory.updateSwitchStatement(
|
|
86887
86928
|
node,
|
|
86888
|
-
|
|
86889
|
-
|
|
86929
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
86930
|
+
nodeVisitor(node.caseBlock, visitor, isCaseBlock)
|
|
86890
86931
|
);
|
|
86891
86932
|
},
|
|
86892
86933
|
[253 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86893
86934
|
return context.factory.updateLabeledStatement(
|
|
86894
86935
|
node,
|
|
86895
|
-
|
|
86896
|
-
|
|
86936
|
+
nodeVisitor(node.label, visitor, isIdentifier),
|
|
86937
|
+
nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)
|
|
86897
86938
|
);
|
|
86898
86939
|
},
|
|
86899
86940
|
[254 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86900
86941
|
return context.factory.updateThrowStatement(
|
|
86901
86942
|
node,
|
|
86902
|
-
|
|
86943
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
86903
86944
|
);
|
|
86904
86945
|
},
|
|
86905
86946
|
[255 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86906
86947
|
return context.factory.updateTryStatement(
|
|
86907
86948
|
node,
|
|
86908
|
-
|
|
86949
|
+
nodeVisitor(node.tryBlock, visitor, isBlock),
|
|
86909
86950
|
nodeVisitor(node.catchClause, visitor, isCatchClause),
|
|
86910
86951
|
nodeVisitor(node.finallyBlock, visitor, isBlock)
|
|
86911
86952
|
);
|
|
@@ -86913,8 +86954,8 @@ var visitEachChildTable = {
|
|
|
86913
86954
|
[257 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
86914
86955
|
return context.factory.updateVariableDeclaration(
|
|
86915
86956
|
node,
|
|
86916
|
-
|
|
86917
|
-
|
|
86957
|
+
nodeVisitor(node.name, visitor, isBindingName),
|
|
86958
|
+
nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken),
|
|
86918
86959
|
nodeVisitor(node.type, visitor, isTypeNode),
|
|
86919
86960
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
86920
86961
|
);
|
|
@@ -86929,7 +86970,7 @@ var visitEachChildTable = {
|
|
|
86929
86970
|
return context.factory.updateFunctionDeclaration(
|
|
86930
86971
|
node,
|
|
86931
86972
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86932
|
-
|
|
86973
|
+
nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken),
|
|
86933
86974
|
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86934
86975
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86935
86976
|
visitParameterList(node.parameters, visitor, context, nodesVisitor),
|
|
@@ -86951,7 +86992,7 @@ var visitEachChildTable = {
|
|
|
86951
86992
|
return context.factory.updateInterfaceDeclaration(
|
|
86952
86993
|
node,
|
|
86953
86994
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86954
|
-
|
|
86995
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86955
86996
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86956
86997
|
nodesVisitor(node.heritageClauses, visitor, isHeritageClause),
|
|
86957
86998
|
nodesVisitor(node.members, visitor, isTypeElement)
|
|
@@ -86961,16 +87002,16 @@ var visitEachChildTable = {
|
|
|
86961
87002
|
return context.factory.updateTypeAliasDeclaration(
|
|
86962
87003
|
node,
|
|
86963
87004
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86964
|
-
|
|
87005
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86965
87006
|
nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration),
|
|
86966
|
-
|
|
87007
|
+
nodeVisitor(node.type, visitor, isTypeNode)
|
|
86967
87008
|
);
|
|
86968
87009
|
},
|
|
86969
87010
|
[263 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86970
87011
|
return context.factory.updateEnumDeclaration(
|
|
86971
87012
|
node,
|
|
86972
87013
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86973
|
-
|
|
87014
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
86974
87015
|
nodesVisitor(node.members, visitor, isEnumMember)
|
|
86975
87016
|
);
|
|
86976
87017
|
},
|
|
@@ -86978,7 +87019,7 @@ var visitEachChildTable = {
|
|
|
86978
87019
|
return context.factory.updateModuleDeclaration(
|
|
86979
87020
|
node,
|
|
86980
87021
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
86981
|
-
|
|
87022
|
+
nodeVisitor(node.name, visitor, isModuleName),
|
|
86982
87023
|
nodeVisitor(node.body, visitor, isModuleBody)
|
|
86983
87024
|
);
|
|
86984
87025
|
},
|
|
@@ -86997,7 +87038,7 @@ var visitEachChildTable = {
|
|
|
86997
87038
|
[267 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86998
87039
|
return context.factory.updateNamespaceExportDeclaration(
|
|
86999
87040
|
node,
|
|
87000
|
-
|
|
87041
|
+
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87001
87042
|
);
|
|
87002
87043
|
},
|
|
87003
87044
|
[268 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87005,8 +87046,8 @@ var visitEachChildTable = {
|
|
|
87005
87046
|
node,
|
|
87006
87047
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87007
87048
|
node.isTypeOnly,
|
|
87008
|
-
|
|
87009
|
-
|
|
87049
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87050
|
+
nodeVisitor(node.moduleReference, visitor, isModuleReference)
|
|
87010
87051
|
);
|
|
87011
87052
|
},
|
|
87012
87053
|
[269 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87014,7 +87055,7 @@ var visitEachChildTable = {
|
|
|
87014
87055
|
node,
|
|
87015
87056
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87016
87057
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
87017
|
-
|
|
87058
|
+
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
87018
87059
|
nodeVisitor(node.assertClause, visitor, isAssertClause)
|
|
87019
87060
|
);
|
|
87020
87061
|
},
|
|
@@ -87028,8 +87069,8 @@ var visitEachChildTable = {
|
|
|
87028
87069
|
[297 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87029
87070
|
return context.factory.updateAssertEntry(
|
|
87030
87071
|
node,
|
|
87031
|
-
|
|
87032
|
-
|
|
87072
|
+
nodeVisitor(node.name, visitor, isAssertionKey),
|
|
87073
|
+
nodeVisitor(node.value, visitor, isExpression)
|
|
87033
87074
|
);
|
|
87034
87075
|
},
|
|
87035
87076
|
[270 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87043,13 +87084,13 @@ var visitEachChildTable = {
|
|
|
87043
87084
|
[271 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87044
87085
|
return context.factory.updateNamespaceImport(
|
|
87045
87086
|
node,
|
|
87046
|
-
|
|
87087
|
+
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87047
87088
|
);
|
|
87048
87089
|
},
|
|
87049
87090
|
[277 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87050
87091
|
return context.factory.updateNamespaceExport(
|
|
87051
87092
|
node,
|
|
87052
|
-
|
|
87093
|
+
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87053
87094
|
);
|
|
87054
87095
|
},
|
|
87055
87096
|
[272 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -87063,14 +87104,14 @@ var visitEachChildTable = {
|
|
|
87063
87104
|
node,
|
|
87064
87105
|
node.isTypeOnly,
|
|
87065
87106
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
87066
|
-
|
|
87107
|
+
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87067
87108
|
);
|
|
87068
87109
|
},
|
|
87069
87110
|
[274 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87070
87111
|
return context.factory.updateExportAssignment(
|
|
87071
87112
|
node,
|
|
87072
87113
|
nodesVisitor(node.modifiers, visitor, isModifier),
|
|
87073
|
-
|
|
87114
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
87074
87115
|
);
|
|
87075
87116
|
},
|
|
87076
87117
|
[275 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -87094,59 +87135,59 @@ var visitEachChildTable = {
|
|
|
87094
87135
|
node,
|
|
87095
87136
|
node.isTypeOnly,
|
|
87096
87137
|
nodeVisitor(node.propertyName, visitor, isIdentifier),
|
|
87097
|
-
|
|
87138
|
+
nodeVisitor(node.name, visitor, isIdentifier)
|
|
87098
87139
|
);
|
|
87099
87140
|
},
|
|
87100
87141
|
// Module references
|
|
87101
87142
|
[280 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87102
87143
|
return context.factory.updateExternalModuleReference(
|
|
87103
87144
|
node,
|
|
87104
|
-
|
|
87145
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
87105
87146
|
);
|
|
87106
87147
|
},
|
|
87107
87148
|
// JSX
|
|
87108
87149
|
[281 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87109
87150
|
return context.factory.updateJsxElement(
|
|
87110
87151
|
node,
|
|
87111
|
-
|
|
87152
|
+
nodeVisitor(node.openingElement, visitor, isJsxOpeningElement),
|
|
87112
87153
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
87113
|
-
|
|
87154
|
+
nodeVisitor(node.closingElement, visitor, isJsxClosingElement)
|
|
87114
87155
|
);
|
|
87115
87156
|
},
|
|
87116
87157
|
[282 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87117
87158
|
return context.factory.updateJsxSelfClosingElement(
|
|
87118
87159
|
node,
|
|
87119
|
-
|
|
87160
|
+
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
87120
87161
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
87121
|
-
|
|
87162
|
+
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
87122
87163
|
);
|
|
87123
87164
|
},
|
|
87124
87165
|
[283 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87125
87166
|
return context.factory.updateJsxOpeningElement(
|
|
87126
87167
|
node,
|
|
87127
|
-
|
|
87168
|
+
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression),
|
|
87128
87169
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
87129
|
-
|
|
87170
|
+
nodeVisitor(node.attributes, visitor, isJsxAttributes)
|
|
87130
87171
|
);
|
|
87131
87172
|
},
|
|
87132
87173
|
[284 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87133
87174
|
return context.factory.updateJsxClosingElement(
|
|
87134
87175
|
node,
|
|
87135
|
-
|
|
87176
|
+
nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)
|
|
87136
87177
|
);
|
|
87137
87178
|
},
|
|
87138
87179
|
[285 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87139
87180
|
return context.factory.updateJsxFragment(
|
|
87140
87181
|
node,
|
|
87141
|
-
|
|
87182
|
+
nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment),
|
|
87142
87183
|
nodesVisitor(node.children, visitor, isJsxChild),
|
|
87143
|
-
|
|
87184
|
+
nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)
|
|
87144
87185
|
);
|
|
87145
87186
|
},
|
|
87146
87187
|
[288 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87147
87188
|
return context.factory.updateJsxAttribute(
|
|
87148
87189
|
node,
|
|
87149
|
-
|
|
87190
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87150
87191
|
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression)
|
|
87151
87192
|
);
|
|
87152
87193
|
},
|
|
@@ -87159,20 +87200,20 @@ var visitEachChildTable = {
|
|
|
87159
87200
|
[290 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87160
87201
|
return context.factory.updateJsxSpreadAttribute(
|
|
87161
87202
|
node,
|
|
87162
|
-
|
|
87203
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
87163
87204
|
);
|
|
87164
87205
|
},
|
|
87165
87206
|
[291 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87166
87207
|
return context.factory.updateJsxExpression(
|
|
87167
87208
|
node,
|
|
87168
|
-
|
|
87209
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
87169
87210
|
);
|
|
87170
87211
|
},
|
|
87171
87212
|
// Clauses
|
|
87172
87213
|
[292 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87173
87214
|
return context.factory.updateCaseClause(
|
|
87174
87215
|
node,
|
|
87175
|
-
|
|
87216
|
+
nodeVisitor(node.expression, visitor, isExpression),
|
|
87176
87217
|
nodesVisitor(node.statements, visitor, isStatement)
|
|
87177
87218
|
);
|
|
87178
87219
|
},
|
|
@@ -87192,35 +87233,35 @@ var visitEachChildTable = {
|
|
|
87192
87233
|
return context.factory.updateCatchClause(
|
|
87193
87234
|
node,
|
|
87194
87235
|
nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration),
|
|
87195
|
-
|
|
87236
|
+
nodeVisitor(node.block, visitor, isBlock)
|
|
87196
87237
|
);
|
|
87197
87238
|
},
|
|
87198
87239
|
// Property assignments
|
|
87199
87240
|
[299 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87200
87241
|
return context.factory.updatePropertyAssignment(
|
|
87201
87242
|
node,
|
|
87202
|
-
|
|
87203
|
-
|
|
87243
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
87244
|
+
nodeVisitor(node.initializer, visitor, isExpression)
|
|
87204
87245
|
);
|
|
87205
87246
|
},
|
|
87206
87247
|
[300 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87207
87248
|
return context.factory.updateShorthandPropertyAssignment(
|
|
87208
87249
|
node,
|
|
87209
|
-
|
|
87250
|
+
nodeVisitor(node.name, visitor, isIdentifier),
|
|
87210
87251
|
nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression)
|
|
87211
87252
|
);
|
|
87212
87253
|
},
|
|
87213
87254
|
[301 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87214
87255
|
return context.factory.updateSpreadAssignment(
|
|
87215
87256
|
node,
|
|
87216
|
-
|
|
87257
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
87217
87258
|
);
|
|
87218
87259
|
},
|
|
87219
87260
|
// Enum
|
|
87220
87261
|
[302 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87221
87262
|
return context.factory.updateEnumMember(
|
|
87222
87263
|
node,
|
|
87223
|
-
|
|
87264
|
+
nodeVisitor(node.name, visitor, isPropertyName),
|
|
87224
87265
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
87225
87266
|
);
|
|
87226
87267
|
},
|
|
@@ -87232,13 +87273,13 @@ var visitEachChildTable = {
|
|
|
87232
87273
|
);
|
|
87233
87274
|
},
|
|
87234
87275
|
// Transformation nodes
|
|
87235
|
-
[
|
|
87276
|
+
[356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87236
87277
|
return context.factory.updatePartiallyEmittedExpression(
|
|
87237
87278
|
node,
|
|
87238
|
-
|
|
87279
|
+
nodeVisitor(node.expression, visitor, isExpression)
|
|
87239
87280
|
);
|
|
87240
87281
|
},
|
|
87241
|
-
[
|
|
87282
|
+
[357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
87242
87283
|
return context.factory.updateCommaListExpression(
|
|
87243
87284
|
node,
|
|
87244
87285
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -88187,7 +88228,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
88187
88228
|
location = node = value;
|
|
88188
88229
|
value = node.right;
|
|
88189
88230
|
} else {
|
|
88190
|
-
return
|
|
88231
|
+
return visitNode(value, visitor, isExpression);
|
|
88191
88232
|
}
|
|
88192
88233
|
}
|
|
88193
88234
|
}
|
|
@@ -88206,7 +88247,6 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
88206
88247
|
};
|
|
88207
88248
|
if (value) {
|
|
88208
88249
|
value = visitNode(value, visitor, isExpression);
|
|
88209
|
-
Debug.assert(value);
|
|
88210
88250
|
if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
88211
88251
|
value = ensureIdentifier(
|
|
88212
88252
|
flattenContext,
|
|
@@ -88248,7 +88288,7 @@ function flattenDestructuringAssignment(node, visitor, context, level, needsValu
|
|
|
88248
88288
|
function emitBindingOrAssignment(target, value2, location2, original) {
|
|
88249
88289
|
Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression);
|
|
88250
88290
|
const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange(
|
|
88251
|
-
context.factory.createAssignment(
|
|
88291
|
+
context.factory.createAssignment(visitNode(target, visitor, isExpression), value2),
|
|
88252
88292
|
location2
|
|
88253
88293
|
);
|
|
88254
88294
|
expression.original = original;
|
|
@@ -88305,7 +88345,7 @@ function flattenDestructuringBinding(node, visitor, context, level, rval, hoistT
|
|
|
88305
88345
|
if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) {
|
|
88306
88346
|
initializer = ensureIdentifier(
|
|
88307
88347
|
flattenContext,
|
|
88308
|
-
|
|
88348
|
+
visitNode(initializer, flattenContext.visitor),
|
|
88309
88349
|
/*reuseIdentifierExpressions*/
|
|
88310
88350
|
false,
|
|
88311
88351
|
initializer
|
|
@@ -88426,7 +88466,7 @@ function flattenObjectBindingOrAssignmentPattern(flattenContext, parent2, patter
|
|
|
88426
88466
|
if (!getRestIndicatorOfBindingOrAssignmentElement(element)) {
|
|
88427
88467
|
const propertyName = getPropertyNameOfBindingOrAssignmentElement(element);
|
|
88428
88468
|
if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) {
|
|
88429
|
-
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor
|
|
88469
|
+
bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor));
|
|
88430
88470
|
} else {
|
|
88431
88471
|
if (bindingElements) {
|
|
88432
88472
|
flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern);
|
|
@@ -88564,7 +88604,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
|
|
|
88564
88604
|
if (isComputedPropertyName(propertyName)) {
|
|
88565
88605
|
const argumentExpression = ensureIdentifier(
|
|
88566
88606
|
flattenContext,
|
|
88567
|
-
|
|
88607
|
+
visitNode(propertyName.expression, flattenContext.visitor),
|
|
88568
88608
|
/*reuseIdentifierExpressions*/
|
|
88569
88609
|
false,
|
|
88570
88610
|
/*location*/
|
|
@@ -88607,7 +88647,6 @@ function makeArrayBindingPattern(factory2, elements) {
|
|
|
88607
88647
|
return factory2.createArrayBindingPattern(elements);
|
|
88608
88648
|
}
|
|
88609
88649
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
88610
|
-
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
88611
88650
|
return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
88612
88651
|
}
|
|
88613
88652
|
function makeObjectBindingPattern(factory2, elements) {
|
|
@@ -88615,7 +88654,6 @@ function makeObjectBindingPattern(factory2, elements) {
|
|
|
88615
88654
|
return factory2.createObjectBindingPattern(elements);
|
|
88616
88655
|
}
|
|
88617
88656
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
88618
|
-
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
88619
88657
|
return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
88620
88658
|
}
|
|
88621
88659
|
function makeBindingElement(factory2, name) {
|
|
@@ -88639,7 +88677,6 @@ var ProcessLevel = /* @__PURE__ */ ((ProcessLevel2) => {
|
|
|
88639
88677
|
})(ProcessLevel || {});
|
|
88640
88678
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
88641
88679
|
const tag = visitNode(node.tag, visitor, isExpression);
|
|
88642
|
-
Debug.assert(tag);
|
|
88643
88680
|
const templateArguments = [void 0];
|
|
88644
88681
|
const cookedStrings = [];
|
|
88645
88682
|
const rawStrings = [];
|
|
@@ -88656,7 +88693,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
|
|
|
88656
88693
|
for (const templateSpan of template.templateSpans) {
|
|
88657
88694
|
cookedStrings.push(createTemplateCooked(templateSpan.literal));
|
|
88658
88695
|
rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
|
|
88659
|
-
templateArguments.push(
|
|
88696
|
+
templateArguments.push(visitNode(templateSpan.expression, visitor, isExpression));
|
|
88660
88697
|
}
|
|
88661
88698
|
}
|
|
88662
88699
|
const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
|
|
@@ -89029,7 +89066,7 @@ function transformTypeScript(context) {
|
|
|
89029
89066
|
function visitObjectLiteralExpression(node) {
|
|
89030
89067
|
return factory2.updateObjectLiteralExpression(
|
|
89031
89068
|
node,
|
|
89032
|
-
visitNodes2(node.properties, getObjectLiteralElementVisitor(node),
|
|
89069
|
+
visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElement)
|
|
89033
89070
|
);
|
|
89034
89071
|
}
|
|
89035
89072
|
function getClassFacts(node, staticProperties) {
|
|
@@ -89227,7 +89264,6 @@ function transformTypeScript(context) {
|
|
|
89227
89264
|
const decorators = [];
|
|
89228
89265
|
for (const parameterDecorator of parameterDecorators) {
|
|
89229
89266
|
const expression = visitNode(parameterDecorator.expression, visitor, isExpression);
|
|
89230
|
-
Debug.assert(expression);
|
|
89231
89267
|
const helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
89232
89268
|
setTextRange(helper, parameterDecorator.expression);
|
|
89233
89269
|
setEmitFlags(helper, 3072 /* NoComments */);
|
|
@@ -89351,7 +89387,6 @@ function transformTypeScript(context) {
|
|
|
89351
89387
|
const name = member.name;
|
|
89352
89388
|
if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member))) {
|
|
89353
89389
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
89354
|
-
Debug.assert(expression);
|
|
89355
89390
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
89356
89391
|
if (!isSimpleInlineableExpression(innerExpression)) {
|
|
89357
89392
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
@@ -89359,7 +89394,7 @@ function transformTypeScript(context) {
|
|
|
89359
89394
|
return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression));
|
|
89360
89395
|
}
|
|
89361
89396
|
}
|
|
89362
|
-
return
|
|
89397
|
+
return visitNode(name, visitor, isPropertyName);
|
|
89363
89398
|
}
|
|
89364
89399
|
function visitHeritageClause(node) {
|
|
89365
89400
|
if (node.token === 117 /* ImplementsKeyword */) {
|
|
@@ -89370,7 +89405,7 @@ function transformTypeScript(context) {
|
|
|
89370
89405
|
function visitExpressionWithTypeArguments(node) {
|
|
89371
89406
|
return factory2.updateExpressionWithTypeArguments(
|
|
89372
89407
|
node,
|
|
89373
|
-
|
|
89408
|
+
visitNode(node.expression, visitor, isLeftHandSideExpression),
|
|
89374
89409
|
/*typeArguments*/
|
|
89375
89410
|
void 0
|
|
89376
89411
|
);
|
|
@@ -89389,7 +89424,7 @@ function transformTypeScript(context) {
|
|
|
89389
89424
|
return factory2.updatePropertyDeclaration(
|
|
89390
89425
|
node,
|
|
89391
89426
|
concatenate(decorators, factory2.createModifiersFromModifierFlags(2 /* Ambient */)),
|
|
89392
|
-
|
|
89427
|
+
visitNode(node.name, visitor, isPropertyName),
|
|
89393
89428
|
/*questionOrExclamationToken*/
|
|
89394
89429
|
void 0,
|
|
89395
89430
|
/*type*/
|
|
@@ -89406,7 +89441,7 @@ function transformTypeScript(context) {
|
|
|
89406
89441
|
void 0,
|
|
89407
89442
|
/*type*/
|
|
89408
89443
|
void 0,
|
|
89409
|
-
visitNode(node.initializer, visitor
|
|
89444
|
+
visitNode(node.initializer, visitor)
|
|
89410
89445
|
);
|
|
89411
89446
|
}
|
|
89412
89447
|
function visitConstructor(node) {
|
|
@@ -89625,7 +89660,7 @@ function transformTypeScript(context) {
|
|
|
89625
89660
|
elideNodes(factory2, node.modifiers),
|
|
89626
89661
|
// preserve positions, if available
|
|
89627
89662
|
node.dotDotDotToken,
|
|
89628
|
-
|
|
89663
|
+
visitNode(node.name, visitor, isBindingName),
|
|
89629
89664
|
/*questionToken*/
|
|
89630
89665
|
void 0,
|
|
89631
89666
|
/*type*/
|
|
@@ -89674,7 +89709,7 @@ function transformTypeScript(context) {
|
|
|
89674
89709
|
return setTextRange(
|
|
89675
89710
|
factory2.createAssignment(
|
|
89676
89711
|
getNamespaceMemberNameWithSourceMapsAndWithoutComments(name),
|
|
89677
|
-
|
|
89712
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
89678
89713
|
),
|
|
89679
89714
|
/*location*/
|
|
89680
89715
|
node
|
|
@@ -89684,7 +89719,7 @@ function transformTypeScript(context) {
|
|
|
89684
89719
|
function visitVariableDeclaration(node) {
|
|
89685
89720
|
const updated = factory2.updateVariableDeclaration(
|
|
89686
89721
|
node,
|
|
89687
|
-
|
|
89722
|
+
visitNode(node.name, visitor, isBindingName),
|
|
89688
89723
|
/*exclamationToken*/
|
|
89689
89724
|
void 0,
|
|
89690
89725
|
/*type*/
|
|
@@ -89700,30 +89735,26 @@ function transformTypeScript(context) {
|
|
|
89700
89735
|
const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
|
|
89701
89736
|
if (isAssertionExpression(innerExpression)) {
|
|
89702
89737
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
89703
|
-
Debug.assert(expression);
|
|
89704
89738
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89705
89739
|
}
|
|
89706
89740
|
return visitEachChild(node, visitor, context);
|
|
89707
89741
|
}
|
|
89708
89742
|
function visitAssertionExpression(node) {
|
|
89709
89743
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
89710
|
-
Debug.assert(expression);
|
|
89711
89744
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89712
89745
|
}
|
|
89713
89746
|
function visitNonNullExpression(node) {
|
|
89714
89747
|
const expression = visitNode(node.expression, visitor, isLeftHandSideExpression);
|
|
89715
|
-
Debug.assert(expression);
|
|
89716
89748
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89717
89749
|
}
|
|
89718
89750
|
function visitSatisfiesExpression(node) {
|
|
89719
89751
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
89720
|
-
Debug.assert(expression);
|
|
89721
89752
|
return factory2.createPartiallyEmittedExpression(expression, node);
|
|
89722
89753
|
}
|
|
89723
89754
|
function visitCallExpression(node) {
|
|
89724
89755
|
return factory2.updateCallExpression(
|
|
89725
89756
|
node,
|
|
89726
|
-
|
|
89757
|
+
visitNode(node.expression, visitor, isExpression),
|
|
89727
89758
|
/*typeArguments*/
|
|
89728
89759
|
void 0,
|
|
89729
89760
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -89732,7 +89763,7 @@ function transformTypeScript(context) {
|
|
|
89732
89763
|
function visitNewExpression(node) {
|
|
89733
89764
|
return factory2.updateNewExpression(
|
|
89734
89765
|
node,
|
|
89735
|
-
|
|
89766
|
+
visitNode(node.expression, visitor, isExpression),
|
|
89736
89767
|
/*typeArguments*/
|
|
89737
89768
|
void 0,
|
|
89738
89769
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -89741,28 +89772,28 @@ function transformTypeScript(context) {
|
|
|
89741
89772
|
function visitTaggedTemplateExpression(node) {
|
|
89742
89773
|
return factory2.updateTaggedTemplateExpression(
|
|
89743
89774
|
node,
|
|
89744
|
-
|
|
89775
|
+
visitNode(node.tag, visitor, isExpression),
|
|
89745
89776
|
/*typeArguments*/
|
|
89746
89777
|
void 0,
|
|
89747
|
-
|
|
89778
|
+
visitNode(node.template, visitor, isExpression)
|
|
89748
89779
|
);
|
|
89749
89780
|
}
|
|
89750
89781
|
function visitJsxSelfClosingElement(node) {
|
|
89751
89782
|
return factory2.updateJsxSelfClosingElement(
|
|
89752
89783
|
node,
|
|
89753
|
-
|
|
89784
|
+
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
89754
89785
|
/*typeArguments*/
|
|
89755
89786
|
void 0,
|
|
89756
|
-
|
|
89787
|
+
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
89757
89788
|
);
|
|
89758
89789
|
}
|
|
89759
89790
|
function visitJsxJsxOpeningElement(node) {
|
|
89760
89791
|
return factory2.updateJsxOpeningElement(
|
|
89761
89792
|
node,
|
|
89762
|
-
|
|
89793
|
+
visitNode(node.tagName, visitor, isJsxTagNameExpression),
|
|
89763
89794
|
/*typeArguments*/
|
|
89764
89795
|
void 0,
|
|
89765
|
-
|
|
89796
|
+
visitNode(node.attributes, visitor, isJsxAttributes)
|
|
89766
89797
|
);
|
|
89767
89798
|
}
|
|
89768
89799
|
function shouldEmitEnumDeclaration(node) {
|
|
@@ -89908,7 +89939,7 @@ function transformTypeScript(context) {
|
|
|
89908
89939
|
} else {
|
|
89909
89940
|
enableSubstitutionForNonQualifiedEnumMembers();
|
|
89910
89941
|
if (member.initializer) {
|
|
89911
|
-
return
|
|
89942
|
+
return visitNode(member.initializer, visitor, isExpression);
|
|
89912
89943
|
} else {
|
|
89913
89944
|
return factory2.createVoidZero();
|
|
89914
89945
|
}
|
|
@@ -90189,7 +90220,7 @@ function transformTypeScript(context) {
|
|
|
90189
90220
|
return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0;
|
|
90190
90221
|
}
|
|
90191
90222
|
function visitNamespaceExports(node) {
|
|
90192
|
-
return factory2.updateNamespaceExport(node,
|
|
90223
|
+
return factory2.updateNamespaceExport(node, visitNode(node.name, visitor, isIdentifier));
|
|
90193
90224
|
}
|
|
90194
90225
|
function visitNamedExportBindings(node, allowEmpty) {
|
|
90195
90226
|
return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
|
|
@@ -90667,7 +90698,6 @@ function transformClassFields(context) {
|
|
|
90667
90698
|
const info = accessPrivateIdentifier(node.left);
|
|
90668
90699
|
if (info) {
|
|
90669
90700
|
const receiver = visitNode(node.right, visitor, isExpression);
|
|
90670
|
-
Debug.assert(receiver);
|
|
90671
90701
|
return setOriginalNode(
|
|
90672
90702
|
context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver),
|
|
90673
90703
|
node
|
|
@@ -90685,7 +90715,6 @@ function transformClassFields(context) {
|
|
|
90685
90715
|
}
|
|
90686
90716
|
function visitComputedPropertyName(node) {
|
|
90687
90717
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
90688
|
-
Debug.assert(expression);
|
|
90689
90718
|
if (some(pendingExpressions)) {
|
|
90690
90719
|
if (isParenthesizedExpression(expression)) {
|
|
90691
90720
|
expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions([...pendingExpressions, expression.expression]));
|
|
@@ -90767,7 +90796,6 @@ function transformClassFields(context) {
|
|
|
90767
90796
|
const temp = factory2.createTempVariable(hoistVariableDeclaration);
|
|
90768
90797
|
setSourceMapRange(temp, name.expression);
|
|
90769
90798
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
90770
|
-
Debug.assert(expression);
|
|
90771
90799
|
const assignment = factory2.createAssignment(temp, expression);
|
|
90772
90800
|
setSourceMapRange(assignment, name.expression);
|
|
90773
90801
|
getterName = factory2.updateComputedPropertyName(name, factory2.inlineExpressions([assignment, temp]));
|
|
@@ -90850,7 +90878,7 @@ function transformClassFields(context) {
|
|
|
90850
90878
|
return transformFieldInitializer(node);
|
|
90851
90879
|
}
|
|
90852
90880
|
function createPrivateIdentifierAccess(info, receiver) {
|
|
90853
|
-
return createPrivateIdentifierAccessHelper(info,
|
|
90881
|
+
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
|
|
90854
90882
|
}
|
|
90855
90883
|
function createPrivateIdentifierAccessHelper(info, receiver) {
|
|
90856
90884
|
setCommentRange(receiver, moveRangePos(receiver, -1));
|
|
@@ -90920,7 +90948,7 @@ function transformClassFields(context) {
|
|
|
90920
90948
|
if (classConstructor && superClassReference) {
|
|
90921
90949
|
const superProperty = factory2.createReflectGetCall(
|
|
90922
90950
|
superClassReference,
|
|
90923
|
-
|
|
90951
|
+
visitNode(node.argumentExpression, visitor, isExpression),
|
|
90924
90952
|
classConstructor
|
|
90925
90953
|
);
|
|
90926
90954
|
setOriginalNode(superProperty, node.expression);
|
|
@@ -90937,7 +90965,6 @@ function transformClassFields(context) {
|
|
|
90937
90965
|
let info;
|
|
90938
90966
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
90939
90967
|
const receiver = visitNode(operand.expression, visitor, isExpression);
|
|
90940
|
-
Debug.assert(receiver);
|
|
90941
90968
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
90942
90969
|
let expression = createPrivateIdentifierAccess(info, readExpression);
|
|
90943
90970
|
const temp = isPrefixUnaryExpression(node) || valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
@@ -90974,7 +91001,7 @@ function transformClassFields(context) {
|
|
|
90974
91001
|
getterName = setterName = operand.argumentExpression;
|
|
90975
91002
|
} else {
|
|
90976
91003
|
getterName = factory2.createTempVariable(hoistVariableDeclaration);
|
|
90977
|
-
setterName = factory2.createAssignment(getterName,
|
|
91004
|
+
setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
|
|
90978
91005
|
}
|
|
90979
91006
|
}
|
|
90980
91007
|
if (setterName && getterName) {
|
|
@@ -91008,7 +91035,7 @@ function transformClassFields(context) {
|
|
|
91008
91035
|
function visitExpressionStatement(node) {
|
|
91009
91036
|
return factory2.updateExpressionStatement(
|
|
91010
91037
|
node,
|
|
91011
|
-
|
|
91038
|
+
visitNode(node.expression, discardedValueVisitor, isExpression)
|
|
91012
91039
|
);
|
|
91013
91040
|
}
|
|
91014
91041
|
function createCopiableReceiverExpr(receiver) {
|
|
@@ -91026,25 +91053,25 @@ function transformClassFields(context) {
|
|
|
91026
91053
|
if (isCallChain(node)) {
|
|
91027
91054
|
return factory2.updateCallChain(
|
|
91028
91055
|
node,
|
|
91029
|
-
factory2.createPropertyAccessChain(
|
|
91056
|
+
factory2.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
|
|
91030
91057
|
/*questionDotToken*/
|
|
91031
91058
|
void 0,
|
|
91032
91059
|
/*typeArguments*/
|
|
91033
91060
|
void 0,
|
|
91034
|
-
[
|
|
91061
|
+
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
91035
91062
|
);
|
|
91036
91063
|
}
|
|
91037
91064
|
return factory2.updateCallExpression(
|
|
91038
91065
|
node,
|
|
91039
|
-
factory2.createPropertyAccessExpression(
|
|
91066
|
+
factory2.createPropertyAccessExpression(visitNode(target, visitor), "call"),
|
|
91040
91067
|
/*typeArguments*/
|
|
91041
91068
|
void 0,
|
|
91042
|
-
[
|
|
91069
|
+
[visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)]
|
|
91043
91070
|
);
|
|
91044
91071
|
}
|
|
91045
91072
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
91046
91073
|
const invocation = factory2.createFunctionCallCall(
|
|
91047
|
-
|
|
91074
|
+
visitNode(node.expression, visitor, isExpression),
|
|
91048
91075
|
currentClassLexicalEnvironment.classConstructor,
|
|
91049
91076
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
91050
91077
|
);
|
|
@@ -91060,19 +91087,19 @@ function transformClassFields(context) {
|
|
|
91060
91087
|
return factory2.updateTaggedTemplateExpression(
|
|
91061
91088
|
node,
|
|
91062
91089
|
factory2.createCallExpression(
|
|
91063
|
-
factory2.createPropertyAccessExpression(
|
|
91090
|
+
factory2.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
|
|
91064
91091
|
/*typeArguments*/
|
|
91065
91092
|
void 0,
|
|
91066
|
-
[
|
|
91093
|
+
[visitNode(thisArg, visitor, isExpression)]
|
|
91067
91094
|
),
|
|
91068
91095
|
/*typeArguments*/
|
|
91069
91096
|
void 0,
|
|
91070
|
-
|
|
91097
|
+
visitNode(node.template, visitor, isTemplateLiteral)
|
|
91071
91098
|
);
|
|
91072
91099
|
}
|
|
91073
91100
|
if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && (currentClassLexicalEnvironment == null ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
|
|
91074
91101
|
const invocation = factory2.createFunctionBindCall(
|
|
91075
|
-
|
|
91102
|
+
visitNode(node.tag, visitor, isExpression),
|
|
91076
91103
|
currentClassLexicalEnvironment.classConstructor,
|
|
91077
91104
|
[]
|
|
91078
91105
|
);
|
|
@@ -91083,7 +91110,7 @@ function transformClassFields(context) {
|
|
|
91083
91110
|
invocation,
|
|
91084
91111
|
/*typeArguments*/
|
|
91085
91112
|
void 0,
|
|
91086
|
-
|
|
91113
|
+
visitNode(node.template, visitor, isTemplateLiteral)
|
|
91087
91114
|
);
|
|
91088
91115
|
}
|
|
91089
91116
|
return visitEachChild(node, visitor, context);
|
|
@@ -91113,9 +91140,9 @@ function transformClassFields(context) {
|
|
|
91113
91140
|
pendingExpressions = void 0;
|
|
91114
91141
|
node = factory2.updateBinaryExpression(
|
|
91115
91142
|
node,
|
|
91116
|
-
|
|
91143
|
+
visitNode(node.left, assignmentTargetVisitor),
|
|
91117
91144
|
node.operatorToken,
|
|
91118
|
-
|
|
91145
|
+
visitNode(node.right, visitor)
|
|
91119
91146
|
);
|
|
91120
91147
|
const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node;
|
|
91121
91148
|
pendingExpressions = savedPendingExpressions;
|
|
@@ -91140,7 +91167,7 @@ function transformClassFields(context) {
|
|
|
91140
91167
|
node,
|
|
91141
91168
|
visitInvalidSuperProperty(node.left),
|
|
91142
91169
|
node.operatorToken,
|
|
91143
|
-
|
|
91170
|
+
visitNode(node.right, visitor, isExpression)
|
|
91144
91171
|
);
|
|
91145
91172
|
}
|
|
91146
91173
|
if (classConstructor && superClassReference) {
|
|
@@ -91160,7 +91187,6 @@ function transformClassFields(context) {
|
|
|
91160
91187
|
);
|
|
91161
91188
|
setOriginalNode(superPropertyGet, node.left);
|
|
91162
91189
|
setTextRange(superPropertyGet, node.left);
|
|
91163
|
-
Debug.assert(expression);
|
|
91164
91190
|
expression = factory2.createBinaryExpression(
|
|
91165
91191
|
superPropertyGet,
|
|
91166
91192
|
getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind),
|
|
@@ -91170,11 +91196,9 @@ function transformClassFields(context) {
|
|
|
91170
91196
|
}
|
|
91171
91197
|
const temp = valueIsDiscarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration);
|
|
91172
91198
|
if (temp) {
|
|
91173
|
-
Debug.assert(expression);
|
|
91174
91199
|
expression = factory2.createAssignment(temp, expression);
|
|
91175
91200
|
setTextRange(temp, node);
|
|
91176
91201
|
}
|
|
91177
|
-
Debug.assert(expression);
|
|
91178
91202
|
expression = factory2.createReflectSetCall(
|
|
91179
91203
|
superClassReference,
|
|
91180
91204
|
setterName,
|
|
@@ -91198,8 +91222,8 @@ function transformClassFields(context) {
|
|
|
91198
91222
|
return visitEachChild(node, visitor, context);
|
|
91199
91223
|
}
|
|
91200
91224
|
function createPrivateIdentifierAssignment(info, receiver, right, operator) {
|
|
91201
|
-
receiver =
|
|
91202
|
-
right =
|
|
91225
|
+
receiver = visitNode(receiver, visitor, isExpression);
|
|
91226
|
+
right = visitNode(right, visitor, isExpression);
|
|
91203
91227
|
if (isCompoundAssignment(operator)) {
|
|
91204
91228
|
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
|
|
91205
91229
|
receiver = initializeExpression || readExpression;
|
|
@@ -91302,7 +91326,7 @@ function transformClassFields(context) {
|
|
|
91302
91326
|
node,
|
|
91303
91327
|
factory2.createAssignment(
|
|
91304
91328
|
temp,
|
|
91305
|
-
|
|
91329
|
+
visitNode(node.expression, visitor, isExpression)
|
|
91306
91330
|
),
|
|
91307
91331
|
/*typeArguments*/
|
|
91308
91332
|
void 0
|
|
@@ -91864,7 +91888,7 @@ function transformClassFields(context) {
|
|
|
91864
91888
|
) : factory2.updateElementAccessExpression(
|
|
91865
91889
|
node,
|
|
91866
91890
|
factory2.createVoidZero(),
|
|
91867
|
-
|
|
91891
|
+
visitNode(node.argumentExpression, visitor, isExpression)
|
|
91868
91892
|
);
|
|
91869
91893
|
}
|
|
91870
91894
|
function onEmitNode(hint, node, emitCallback) {
|
|
@@ -91981,7 +92005,6 @@ function transformClassFields(context) {
|
|
|
91981
92005
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
91982
92006
|
if (isComputedPropertyName(name)) {
|
|
91983
92007
|
const expression = visitNode(name.expression, visitor, isExpression);
|
|
91984
|
-
Debug.assert(expression);
|
|
91985
92008
|
const innerExpression = skipPartiallyEmittedExpressions(expression);
|
|
91986
92009
|
const inlinable = isSimpleInlineableExpression(innerExpression);
|
|
91987
92010
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
@@ -92203,7 +92226,7 @@ function transformClassFields(context) {
|
|
|
92203
92226
|
/*reservedInNestedScopes*/
|
|
92204
92227
|
true
|
|
92205
92228
|
);
|
|
92206
|
-
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */,
|
|
92229
|
+
getPendingExpressions().push(factory2.createBinaryExpression(receiver, 63 /* EqualsToken */, visitNode(node.expression, visitor, isExpression)));
|
|
92207
92230
|
}
|
|
92208
92231
|
return factory2.createAssignmentTargetWrapper(
|
|
92209
92232
|
parameter,
|
|
@@ -92216,7 +92239,6 @@ function transformClassFields(context) {
|
|
|
92216
92239
|
);
|
|
92217
92240
|
}
|
|
92218
92241
|
function visitArrayAssignmentTarget(node) {
|
|
92219
|
-
Debug.assertNode(node, isBindingOrAssignmentElement);
|
|
92220
92242
|
const target = getTargetOfBindingOrAssignmentElement(node);
|
|
92221
92243
|
if (target) {
|
|
92222
92244
|
let wrapped;
|
|
@@ -92251,7 +92273,7 @@ function transformClassFields(context) {
|
|
|
92251
92273
|
node,
|
|
92252
92274
|
wrapped,
|
|
92253
92275
|
node.operatorToken,
|
|
92254
|
-
|
|
92276
|
+
visitNode(node.right, visitor, isExpression)
|
|
92255
92277
|
);
|
|
92256
92278
|
} else if (isSpreadElement(node)) {
|
|
92257
92279
|
return factory2.updateSpreadElement(node, wrapped);
|
|
@@ -92297,14 +92319,14 @@ function transformClassFields(context) {
|
|
|
92297
92319
|
const initializer = getInitializerOfBindingOrAssignmentElement(node);
|
|
92298
92320
|
return factory2.updatePropertyAssignment(
|
|
92299
92321
|
node,
|
|
92300
|
-
|
|
92301
|
-
wrapped ? initializer ? factory2.createAssignment(wrapped,
|
|
92322
|
+
visitNode(node.name, visitor, isPropertyName),
|
|
92323
|
+
wrapped ? initializer ? factory2.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped : visitNode(node.initializer, assignmentTargetVisitor, isExpression)
|
|
92302
92324
|
);
|
|
92303
92325
|
}
|
|
92304
92326
|
if (isSpreadAssignment(node)) {
|
|
92305
92327
|
return factory2.updateSpreadAssignment(
|
|
92306
92328
|
node,
|
|
92307
|
-
wrapped ||
|
|
92329
|
+
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
|
|
92308
92330
|
);
|
|
92309
92331
|
}
|
|
92310
92332
|
Debug.assert(wrapped === void 0, "Should not have generated a wrapped target");
|
|
@@ -92918,7 +92940,7 @@ function transformLegacyDecorators(context) {
|
|
|
92918
92940
|
return factory2.updateConstructorDeclaration(
|
|
92919
92941
|
node,
|
|
92920
92942
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92921
|
-
visitNodes2(node.parameters, visitor,
|
|
92943
|
+
visitNodes2(node.parameters, visitor, isParameterDeclaration),
|
|
92922
92944
|
visitNode(node.body, visitor, isBlock)
|
|
92923
92945
|
);
|
|
92924
92946
|
}
|
|
@@ -92934,12 +92956,12 @@ function transformLegacyDecorators(context) {
|
|
|
92934
92956
|
node,
|
|
92935
92957
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92936
92958
|
node.asteriskToken,
|
|
92937
|
-
|
|
92959
|
+
visitNode(node.name, visitor, isPropertyName),
|
|
92938
92960
|
/*questionToken*/
|
|
92939
92961
|
void 0,
|
|
92940
92962
|
/*typeParameters*/
|
|
92941
92963
|
void 0,
|
|
92942
|
-
visitNodes2(node.parameters, visitor,
|
|
92964
|
+
visitNodes2(node.parameters, visitor, isParameterDeclaration),
|
|
92943
92965
|
/*type*/
|
|
92944
92966
|
void 0,
|
|
92945
92967
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -92949,8 +92971,8 @@ function transformLegacyDecorators(context) {
|
|
|
92949
92971
|
return finishClassElement(factory2.updateGetAccessorDeclaration(
|
|
92950
92972
|
node,
|
|
92951
92973
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92952
|
-
|
|
92953
|
-
visitNodes2(node.parameters, visitor,
|
|
92974
|
+
visitNode(node.name, visitor, isPropertyName),
|
|
92975
|
+
visitNodes2(node.parameters, visitor, isParameterDeclaration),
|
|
92954
92976
|
/*type*/
|
|
92955
92977
|
void 0,
|
|
92956
92978
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -92960,8 +92982,8 @@ function transformLegacyDecorators(context) {
|
|
|
92960
92982
|
return finishClassElement(factory2.updateSetAccessorDeclaration(
|
|
92961
92983
|
node,
|
|
92962
92984
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92963
|
-
|
|
92964
|
-
visitNodes2(node.parameters, visitor,
|
|
92985
|
+
visitNode(node.name, visitor, isPropertyName),
|
|
92986
|
+
visitNodes2(node.parameters, visitor, isParameterDeclaration),
|
|
92965
92987
|
visitNode(node.body, visitor, isBlock)
|
|
92966
92988
|
), node);
|
|
92967
92989
|
}
|
|
@@ -92972,7 +92994,7 @@ function transformLegacyDecorators(context) {
|
|
|
92972
92994
|
return finishClassElement(factory2.updatePropertyDeclaration(
|
|
92973
92995
|
node,
|
|
92974
92996
|
visitNodes2(node.modifiers, modifierVisitor, isModifier),
|
|
92975
|
-
|
|
92997
|
+
visitNode(node.name, visitor, isPropertyName),
|
|
92976
92998
|
/*questionOrExclamationToken*/
|
|
92977
92999
|
void 0,
|
|
92978
93000
|
/*type*/
|
|
@@ -92985,7 +93007,7 @@ function transformLegacyDecorators(context) {
|
|
|
92985
93007
|
node,
|
|
92986
93008
|
elideNodes(factory2, node.modifiers),
|
|
92987
93009
|
node.dotDotDotToken,
|
|
92988
|
-
|
|
93010
|
+
visitNode(node.name, visitor, isBindingName),
|
|
92989
93011
|
/*questionToken*/
|
|
92990
93012
|
void 0,
|
|
92991
93013
|
/*type*/
|
|
@@ -93082,7 +93104,7 @@ function transformLegacyDecorators(context) {
|
|
|
93082
93104
|
return expression;
|
|
93083
93105
|
}
|
|
93084
93106
|
function transformDecorator(decorator) {
|
|
93085
|
-
return
|
|
93107
|
+
return visitNode(decorator.expression, visitor, isExpression);
|
|
93086
93108
|
}
|
|
93087
93109
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
93088
93110
|
let expressions;
|
|
@@ -93348,21 +93370,21 @@ function transformES2017(context) {
|
|
|
93348
93370
|
node.initializer,
|
|
93349
93371
|
/*hasReceiver*/
|
|
93350
93372
|
true
|
|
93351
|
-
) :
|
|
93352
|
-
|
|
93373
|
+
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
93374
|
+
visitNode(node.expression, visitor, isExpression),
|
|
93353
93375
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
93354
93376
|
);
|
|
93355
93377
|
}
|
|
93356
93378
|
function visitForOfStatementInAsyncBody(node) {
|
|
93357
93379
|
return factory2.updateForOfStatement(
|
|
93358
93380
|
node,
|
|
93359
|
-
visitNode(node.awaitModifier, visitor,
|
|
93381
|
+
visitNode(node.awaitModifier, visitor, isToken),
|
|
93360
93382
|
isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames(
|
|
93361
93383
|
node.initializer,
|
|
93362
93384
|
/*hasReceiver*/
|
|
93363
93385
|
true
|
|
93364
|
-
) :
|
|
93365
|
-
|
|
93386
|
+
) : visitNode(node.initializer, visitor, isForInitializer),
|
|
93387
|
+
visitNode(node.expression, visitor, isExpression),
|
|
93366
93388
|
visitIterationBody(node.statement, asyncBodyVisitor, context)
|
|
93367
93389
|
);
|
|
93368
93390
|
}
|
|
@@ -93399,7 +93421,7 @@ function transformES2017(context) {
|
|
|
93399
93421
|
function visitConstructorDeclaration(node) {
|
|
93400
93422
|
return factory2.updateConstructorDeclaration(
|
|
93401
93423
|
node,
|
|
93402
|
-
visitNodes2(node.modifiers, visitor,
|
|
93424
|
+
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
93403
93425
|
visitParameterList(node.parameters, visitor, context),
|
|
93404
93426
|
transformMethodBody(node)
|
|
93405
93427
|
);
|
|
@@ -93457,7 +93479,7 @@ function transformES2017(context) {
|
|
|
93457
93479
|
function visitFunctionExpression(node) {
|
|
93458
93480
|
return factory2.updateFunctionExpression(
|
|
93459
93481
|
node,
|
|
93460
|
-
visitNodes2(node.modifiers, visitor,
|
|
93482
|
+
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
93461
93483
|
node.asteriskToken,
|
|
93462
93484
|
node.name,
|
|
93463
93485
|
/*typeParameters*/
|
|
@@ -93471,7 +93493,7 @@ function transformES2017(context) {
|
|
|
93471
93493
|
function visitArrowFunction(node) {
|
|
93472
93494
|
return factory2.updateArrowFunction(
|
|
93473
93495
|
node,
|
|
93474
|
-
visitNodes2(node.modifiers, visitor,
|
|
93496
|
+
visitNodes2(node.modifiers, visitor, isModifierLike),
|
|
93475
93497
|
/*typeParameters*/
|
|
93476
93498
|
void 0,
|
|
93477
93499
|
visitParameterList(node.parameters, visitor, context),
|
|
@@ -93528,7 +93550,7 @@ function transformES2017(context) {
|
|
|
93528
93550
|
),
|
|
93529
93551
|
node
|
|
93530
93552
|
);
|
|
93531
|
-
return
|
|
93553
|
+
return visitNode(converted, visitor, isExpression);
|
|
93532
93554
|
}
|
|
93533
93555
|
function collidesWithParameterName({ name }) {
|
|
93534
93556
|
if (isIdentifier(name)) {
|
|
@@ -93660,7 +93682,7 @@ function transformES2017(context) {
|
|
|
93660
93682
|
if (isBlock(body)) {
|
|
93661
93683
|
return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start2));
|
|
93662
93684
|
} else {
|
|
93663
|
-
return factory2.converters.convertToFunctionBlock(
|
|
93685
|
+
return factory2.converters.convertToFunctionBlock(visitNode(body, asyncBodyVisitor, isConciseBody));
|
|
93664
93686
|
}
|
|
93665
93687
|
}
|
|
93666
93688
|
function getPromiseConstructor(type) {
|
|
@@ -94015,7 +94037,7 @@ function transformES2018(context) {
|
|
|
94015
94037
|
return visitObjectLiteralExpression(node);
|
|
94016
94038
|
case 223 /* BinaryExpression */:
|
|
94017
94039
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
94018
|
-
case
|
|
94040
|
+
case 357 /* CommaListExpression */:
|
|
94019
94041
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
94020
94042
|
case 295 /* CatchClause */:
|
|
94021
94043
|
return visitCatchClause(node);
|
|
@@ -94773,7 +94795,7 @@ function transformES2018(context) {
|
|
|
94773
94795
|
/*questionToken*/
|
|
94774
94796
|
void 0,
|
|
94775
94797
|
visitor,
|
|
94776
|
-
|
|
94798
|
+
isToken
|
|
94777
94799
|
),
|
|
94778
94800
|
/*typeParameters*/
|
|
94779
94801
|
void 0,
|
|
@@ -95447,15 +95469,10 @@ function transformES2021(context) {
|
|
|
95447
95469
|
if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) {
|
|
95448
95470
|
return node;
|
|
95449
95471
|
}
|
|
95450
|
-
|
|
95451
|
-
|
|
95452
|
-
const binaryExpression = node;
|
|
95453
|
-
if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
|
|
95454
|
-
return transformLogicalAssignment(binaryExpression);
|
|
95455
|
-
}
|
|
95456
|
-
default:
|
|
95457
|
-
return visitEachChild(node, visitor, context);
|
|
95472
|
+
if (isLogicalOrCoalescingAssignmentExpression(node)) {
|
|
95473
|
+
return transformLogicalAssignment(node);
|
|
95458
95474
|
}
|
|
95475
|
+
return visitEachChild(node, visitor, context);
|
|
95459
95476
|
}
|
|
95460
95477
|
function transformLogicalAssignment(binaryExpression) {
|
|
95461
95478
|
const operator = binaryExpression.operatorToken;
|
|
@@ -95901,7 +95918,7 @@ function transformJsx(context) {
|
|
|
95901
95918
|
return element;
|
|
95902
95919
|
}
|
|
95903
95920
|
function transformJsxSpreadAttributeToSpreadAssignment(node) {
|
|
95904
|
-
return factory2.createSpreadAssignment(
|
|
95921
|
+
return factory2.createSpreadAssignment(visitNode(node.expression, visitor, isExpression));
|
|
95905
95922
|
}
|
|
95906
95923
|
function transformJsxAttributesToObjectProps(attrs, children) {
|
|
95907
95924
|
const target = getEmitScriptTarget(compilerOptions);
|
|
@@ -95931,7 +95948,7 @@ function transformJsx(context) {
|
|
|
95931
95948
|
return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
95932
95949
|
}
|
|
95933
95950
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
95934
|
-
return
|
|
95951
|
+
return visitNode(node.expression, visitor, isExpression);
|
|
95935
95952
|
}
|
|
95936
95953
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
95937
95954
|
const name = getAttributeName(node);
|
|
@@ -95951,7 +95968,7 @@ function transformJsx(context) {
|
|
|
95951
95968
|
if (node.expression === void 0) {
|
|
95952
95969
|
return factory2.createTrue();
|
|
95953
95970
|
}
|
|
95954
|
-
return
|
|
95971
|
+
return visitNode(node.expression, visitor, isExpression);
|
|
95955
95972
|
}
|
|
95956
95973
|
if (isJsxElement(node)) {
|
|
95957
95974
|
return visitJsxElement(
|
|
@@ -96593,7 +96610,7 @@ function transformES2015(context) {
|
|
|
96593
96610
|
return visitParenthesizedExpression(node, expressionResultIsUnused2);
|
|
96594
96611
|
case 223 /* BinaryExpression */:
|
|
96595
96612
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
96596
|
-
case
|
|
96613
|
+
case 357 /* CommaListExpression */:
|
|
96597
96614
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
96598
96615
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
96599
96616
|
case 15 /* TemplateHead */:
|
|
@@ -96696,7 +96713,7 @@ function transformES2015(context) {
|
|
|
96696
96713
|
[
|
|
96697
96714
|
factory2.createPropertyAssignment(
|
|
96698
96715
|
factory2.createIdentifier("value"),
|
|
96699
|
-
node.expression ?
|
|
96716
|
+
node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero()
|
|
96700
96717
|
)
|
|
96701
96718
|
]
|
|
96702
96719
|
)
|
|
@@ -96867,7 +96884,7 @@ function transformES2015(context) {
|
|
|
96867
96884
|
outer,
|
|
96868
96885
|
/*typeArguments*/
|
|
96869
96886
|
void 0,
|
|
96870
|
-
extendsClauseElement ? [
|
|
96887
|
+
extendsClauseElement ? [visitNode(extendsClauseElement.expression, visitor, isExpression)] : []
|
|
96871
96888
|
)
|
|
96872
96889
|
);
|
|
96873
96890
|
addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class ");
|
|
@@ -97209,7 +97226,7 @@ function transformES2015(context) {
|
|
|
97209
97226
|
factory2.createExpressionStatement(
|
|
97210
97227
|
factory2.createAssignment(
|
|
97211
97228
|
factory2.getGeneratedNameForNode(parameter),
|
|
97212
|
-
|
|
97229
|
+
visitNode(initializer, visitor, isExpression)
|
|
97213
97230
|
)
|
|
97214
97231
|
),
|
|
97215
97232
|
2097152 /* CustomPrologue */
|
|
@@ -97220,7 +97237,7 @@ function transformES2015(context) {
|
|
|
97220
97237
|
return false;
|
|
97221
97238
|
}
|
|
97222
97239
|
function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
|
|
97223
|
-
initializer =
|
|
97240
|
+
initializer = visitNode(initializer, visitor, isExpression);
|
|
97224
97241
|
const statement = factory2.createIfStatement(
|
|
97225
97242
|
factory2.createTypeCheck(factory2.cloneNode(name), "undefined"),
|
|
97226
97243
|
setEmitFlags(
|
|
@@ -97496,7 +97513,6 @@ function transformES2015(context) {
|
|
|
97496
97513
|
container
|
|
97497
97514
|
);
|
|
97498
97515
|
const propertyName = visitNode(member.name, visitor, isPropertyName);
|
|
97499
|
-
Debug.assert(propertyName);
|
|
97500
97516
|
let e;
|
|
97501
97517
|
if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
97502
97518
|
const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
|
|
@@ -97540,7 +97556,6 @@ function transformES2015(context) {
|
|
|
97540
97556
|
setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */);
|
|
97541
97557
|
setSourceMapRange(target, firstAccessor.name);
|
|
97542
97558
|
const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName);
|
|
97543
|
-
Debug.assert(visitedAccessorName);
|
|
97544
97559
|
if (isPrivateIdentifier(visitedAccessorName)) {
|
|
97545
97560
|
return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
97546
97561
|
}
|
|
@@ -97813,9 +97828,9 @@ function transformES2015(context) {
|
|
|
97813
97828
|
if (node.operatorToken.kind === 27 /* CommaToken */) {
|
|
97814
97829
|
return factory2.updateBinaryExpression(
|
|
97815
97830
|
node,
|
|
97816
|
-
|
|
97831
|
+
visitNode(node.left, visitorWithUnusedExpressionResult, isExpression),
|
|
97817
97832
|
node.operatorToken,
|
|
97818
|
-
|
|
97833
|
+
visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)
|
|
97819
97834
|
);
|
|
97820
97835
|
}
|
|
97821
97836
|
return visitEachChild(node, visitor, context);
|
|
@@ -97830,7 +97845,6 @@ function transformES2015(context) {
|
|
|
97830
97845
|
const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression);
|
|
97831
97846
|
if (result || visited !== element) {
|
|
97832
97847
|
result || (result = node.elements.slice(0, i));
|
|
97833
|
-
Debug.assert(visited);
|
|
97834
97848
|
result.push(visited);
|
|
97835
97849
|
}
|
|
97836
97850
|
}
|
|
@@ -97857,7 +97871,7 @@ function transformES2015(context) {
|
|
|
97857
97871
|
0 /* All */
|
|
97858
97872
|
);
|
|
97859
97873
|
} else {
|
|
97860
|
-
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */,
|
|
97874
|
+
assignment = factory2.createBinaryExpression(decl.name, 63 /* EqualsToken */, visitNode(decl.initializer, visitor, isExpression));
|
|
97861
97875
|
setTextRange(assignment, decl);
|
|
97862
97876
|
}
|
|
97863
97877
|
assignments = append(assignments, assignment);
|
|
@@ -97879,7 +97893,7 @@ function transformES2015(context) {
|
|
|
97879
97893
|
if (node.flags & 3 /* BlockScoped */) {
|
|
97880
97894
|
enableSubstitutionsForBlockScopedBindings();
|
|
97881
97895
|
}
|
|
97882
|
-
const declarations =
|
|
97896
|
+
const declarations = flatMap(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration);
|
|
97883
97897
|
const declarationList = factory2.createVariableDeclarationList(declarations);
|
|
97884
97898
|
setOriginalNode(declarationList, node);
|
|
97885
97899
|
setTextRange(declarationList, node);
|
|
@@ -97963,7 +97977,7 @@ function transformES2015(context) {
|
|
|
97963
97977
|
statement,
|
|
97964
97978
|
/*outermostLabeledStatement*/
|
|
97965
97979
|
node
|
|
97966
|
-
) : factory2.restoreEnclosingLabel(
|
|
97980
|
+
) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node, convertedLoopState && resetLabel);
|
|
97967
97981
|
}
|
|
97968
97982
|
function visitIterationStatement(node, outermostLabeledStatement) {
|
|
97969
97983
|
switch (node.kind) {
|
|
@@ -98006,7 +98020,7 @@ function transformES2015(context) {
|
|
|
98006
98020
|
visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer),
|
|
98007
98021
|
visitNode(node.condition, visitor, isExpression),
|
|
98008
98022
|
visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression),
|
|
98009
|
-
|
|
98023
|
+
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
98010
98024
|
);
|
|
98011
98025
|
}
|
|
98012
98026
|
function visitForInStatement(node, outermostLabeledStatement) {
|
|
@@ -98092,14 +98106,13 @@ function transformES2015(context) {
|
|
|
98092
98106
|
)));
|
|
98093
98107
|
} else {
|
|
98094
98108
|
setTextRangeEnd(assignment, initializer.end);
|
|
98095
|
-
statements.push(setTextRange(factory2.createExpressionStatement(
|
|
98109
|
+
statements.push(setTextRange(factory2.createExpressionStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(initializer, -1)));
|
|
98096
98110
|
}
|
|
98097
98111
|
}
|
|
98098
98112
|
if (convertedLoopBodyStatements) {
|
|
98099
98113
|
return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements));
|
|
98100
98114
|
} else {
|
|
98101
98115
|
const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock);
|
|
98102
|
-
Debug.assert(statement);
|
|
98103
98116
|
if (isBlock(statement)) {
|
|
98104
98117
|
return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements));
|
|
98105
98118
|
} else {
|
|
@@ -98120,7 +98133,6 @@ function transformES2015(context) {
|
|
|
98120
98133
|
}
|
|
98121
98134
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
98122
98135
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
98123
|
-
Debug.assert(expression);
|
|
98124
98136
|
const counter = factory2.createLoopVariable();
|
|
98125
98137
|
const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
98126
98138
|
/*recordTempVariable*/
|
|
@@ -98180,7 +98192,6 @@ function transformES2015(context) {
|
|
|
98180
98192
|
}
|
|
98181
98193
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
98182
98194
|
const expression = visitNode(node.expression, visitor, isExpression);
|
|
98183
|
-
Debug.assert(expression);
|
|
98184
98195
|
const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable(
|
|
98185
98196
|
/*recordTempVariable*/
|
|
98186
98197
|
void 0
|
|
@@ -98438,7 +98449,7 @@ function transformES2015(context) {
|
|
|
98438
98449
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
98439
98450
|
}
|
|
98440
98451
|
} else {
|
|
98441
|
-
const clone2 = convertIterationStatementCore(node, initializerFunction,
|
|
98452
|
+
const clone2 = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, factory2.liftToBlock));
|
|
98442
98453
|
loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel);
|
|
98443
98454
|
}
|
|
98444
98455
|
statements.push(loop);
|
|
@@ -98476,16 +98487,16 @@ function transformES2015(context) {
|
|
|
98476
98487
|
node,
|
|
98477
98488
|
/*awaitModifier*/
|
|
98478
98489
|
void 0,
|
|
98479
|
-
|
|
98480
|
-
|
|
98490
|
+
visitNode(node.initializer, visitor, isForInitializer),
|
|
98491
|
+
visitNode(node.expression, visitor, isExpression),
|
|
98481
98492
|
convertedLoopBody
|
|
98482
98493
|
);
|
|
98483
98494
|
}
|
|
98484
98495
|
function convertForInStatement(node, convertedLoopBody) {
|
|
98485
98496
|
return factory2.updateForInStatement(
|
|
98486
98497
|
node,
|
|
98487
|
-
|
|
98488
|
-
|
|
98498
|
+
visitNode(node.initializer, visitor, isForInitializer),
|
|
98499
|
+
visitNode(node.expression, visitor, isExpression),
|
|
98489
98500
|
convertedLoopBody
|
|
98490
98501
|
);
|
|
98491
98502
|
}
|
|
@@ -98493,13 +98504,13 @@ function transformES2015(context) {
|
|
|
98493
98504
|
return factory2.updateDoStatement(
|
|
98494
98505
|
node,
|
|
98495
98506
|
convertedLoopBody,
|
|
98496
|
-
|
|
98507
|
+
visitNode(node.expression, visitor, isExpression)
|
|
98497
98508
|
);
|
|
98498
98509
|
}
|
|
98499
98510
|
function convertWhileStatement(node, convertedLoopBody) {
|
|
98500
98511
|
return factory2.updateWhileStatement(
|
|
98501
98512
|
node,
|
|
98502
|
-
|
|
98513
|
+
visitNode(node.expression, visitor, isExpression),
|
|
98503
98514
|
convertedLoopBody
|
|
98504
98515
|
);
|
|
98505
98516
|
}
|
|
@@ -98661,7 +98672,7 @@ function transformES2015(context) {
|
|
|
98661
98672
|
void 0,
|
|
98662
98673
|
/*type*/
|
|
98663
98674
|
void 0,
|
|
98664
|
-
|
|
98675
|
+
visitNode(
|
|
98665
98676
|
factory2.createBlock(
|
|
98666
98677
|
statements,
|
|
98667
98678
|
/*multiLine*/
|
|
@@ -98669,7 +98680,7 @@ function transformES2015(context) {
|
|
|
98669
98680
|
),
|
|
98670
98681
|
visitor,
|
|
98671
98682
|
isBlock
|
|
98672
|
-
)
|
|
98683
|
+
)
|
|
98673
98684
|
),
|
|
98674
98685
|
emitFlags
|
|
98675
98686
|
)
|
|
@@ -98692,7 +98703,7 @@ function transformES2015(context) {
|
|
|
98692
98703
|
if (node.incrementor) {
|
|
98693
98704
|
statements.push(factory2.createIfStatement(
|
|
98694
98705
|
currentState.conditionVariable,
|
|
98695
|
-
factory2.createExpressionStatement(
|
|
98706
|
+
factory2.createExpressionStatement(visitNode(node.incrementor, visitor, isExpression)),
|
|
98696
98707
|
factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue()))
|
|
98697
98708
|
));
|
|
98698
98709
|
} else {
|
|
@@ -98703,12 +98714,11 @@ function transformES2015(context) {
|
|
|
98703
98714
|
}
|
|
98704
98715
|
if (shouldConvertConditionOfForStatement(node)) {
|
|
98705
98716
|
statements.push(factory2.createIfStatement(
|
|
98706
|
-
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */,
|
|
98707
|
-
|
|
98717
|
+
factory2.createPrefixUnaryExpression(53 /* ExclamationToken */, visitNode(node.condition, visitor, isExpression)),
|
|
98718
|
+
visitNode(factory2.createBreakStatement(), visitor, isStatement)
|
|
98708
98719
|
));
|
|
98709
98720
|
}
|
|
98710
98721
|
}
|
|
98711
|
-
Debug.assert(statement);
|
|
98712
98722
|
if (isBlock(statement)) {
|
|
98713
98723
|
addRange(statements, statement.statements);
|
|
98714
98724
|
} else {
|
|
@@ -98976,9 +98986,9 @@ function transformES2015(context) {
|
|
|
98976
98986
|
createMemberAccessForPropertyName(
|
|
98977
98987
|
factory2,
|
|
98978
98988
|
receiver,
|
|
98979
|
-
|
|
98989
|
+
visitNode(property.name, visitor, isPropertyName)
|
|
98980
98990
|
),
|
|
98981
|
-
|
|
98991
|
+
visitNode(property.initializer, visitor, isExpression)
|
|
98982
98992
|
);
|
|
98983
98993
|
setTextRange(expression, property);
|
|
98984
98994
|
if (startsOnNewLine) {
|
|
@@ -98991,7 +99001,7 @@ function transformES2015(context) {
|
|
|
98991
99001
|
createMemberAccessForPropertyName(
|
|
98992
99002
|
factory2,
|
|
98993
99003
|
receiver,
|
|
98994
|
-
|
|
99004
|
+
visitNode(property.name, visitor, isPropertyName)
|
|
98995
99005
|
),
|
|
98996
99006
|
factory2.cloneNode(property.name)
|
|
98997
99007
|
);
|
|
@@ -99006,7 +99016,7 @@ function transformES2015(context) {
|
|
|
99006
99016
|
createMemberAccessForPropertyName(
|
|
99007
99017
|
factory2,
|
|
99008
99018
|
receiver,
|
|
99009
|
-
|
|
99019
|
+
visitNode(method.name, visitor, isPropertyName)
|
|
99010
99020
|
),
|
|
99011
99021
|
transformFunctionLikeToExpression(
|
|
99012
99022
|
method,
|
|
@@ -99140,7 +99150,7 @@ function transformES2015(context) {
|
|
|
99140
99150
|
}
|
|
99141
99151
|
return factory2.updateCallExpression(
|
|
99142
99152
|
node,
|
|
99143
|
-
|
|
99153
|
+
visitNode(node.expression, callExpressionVisitor, isExpression),
|
|
99144
99154
|
/*typeArguments*/
|
|
99145
99155
|
void 0,
|
|
99146
99156
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
@@ -99252,8 +99262,8 @@ function transformES2015(context) {
|
|
|
99252
99262
|
let resultingCall;
|
|
99253
99263
|
if (node.transformFlags & 32768 /* ContainsRestOrSpread */) {
|
|
99254
99264
|
resultingCall = factory2.createFunctionApplyCall(
|
|
99255
|
-
|
|
99256
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg :
|
|
99265
|
+
visitNode(target, callExpressionVisitor, isExpression),
|
|
99266
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
99257
99267
|
transformAndSpreadElements(
|
|
99258
99268
|
node.arguments,
|
|
99259
99269
|
/*isArgumentList*/
|
|
@@ -99267,8 +99277,8 @@ function transformES2015(context) {
|
|
|
99267
99277
|
} else {
|
|
99268
99278
|
resultingCall = setTextRange(
|
|
99269
99279
|
factory2.createFunctionCallCall(
|
|
99270
|
-
|
|
99271
|
-
node.expression.kind === 106 /* SuperKeyword */ ? thisArg :
|
|
99280
|
+
visitNode(target, callExpressionVisitor, isExpression),
|
|
99281
|
+
node.expression.kind === 106 /* SuperKeyword */ ? thisArg : visitNode(thisArg, visitor, isExpression),
|
|
99272
99282
|
visitNodes2(node.arguments, visitor, isExpression)
|
|
99273
99283
|
),
|
|
99274
99284
|
node
|
|
@@ -99290,7 +99300,7 @@ function transformES2015(context) {
|
|
|
99290
99300
|
const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration);
|
|
99291
99301
|
return factory2.createNewExpression(
|
|
99292
99302
|
factory2.createFunctionApplyCall(
|
|
99293
|
-
|
|
99303
|
+
visitNode(target, visitor, isExpression),
|
|
99294
99304
|
thisArg,
|
|
99295
99305
|
transformAndSpreadElements(
|
|
99296
99306
|
factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]),
|
|
@@ -99347,9 +99357,7 @@ function transformES2015(context) {
|
|
|
99347
99357
|
return map(chunk, visitExpressionOfSpread);
|
|
99348
99358
|
}
|
|
99349
99359
|
function visitExpressionOfSpread(node) {
|
|
99350
|
-
Debug.assertNode(node, isSpreadElement);
|
|
99351
99360
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
99352
|
-
Debug.assert(expression);
|
|
99353
99361
|
const isCallToReadHelper = isCallToHelper(expression, "___read");
|
|
99354
99362
|
let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */;
|
|
99355
99363
|
if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -99400,7 +99408,7 @@ function transformES2015(context) {
|
|
|
99400
99408
|
function visitTemplateExpression(node) {
|
|
99401
99409
|
let expression = factory2.createStringLiteral(node.head.text);
|
|
99402
99410
|
for (const span of node.templateSpans) {
|
|
99403
|
-
const args = [
|
|
99411
|
+
const args = [visitNode(span.expression, visitor, isExpression)];
|
|
99404
99412
|
if (span.literal.text.length > 0) {
|
|
99405
99413
|
args.push(factory2.createStringLiteral(span.literal.text));
|
|
99406
99414
|
}
|
|
@@ -99754,7 +99762,7 @@ function transformGenerators(context) {
|
|
|
99754
99762
|
switch (node.kind) {
|
|
99755
99763
|
case 223 /* BinaryExpression */:
|
|
99756
99764
|
return visitBinaryExpression(node);
|
|
99757
|
-
case
|
|
99765
|
+
case 357 /* CommaListExpression */:
|
|
99758
99766
|
return visitCommaListExpression(node);
|
|
99759
99767
|
case 224 /* ConditionalExpression */:
|
|
99760
99768
|
return visitConditionalExpression(node);
|
|
@@ -99966,19 +99974,19 @@ function transformGenerators(context) {
|
|
|
99966
99974
|
case 208 /* PropertyAccessExpression */:
|
|
99967
99975
|
target = factory2.updatePropertyAccessExpression(
|
|
99968
99976
|
left,
|
|
99969
|
-
cacheExpression(
|
|
99977
|
+
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
99970
99978
|
left.name
|
|
99971
99979
|
);
|
|
99972
99980
|
break;
|
|
99973
99981
|
case 209 /* ElementAccessExpression */:
|
|
99974
99982
|
target = factory2.updateElementAccessExpression(
|
|
99975
99983
|
left,
|
|
99976
|
-
cacheExpression(
|
|
99977
|
-
cacheExpression(
|
|
99984
|
+
cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)),
|
|
99985
|
+
cacheExpression(visitNode(left.argumentExpression, visitor, isExpression))
|
|
99978
99986
|
);
|
|
99979
99987
|
break;
|
|
99980
99988
|
default:
|
|
99981
|
-
target =
|
|
99989
|
+
target = visitNode(left, visitor, isExpression);
|
|
99982
99990
|
break;
|
|
99983
99991
|
}
|
|
99984
99992
|
const operator = node.operatorToken.kind;
|
|
@@ -99990,7 +99998,7 @@ function transformGenerators(context) {
|
|
|
99990
99998
|
factory2.createBinaryExpression(
|
|
99991
99999
|
cacheExpression(target),
|
|
99992
100000
|
getNonAssignmentOperatorForCompoundAssignment(operator),
|
|
99993
|
-
|
|
100001
|
+
visitNode(right, visitor, isExpression)
|
|
99994
100002
|
),
|
|
99995
100003
|
node
|
|
99996
100004
|
)
|
|
@@ -99998,7 +100006,7 @@ function transformGenerators(context) {
|
|
|
99998
100006
|
node
|
|
99999
100007
|
);
|
|
100000
100008
|
} else {
|
|
100001
|
-
return factory2.updateBinaryExpression(node, target, node.operatorToken,
|
|
100009
|
+
return factory2.updateBinaryExpression(node, target, node.operatorToken, visitNode(right, visitor, isExpression));
|
|
100002
100010
|
}
|
|
100003
100011
|
}
|
|
100004
100012
|
return visitEachChild(node, visitor, context);
|
|
@@ -100012,9 +100020,9 @@ function transformGenerators(context) {
|
|
|
100012
100020
|
}
|
|
100013
100021
|
return factory2.updateBinaryExpression(
|
|
100014
100022
|
node,
|
|
100015
|
-
cacheExpression(
|
|
100023
|
+
cacheExpression(visitNode(node.left, visitor, isExpression)),
|
|
100016
100024
|
node.operatorToken,
|
|
100017
|
-
|
|
100025
|
+
visitNode(node.right, visitor, isExpression)
|
|
100018
100026
|
);
|
|
100019
100027
|
}
|
|
100020
100028
|
return visitEachChild(node, visitor, context);
|
|
@@ -100033,7 +100041,7 @@ function transformGenerators(context) {
|
|
|
100033
100041
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
100034
100042
|
pendingExpressions = [];
|
|
100035
100043
|
}
|
|
100036
|
-
pendingExpressions.push(
|
|
100044
|
+
pendingExpressions.push(visitNode(node2, visitor, isExpression));
|
|
100037
100045
|
}
|
|
100038
100046
|
}
|
|
100039
100047
|
}
|
|
@@ -100047,7 +100055,7 @@ function transformGenerators(context) {
|
|
|
100047
100055
|
emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]);
|
|
100048
100056
|
pendingExpressions = [];
|
|
100049
100057
|
}
|
|
100050
|
-
pendingExpressions.push(
|
|
100058
|
+
pendingExpressions.push(visitNode(elem, visitor, isExpression));
|
|
100051
100059
|
}
|
|
100052
100060
|
}
|
|
100053
100061
|
return factory2.inlineExpressions(pendingExpressions);
|
|
@@ -100057,7 +100065,7 @@ function transformGenerators(context) {
|
|
|
100057
100065
|
const resultLocal = declareLocal();
|
|
100058
100066
|
emitAssignment(
|
|
100059
100067
|
resultLocal,
|
|
100060
|
-
|
|
100068
|
+
visitNode(node.left, visitor, isExpression),
|
|
100061
100069
|
/*location*/
|
|
100062
100070
|
node.left
|
|
100063
100071
|
);
|
|
@@ -100078,7 +100086,7 @@ function transformGenerators(context) {
|
|
|
100078
100086
|
}
|
|
100079
100087
|
emitAssignment(
|
|
100080
100088
|
resultLocal,
|
|
100081
|
-
|
|
100089
|
+
visitNode(node.right, visitor, isExpression),
|
|
100082
100090
|
/*location*/
|
|
100083
100091
|
node.right
|
|
100084
100092
|
);
|
|
@@ -100092,13 +100100,13 @@ function transformGenerators(context) {
|
|
|
100092
100100
|
const resultLocal = declareLocal();
|
|
100093
100101
|
emitBreakWhenFalse(
|
|
100094
100102
|
whenFalseLabel,
|
|
100095
|
-
|
|
100103
|
+
visitNode(node.condition, visitor, isExpression),
|
|
100096
100104
|
/*location*/
|
|
100097
100105
|
node.condition
|
|
100098
100106
|
);
|
|
100099
100107
|
emitAssignment(
|
|
100100
100108
|
resultLocal,
|
|
100101
|
-
|
|
100109
|
+
visitNode(node.whenTrue, visitor, isExpression),
|
|
100102
100110
|
/*location*/
|
|
100103
100111
|
node.whenTrue
|
|
100104
100112
|
);
|
|
@@ -100106,7 +100114,7 @@ function transformGenerators(context) {
|
|
|
100106
100114
|
markLabel(whenFalseLabel);
|
|
100107
100115
|
emitAssignment(
|
|
100108
100116
|
resultLocal,
|
|
100109
|
-
|
|
100117
|
+
visitNode(node.whenFalse, visitor, isExpression),
|
|
100110
100118
|
/*location*/
|
|
100111
100119
|
node.whenFalse
|
|
100112
100120
|
);
|
|
@@ -100186,7 +100194,7 @@ function transformGenerators(context) {
|
|
|
100186
100194
|
leadingElement = void 0;
|
|
100187
100195
|
expressions2 = [];
|
|
100188
100196
|
}
|
|
100189
|
-
expressions2.push(
|
|
100197
|
+
expressions2.push(visitNode(element, visitor, isExpression));
|
|
100190
100198
|
return expressions2;
|
|
100191
100199
|
}
|
|
100192
100200
|
}
|
|
@@ -100225,8 +100233,8 @@ function transformGenerators(context) {
|
|
|
100225
100233
|
if (containsYield(node.argumentExpression)) {
|
|
100226
100234
|
return factory2.updateElementAccessExpression(
|
|
100227
100235
|
node,
|
|
100228
|
-
cacheExpression(
|
|
100229
|
-
|
|
100236
|
+
cacheExpression(visitNode(node.expression, visitor, isLeftHandSideExpression)),
|
|
100237
|
+
visitNode(node.argumentExpression, visitor, isExpression)
|
|
100230
100238
|
);
|
|
100231
100239
|
}
|
|
100232
100240
|
return visitEachChild(node, visitor, context);
|
|
@@ -100243,7 +100251,7 @@ function transformGenerators(context) {
|
|
|
100243
100251
|
return setOriginalNode(
|
|
100244
100252
|
setTextRange(
|
|
100245
100253
|
factory2.createFunctionApplyCall(
|
|
100246
|
-
cacheExpression(
|
|
100254
|
+
cacheExpression(visitNode(target, visitor, isLeftHandSideExpression)),
|
|
100247
100255
|
thisArg,
|
|
100248
100256
|
visitElements(node.arguments)
|
|
100249
100257
|
),
|
|
@@ -100261,7 +100269,7 @@ function transformGenerators(context) {
|
|
|
100261
100269
|
setTextRange(
|
|
100262
100270
|
factory2.createNewExpression(
|
|
100263
100271
|
factory2.createFunctionApplyCall(
|
|
100264
|
-
cacheExpression(
|
|
100272
|
+
cacheExpression(visitNode(target, visitor, isExpression)),
|
|
100265
100273
|
thisArg,
|
|
100266
100274
|
visitElements(
|
|
100267
100275
|
node.arguments,
|
|
@@ -100377,7 +100385,7 @@ function transformGenerators(context) {
|
|
|
100377
100385
|
return setSourceMapRange(
|
|
100378
100386
|
factory2.createAssignment(
|
|
100379
100387
|
setSourceMapRange(factory2.cloneNode(node.name), node.name),
|
|
100380
|
-
|
|
100388
|
+
visitNode(node.initializer, visitor, isExpression)
|
|
100381
100389
|
),
|
|
100382
100390
|
node
|
|
100383
100391
|
);
|
|
@@ -100389,7 +100397,7 @@ function transformGenerators(context) {
|
|
|
100389
100397
|
const elseLabel = node.elseStatement ? defineLabel() : void 0;
|
|
100390
100398
|
emitBreakWhenFalse(
|
|
100391
100399
|
node.elseStatement ? elseLabel : endLabel,
|
|
100392
|
-
|
|
100400
|
+
visitNode(node.expression, visitor, isExpression),
|
|
100393
100401
|
/*location*/
|
|
100394
100402
|
node.expression
|
|
100395
100403
|
);
|
|
@@ -100418,7 +100426,7 @@ function transformGenerators(context) {
|
|
|
100418
100426
|
markLabel(loopLabel);
|
|
100419
100427
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100420
100428
|
markLabel(conditionLabel);
|
|
100421
|
-
emitBreakWhenTrue(loopLabel,
|
|
100429
|
+
emitBreakWhenTrue(loopLabel, visitNode(node.expression, visitor, isExpression));
|
|
100422
100430
|
endLoopBlock();
|
|
100423
100431
|
} else {
|
|
100424
100432
|
emitStatement(visitNode(node, visitor, isStatement));
|
|
@@ -100439,7 +100447,7 @@ function transformGenerators(context) {
|
|
|
100439
100447
|
const loopLabel = defineLabel();
|
|
100440
100448
|
const endLabel = beginLoopBlock(loopLabel);
|
|
100441
100449
|
markLabel(loopLabel);
|
|
100442
|
-
emitBreakWhenFalse(endLabel,
|
|
100450
|
+
emitBreakWhenFalse(endLabel, visitNode(node.expression, visitor, isExpression));
|
|
100443
100451
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100444
100452
|
emitBreak(loopLabel);
|
|
100445
100453
|
endLoopBlock();
|
|
@@ -100470,7 +100478,7 @@ function transformGenerators(context) {
|
|
|
100470
100478
|
emitStatement(
|
|
100471
100479
|
setTextRange(
|
|
100472
100480
|
factory2.createExpressionStatement(
|
|
100473
|
-
|
|
100481
|
+
visitNode(initializer, visitor, isExpression)
|
|
100474
100482
|
),
|
|
100475
100483
|
initializer
|
|
100476
100484
|
)
|
|
@@ -100479,7 +100487,7 @@ function transformGenerators(context) {
|
|
|
100479
100487
|
}
|
|
100480
100488
|
markLabel(conditionLabel);
|
|
100481
100489
|
if (node.condition) {
|
|
100482
|
-
emitBreakWhenFalse(endLabel,
|
|
100490
|
+
emitBreakWhenFalse(endLabel, visitNode(node.condition, visitor, isExpression));
|
|
100483
100491
|
}
|
|
100484
100492
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100485
100493
|
markLabel(incrementLabel);
|
|
@@ -100487,7 +100495,7 @@ function transformGenerators(context) {
|
|
|
100487
100495
|
emitStatement(
|
|
100488
100496
|
setTextRange(
|
|
100489
100497
|
factory2.createExpressionStatement(
|
|
100490
|
-
|
|
100498
|
+
visitNode(node.incrementor, visitor, isExpression)
|
|
100491
100499
|
),
|
|
100492
100500
|
node.incrementor
|
|
100493
100501
|
)
|
|
@@ -100532,7 +100540,7 @@ function transformGenerators(context) {
|
|
|
100532
100540
|
const keysIndex = factory2.createLoopVariable();
|
|
100533
100541
|
const initializer = node.initializer;
|
|
100534
100542
|
hoistVariableDeclaration(keysIndex);
|
|
100535
|
-
emitAssignment(obj,
|
|
100543
|
+
emitAssignment(obj, visitNode(node.expression, visitor, isExpression));
|
|
100536
100544
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
100537
100545
|
emitStatement(
|
|
100538
100546
|
factory2.createForInStatement(
|
|
@@ -100563,7 +100571,7 @@ function transformGenerators(context) {
|
|
|
100563
100571
|
}
|
|
100564
100572
|
variable = factory2.cloneNode(initializer.declarations[0].name);
|
|
100565
100573
|
} else {
|
|
100566
|
-
variable =
|
|
100574
|
+
variable = visitNode(initializer, visitor, isExpression);
|
|
100567
100575
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
100568
100576
|
}
|
|
100569
100577
|
emitAssignment(variable, key);
|
|
@@ -100588,8 +100596,8 @@ function transformGenerators(context) {
|
|
|
100588
100596
|
node = factory2.updateForInStatement(
|
|
100589
100597
|
node,
|
|
100590
100598
|
initializer.declarations[0].name,
|
|
100591
|
-
|
|
100592
|
-
|
|
100599
|
+
visitNode(node.expression, visitor, isExpression),
|
|
100600
|
+
visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)
|
|
100593
100601
|
);
|
|
100594
100602
|
} else {
|
|
100595
100603
|
node = visitEachChild(node, visitor, context);
|
|
@@ -100665,7 +100673,7 @@ function transformGenerators(context) {
|
|
|
100665
100673
|
}
|
|
100666
100674
|
function transformAndEmitWithStatement(node) {
|
|
100667
100675
|
if (containsYield(node)) {
|
|
100668
|
-
beginWithBlock(cacheExpression(
|
|
100676
|
+
beginWithBlock(cacheExpression(visitNode(node.expression, visitor, isExpression)));
|
|
100669
100677
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
100670
100678
|
endWithBlock();
|
|
100671
100679
|
} else {
|
|
@@ -100677,7 +100685,7 @@ function transformGenerators(context) {
|
|
|
100677
100685
|
const caseBlock = node.caseBlock;
|
|
100678
100686
|
const numClauses = caseBlock.clauses.length;
|
|
100679
100687
|
const endLabel = beginSwitchBlock();
|
|
100680
|
-
const expression = cacheExpression(
|
|
100688
|
+
const expression = cacheExpression(visitNode(node.expression, visitor, isExpression));
|
|
100681
100689
|
const clauseLabels = [];
|
|
100682
100690
|
let defaultClauseIndex = -1;
|
|
100683
100691
|
for (let i = 0; i < numClauses; i++) {
|
|
@@ -100699,7 +100707,7 @@ function transformGenerators(context) {
|
|
|
100699
100707
|
}
|
|
100700
100708
|
pendingClauses.push(
|
|
100701
100709
|
factory2.createCaseClause(
|
|
100702
|
-
|
|
100710
|
+
visitNode(clause.expression, visitor, isExpression),
|
|
100703
100711
|
[
|
|
100704
100712
|
createInlineBreak(
|
|
100705
100713
|
clauseLabels[i],
|
|
@@ -100769,7 +100777,7 @@ function transformGenerators(context) {
|
|
|
100769
100777
|
function transformAndEmitThrowStatement(node) {
|
|
100770
100778
|
var _a2;
|
|
100771
100779
|
emitThrow(
|
|
100772
|
-
|
|
100780
|
+
visitNode((_a2 = node.expression) != null ? _a2 : factory2.createVoidZero(), visitor, isExpression),
|
|
100773
100781
|
/*location*/
|
|
100774
100782
|
node
|
|
100775
100783
|
);
|
|
@@ -102053,7 +102061,7 @@ function transformModule(context) {
|
|
|
102053
102061
|
}
|
|
102054
102062
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
102055
102063
|
if (currentModuleInfo.exportEquals) {
|
|
102056
|
-
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor
|
|
102064
|
+
const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
102057
102065
|
if (expressionResult) {
|
|
102058
102066
|
if (emitAsReturn) {
|
|
102059
102067
|
const statement = factory2.createReturnStatement(expressionResult);
|
|
@@ -102093,9 +102101,9 @@ function transformModule(context) {
|
|
|
102093
102101
|
return visitFunctionDeclaration(node);
|
|
102094
102102
|
case 260 /* ClassDeclaration */:
|
|
102095
102103
|
return visitClassDeclaration(node);
|
|
102096
|
-
case
|
|
102104
|
+
case 358 /* MergeDeclarationMarker */:
|
|
102097
102105
|
return visitMergeDeclarationMarker(node);
|
|
102098
|
-
case
|
|
102106
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
102099
102107
|
return visitEndOfDeclarationMarker(node);
|
|
102100
102108
|
default:
|
|
102101
102109
|
return visitor(node);
|
|
@@ -102112,7 +102120,7 @@ function transformModule(context) {
|
|
|
102112
102120
|
return visitExpressionStatement(node);
|
|
102113
102121
|
case 214 /* ParenthesizedExpression */:
|
|
102114
102122
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
102115
|
-
case
|
|
102123
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
102116
102124
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
102117
102125
|
case 210 /* CallExpression */:
|
|
102118
102126
|
if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
|
|
@@ -102248,7 +102256,7 @@ function transformModule(context) {
|
|
|
102248
102256
|
}
|
|
102249
102257
|
function visitImportCallExpression(node) {
|
|
102250
102258
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
102251
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor
|
|
102259
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
102252
102260
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
102253
102261
|
const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */);
|
|
102254
102262
|
switch (compilerOptions.module) {
|
|
@@ -102777,7 +102785,7 @@ function transformModule(context) {
|
|
|
102777
102785
|
deferredExports[id] = appendExportStatement(
|
|
102778
102786
|
deferredExports[id],
|
|
102779
102787
|
factory2.createIdentifier("default"),
|
|
102780
|
-
visitNode(node.expression, visitor
|
|
102788
|
+
visitNode(node.expression, visitor),
|
|
102781
102789
|
/*location*/
|
|
102782
102790
|
node,
|
|
102783
102791
|
/*allowComments*/
|
|
@@ -102787,7 +102795,7 @@ function transformModule(context) {
|
|
|
102787
102795
|
statements = appendExportStatement(
|
|
102788
102796
|
statements,
|
|
102789
102797
|
factory2.createIdentifier("default"),
|
|
102790
|
-
visitNode(node.expression, visitor
|
|
102798
|
+
visitNode(node.expression, visitor),
|
|
102791
102799
|
/*location*/
|
|
102792
102800
|
node,
|
|
102793
102801
|
/*allowComments*/
|
|
@@ -102815,7 +102823,7 @@ function transformModule(context) {
|
|
|
102815
102823
|
),
|
|
102816
102824
|
/*typeParameters*/
|
|
102817
102825
|
void 0,
|
|
102818
|
-
visitNodes2(node.parameters, visitor
|
|
102826
|
+
visitNodes2(node.parameters, visitor),
|
|
102819
102827
|
/*type*/
|
|
102820
102828
|
void 0,
|
|
102821
102829
|
visitEachChild(node.body, visitor, context)
|
|
@@ -102856,8 +102864,8 @@ function transformModule(context) {
|
|
|
102856
102864
|
),
|
|
102857
102865
|
/*typeParameters*/
|
|
102858
102866
|
void 0,
|
|
102859
|
-
visitNodes2(node.heritageClauses, visitor
|
|
102860
|
-
visitNodes2(node.members, visitor
|
|
102867
|
+
visitNodes2(node.heritageClauses, visitor),
|
|
102868
|
+
visitNodes2(node.members, visitor)
|
|
102861
102869
|
),
|
|
102862
102870
|
node
|
|
102863
102871
|
),
|
|
@@ -102905,7 +102913,7 @@ function transformModule(context) {
|
|
|
102905
102913
|
variable.name,
|
|
102906
102914
|
variable.exclamationToken,
|
|
102907
102915
|
variable.type,
|
|
102908
|
-
visitNode(variable.initializer, visitor
|
|
102916
|
+
visitNode(variable.initializer, visitor)
|
|
102909
102917
|
);
|
|
102910
102918
|
variables = append(variables, updatedVariable);
|
|
102911
102919
|
expressions = append(expressions, expression);
|
|
@@ -102956,8 +102964,9 @@ function transformModule(context) {
|
|
|
102956
102964
|
function transformInitializedVariable(node) {
|
|
102957
102965
|
if (isBindingPattern(node.name)) {
|
|
102958
102966
|
return flattenDestructuringAssignment(
|
|
102959
|
-
visitNode(node, visitor
|
|
102960
|
-
visitor
|
|
102967
|
+
visitNode(node, visitor),
|
|
102968
|
+
/*visitor*/
|
|
102969
|
+
void 0,
|
|
102961
102970
|
context,
|
|
102962
102971
|
0 /* All */,
|
|
102963
102972
|
/*needsValue*/
|
|
@@ -102974,7 +102983,7 @@ function transformModule(context) {
|
|
|
102974
102983
|
/*location*/
|
|
102975
102984
|
node.name
|
|
102976
102985
|
),
|
|
102977
|
-
node.initializer ? visitNode(node.initializer, visitor
|
|
102986
|
+
node.initializer ? visitNode(node.initializer, visitor) : factory2.createVoidZero()
|
|
102978
102987
|
);
|
|
102979
102988
|
}
|
|
102980
102989
|
}
|
|
@@ -103917,7 +103926,7 @@ function transformSystemModule(context) {
|
|
|
103917
103926
|
),
|
|
103918
103927
|
/*typeParameters*/
|
|
103919
103928
|
void 0,
|
|
103920
|
-
visitNodes2(node.parameters, visitor,
|
|
103929
|
+
visitNodes2(node.parameters, visitor, isParameterDeclaration),
|
|
103921
103930
|
/*type*/
|
|
103922
103931
|
void 0,
|
|
103923
103932
|
visitNode(node.body, visitor, isBlock)
|
|
@@ -104227,9 +104236,9 @@ function transformSystemModule(context) {
|
|
|
104227
104236
|
return visitCatchClause(node);
|
|
104228
104237
|
case 238 /* Block */:
|
|
104229
104238
|
return visitBlock(node);
|
|
104230
|
-
case
|
|
104239
|
+
case 358 /* MergeDeclarationMarker */:
|
|
104231
104240
|
return visitMergeDeclarationMarker(node);
|
|
104232
|
-
case
|
|
104241
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
104233
104242
|
return visitEndOfDeclarationMarker(node);
|
|
104234
104243
|
default:
|
|
104235
104244
|
return visitor(node);
|
|
@@ -104291,7 +104300,7 @@ function transformSystemModule(context) {
|
|
|
104291
104300
|
}
|
|
104292
104301
|
return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression();
|
|
104293
104302
|
} else {
|
|
104294
|
-
return visitNode(node, discardedValueVisitor,
|
|
104303
|
+
return visitNode(node, discardedValueVisitor, isExpression);
|
|
104295
104304
|
}
|
|
104296
104305
|
}
|
|
104297
104306
|
function visitDoStatement(node) {
|
|
@@ -104312,21 +104321,21 @@ function transformSystemModule(context) {
|
|
|
104312
104321
|
return factory2.updateLabeledStatement(
|
|
104313
104322
|
node,
|
|
104314
104323
|
node.label,
|
|
104315
|
-
|
|
104324
|
+
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
104316
104325
|
);
|
|
104317
104326
|
}
|
|
104318
104327
|
function visitWithStatement(node) {
|
|
104319
104328
|
return factory2.updateWithStatement(
|
|
104320
104329
|
node,
|
|
104321
104330
|
visitNode(node.expression, visitor, isExpression),
|
|
104322
|
-
|
|
104331
|
+
visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
|
|
104323
104332
|
);
|
|
104324
104333
|
}
|
|
104325
104334
|
function visitSwitchStatement(node) {
|
|
104326
104335
|
return factory2.updateSwitchStatement(
|
|
104327
104336
|
node,
|
|
104328
104337
|
visitNode(node.expression, visitor, isExpression),
|
|
104329
|
-
|
|
104338
|
+
visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)
|
|
104330
104339
|
);
|
|
104331
104340
|
}
|
|
104332
104341
|
function visitCaseBlock(node) {
|
|
@@ -104358,7 +104367,7 @@ function transformSystemModule(context) {
|
|
|
104358
104367
|
node = factory2.updateCatchClause(
|
|
104359
104368
|
node,
|
|
104360
104369
|
node.variableDeclaration,
|
|
104361
|
-
|
|
104370
|
+
visitNode(node.block, topLevelNestedVisitor, isBlock)
|
|
104362
104371
|
);
|
|
104363
104372
|
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
|
|
104364
104373
|
return node;
|
|
@@ -104385,7 +104394,7 @@ function transformSystemModule(context) {
|
|
|
104385
104394
|
return visitExpressionStatement(node);
|
|
104386
104395
|
case 214 /* ParenthesizedExpression */:
|
|
104387
104396
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
104388
|
-
case
|
|
104397
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
104389
104398
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
104390
104399
|
case 223 /* BinaryExpression */:
|
|
104391
104400
|
if (isDestructuringAssignment(node)) {
|
|
@@ -104428,7 +104437,7 @@ function transformSystemModule(context) {
|
|
|
104428
104437
|
}
|
|
104429
104438
|
function visitImportCallExpression(node) {
|
|
104430
104439
|
const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions);
|
|
104431
|
-
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor
|
|
104440
|
+
const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor);
|
|
104432
104441
|
const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
104433
104442
|
return factory2.createCallExpression(
|
|
104434
104443
|
factory2.createPropertyAccessExpression(
|
|
@@ -105549,7 +105558,7 @@ function transformDeclarations(context) {
|
|
|
105549
105558
|
sourceFile,
|
|
105550
105559
|
/*bundled*/
|
|
105551
105560
|
true
|
|
105552
|
-
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements
|
|
105561
|
+
)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
105553
105562
|
const newFile = factory2.updateSourceFile(
|
|
105554
105563
|
sourceFile,
|
|
105555
105564
|
[factory2.createModuleDeclaration(
|
|
@@ -105571,7 +105580,7 @@ function transformDeclarations(context) {
|
|
|
105571
105580
|
return newFile;
|
|
105572
105581
|
}
|
|
105573
105582
|
needsDeclare = true;
|
|
105574
|
-
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements
|
|
105583
|
+
const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements);
|
|
105575
105584
|
return factory2.updateSourceFile(
|
|
105576
105585
|
sourceFile,
|
|
105577
105586
|
transformAndReplaceLatePaintedStatements(updated2),
|
|
@@ -105640,7 +105649,7 @@ function transformDeclarations(context) {
|
|
|
105640
105649
|
refs.forEach(referenceVisitor);
|
|
105641
105650
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
105642
105651
|
} else {
|
|
105643
|
-
const statements = visitNodes2(node.statements, visitDeclarationStatements
|
|
105652
|
+
const statements = visitNodes2(node.statements, visitDeclarationStatements);
|
|
105644
105653
|
combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
105645
105654
|
refs.forEach(referenceVisitor);
|
|
105646
105655
|
emittedImports = filter(combinedStatements, isAnyImportSyntax);
|
|
@@ -105757,9 +105766,9 @@ function transformDeclarations(context) {
|
|
|
105757
105766
|
return name;
|
|
105758
105767
|
} else {
|
|
105759
105768
|
if (name.kind === 204 /* ArrayBindingPattern */) {
|
|
105760
|
-
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement
|
|
105769
|
+
return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
105761
105770
|
} else {
|
|
105762
|
-
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement
|
|
105771
|
+
return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement));
|
|
105763
105772
|
}
|
|
105764
105773
|
}
|
|
105765
105774
|
function visitBindingElement(elem) {
|
|
@@ -105829,10 +105838,10 @@ function transformDeclarations(context) {
|
|
|
105829
105838
|
}
|
|
105830
105839
|
const shouldUseResolverType = node.kind === 166 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node));
|
|
105831
105840
|
if (type && !shouldUseResolverType) {
|
|
105832
|
-
return visitNode(type, visitDeclarationSubtree
|
|
105841
|
+
return visitNode(type, visitDeclarationSubtree);
|
|
105833
105842
|
}
|
|
105834
105843
|
if (!getParseTreeNode(node)) {
|
|
105835
|
-
return type ? visitNode(type, visitDeclarationSubtree
|
|
105844
|
+
return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
105836
105845
|
}
|
|
105837
105846
|
if (node.kind === 175 /* SetAccessor */) {
|
|
105838
105847
|
return factory2.createKeywordTypeNode(131 /* AnyKeyword */);
|
|
@@ -105946,7 +105955,7 @@ function transformDeclarations(context) {
|
|
|
105946
105955
|
return factory2.createNodeArray(newParams || emptyArray);
|
|
105947
105956
|
}
|
|
105948
105957
|
function ensureTypeParams(node, params) {
|
|
105949
|
-
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree
|
|
105958
|
+
return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree);
|
|
105950
105959
|
}
|
|
105951
105960
|
function isEnclosingDeclaration(node) {
|
|
105952
105961
|
return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node);
|
|
@@ -106081,7 +106090,7 @@ function transformDeclarations(context) {
|
|
|
106081
106090
|
needsDeclare = priorNeedsDeclare;
|
|
106082
106091
|
lateStatementReplacementMap.set(getOriginalNodeId(i), result);
|
|
106083
106092
|
}
|
|
106084
|
-
return visitNodes2(statements, visitLateVisibilityMarkedStatements
|
|
106093
|
+
return visitNodes2(statements, visitLateVisibilityMarkedStatements);
|
|
106085
106094
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
106086
106095
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
106087
106096
|
const key = getOriginalNodeId(statement);
|
|
@@ -106295,7 +106304,7 @@ function transformDeclarations(context) {
|
|
|
106295
106304
|
input,
|
|
106296
106305
|
ensureModifiers(input),
|
|
106297
106306
|
updateParamsList(input, input.parameters),
|
|
106298
|
-
visitNode(input.type, visitDeclarationSubtree
|
|
106307
|
+
visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
106299
106308
|
));
|
|
106300
106309
|
}
|
|
106301
106310
|
case 257 /* VariableDeclaration */: {
|
|
@@ -106328,24 +106337,20 @@ function transformDeclarations(context) {
|
|
|
106328
106337
|
return cleanup(visitEachChild(input, visitDeclarationSubtree, context));
|
|
106329
106338
|
}
|
|
106330
106339
|
case 191 /* ConditionalType */: {
|
|
106331
|
-
const checkType = visitNode(input.checkType, visitDeclarationSubtree
|
|
106332
|
-
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree
|
|
106340
|
+
const checkType = visitNode(input.checkType, visitDeclarationSubtree);
|
|
106341
|
+
const extendsType = visitNode(input.extendsType, visitDeclarationSubtree);
|
|
106333
106342
|
const oldEnclosingDecl = enclosingDeclaration;
|
|
106334
106343
|
enclosingDeclaration = input.trueType;
|
|
106335
|
-
const trueType = visitNode(input.trueType, visitDeclarationSubtree
|
|
106344
|
+
const trueType = visitNode(input.trueType, visitDeclarationSubtree);
|
|
106336
106345
|
enclosingDeclaration = oldEnclosingDecl;
|
|
106337
|
-
const falseType = visitNode(input.falseType, visitDeclarationSubtree
|
|
106338
|
-
Debug.assert(checkType);
|
|
106339
|
-
Debug.assert(extendsType);
|
|
106340
|
-
Debug.assert(trueType);
|
|
106341
|
-
Debug.assert(falseType);
|
|
106346
|
+
const falseType = visitNode(input.falseType, visitDeclarationSubtree);
|
|
106342
106347
|
return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
106343
106348
|
}
|
|
106344
106349
|
case 181 /* FunctionType */: {
|
|
106345
|
-
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree
|
|
106350
|
+
return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
106346
106351
|
}
|
|
106347
106352
|
case 182 /* ConstructorType */: {
|
|
106348
|
-
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree
|
|
106353
|
+
return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
|
|
106349
106354
|
}
|
|
106350
106355
|
case 202 /* ImportType */: {
|
|
106351
106356
|
if (!isLiteralImportTypeNode(input))
|
|
@@ -106489,7 +106494,7 @@ function transformDeclarations(context) {
|
|
|
106489
106494
|
ensureModifiers(input),
|
|
106490
106495
|
input.name,
|
|
106491
106496
|
visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration),
|
|
106492
|
-
|
|
106497
|
+
visitNode(input.type, visitDeclarationSubtree, isTypeNode)
|
|
106493
106498
|
));
|
|
106494
106499
|
needsDeclare = previousNeedsDeclare;
|
|
106495
106500
|
return clean2;
|
|
@@ -106501,7 +106506,7 @@ function transformDeclarations(context) {
|
|
|
106501
106506
|
input.name,
|
|
106502
106507
|
ensureTypeParams(input, input.typeParameters),
|
|
106503
106508
|
transformHeritageClauses(input.heritageClauses),
|
|
106504
|
-
visitNodes2(input.members, visitDeclarationSubtree
|
|
106509
|
+
visitNodes2(input.members, visitDeclarationSubtree)
|
|
106505
106510
|
));
|
|
106506
106511
|
}
|
|
106507
106512
|
case 259 /* FunctionDeclaration */: {
|
|
@@ -106618,7 +106623,7 @@ function transformDeclarations(context) {
|
|
|
106618
106623
|
const oldHasScopeFix = resultHasScopeMarker;
|
|
106619
106624
|
resultHasScopeMarker = false;
|
|
106620
106625
|
needsScopeFixMarker = false;
|
|
106621
|
-
const statements = visitNodes2(inner.statements, visitDeclarationStatements
|
|
106626
|
+
const statements = visitNodes2(inner.statements, visitDeclarationStatements);
|
|
106622
106627
|
let lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
106623
106628
|
if (input.flags & 16777216 /* Ambient */) {
|
|
106624
106629
|
needsScopeFixMarker = false;
|
|
@@ -106627,7 +106632,7 @@ function transformDeclarations(context) {
|
|
|
106627
106632
|
if (needsScopeFixMarker) {
|
|
106628
106633
|
lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]);
|
|
106629
106634
|
} else {
|
|
106630
|
-
lateStatements = visitNodes2(lateStatements, stripExportModifiers
|
|
106635
|
+
lateStatements = visitNodes2(lateStatements, stripExportModifiers);
|
|
106631
106636
|
}
|
|
106632
106637
|
}
|
|
106633
106638
|
const body = factory2.updateModuleBlock(inner, lateStatements);
|
|
@@ -106723,7 +106728,7 @@ function transformDeclarations(context) {
|
|
|
106723
106728
|
void 0
|
|
106724
106729
|
)
|
|
106725
106730
|
] : void 0;
|
|
106726
|
-
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree
|
|
106731
|
+
const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree));
|
|
106727
106732
|
const members = factory2.createNodeArray(memberNodes);
|
|
106728
106733
|
const extendsClause = getEffectiveBaseTypeNode(input);
|
|
106729
106734
|
if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 104 /* NullKeyword */) {
|
|
@@ -106747,11 +106752,11 @@ function transformDeclarations(context) {
|
|
|
106747
106752
|
if (clause.token === 94 /* ExtendsKeyword */) {
|
|
106748
106753
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
106749
106754
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
106750
|
-
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree
|
|
106755
|
+
const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree))));
|
|
106751
106756
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
106752
106757
|
return newClause;
|
|
106753
106758
|
}
|
|
106754
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree
|
|
106759
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 104 /* NullKeyword */)), visitDeclarationSubtree));
|
|
106755
106760
|
}));
|
|
106756
106761
|
return [statement, cleanup(factory2.updateClassDeclaration(
|
|
106757
106762
|
input,
|
|
@@ -106807,7 +106812,7 @@ function transformDeclarations(context) {
|
|
|
106807
106812
|
function transformVariableStatement(input) {
|
|
106808
106813
|
if (!forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
106809
106814
|
return;
|
|
106810
|
-
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree
|
|
106815
|
+
const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree);
|
|
106811
106816
|
if (!length(nodes))
|
|
106812
106817
|
return;
|
|
106813
106818
|
return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -106898,7 +106903,7 @@ function transformDeclarations(context) {
|
|
|
106898
106903
|
function transformHeritageClauses(nodes) {
|
|
106899
106904
|
return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => {
|
|
106900
106905
|
return isEntityNameExpression(t.expression) || clause.token === 94 /* ExtendsKeyword */ && t.expression.kind === 104 /* NullKeyword */;
|
|
106901
|
-
})), visitDeclarationSubtree
|
|
106906
|
+
})), visitDeclarationSubtree))), (clause) => clause.types && !!clause.types.length));
|
|
106902
106907
|
}
|
|
106903
106908
|
}
|
|
106904
106909
|
function isAlwaysType(node) {
|
|
@@ -107076,7 +107081,7 @@ function noEmitNotification(hint, node, callback) {
|
|
|
107076
107081
|
}
|
|
107077
107082
|
function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
107078
107083
|
var _a2, _b;
|
|
107079
|
-
const enabledSyntaxKindFeatures = new Array(
|
|
107084
|
+
const enabledSyntaxKindFeatures = new Array(361 /* Count */);
|
|
107080
107085
|
let lexicalEnvironmentVariableDeclarations;
|
|
107081
107086
|
let lexicalEnvironmentFunctionDeclarations;
|
|
107082
107087
|
let lexicalEnvironmentStatements;
|
|
@@ -108961,6 +108966,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108961
108966
|
case 346 /* JSDocThisTag */:
|
|
108962
108967
|
case 347 /* JSDocTypeTag */:
|
|
108963
108968
|
case 352 /* JSDocThrowsTag */:
|
|
108969
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
108964
108970
|
return emitJSDocSimpleTypedTag(node);
|
|
108965
108971
|
case 348 /* JSDocTemplateTag */:
|
|
108966
108972
|
return emitJSDocTemplateTag(node);
|
|
@@ -108968,9 +108974,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108968
108974
|
return emitJSDocTypedefTag(node);
|
|
108969
108975
|
case 350 /* JSDocSeeTag */:
|
|
108970
108976
|
return emitJSDocSeeTag(node);
|
|
108971
|
-
case
|
|
108972
|
-
case
|
|
108973
|
-
case
|
|
108977
|
+
case 355 /* NotEmittedStatement */:
|
|
108978
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
108979
|
+
case 358 /* MergeDeclarationMarker */:
|
|
108974
108980
|
return;
|
|
108975
108981
|
}
|
|
108976
108982
|
if (isExpression(node)) {
|
|
@@ -109069,18 +109075,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
109069
109075
|
return emitJsxSelfClosingElement(node);
|
|
109070
109076
|
case 285 /* JsxFragment */:
|
|
109071
109077
|
return emitJsxFragment(node);
|
|
109072
|
-
case
|
|
109078
|
+
case 354 /* SyntaxList */:
|
|
109073
109079
|
return Debug.fail("SyntaxList should not be printed");
|
|
109074
|
-
case
|
|
109080
|
+
case 355 /* NotEmittedStatement */:
|
|
109075
109081
|
return;
|
|
109076
|
-
case
|
|
109082
|
+
case 356 /* PartiallyEmittedExpression */:
|
|
109077
109083
|
return emitPartiallyEmittedExpression(node);
|
|
109078
|
-
case
|
|
109084
|
+
case 357 /* CommaListExpression */:
|
|
109079
109085
|
return emitCommaList(node);
|
|
109080
|
-
case
|
|
109081
|
-
case
|
|
109086
|
+
case 358 /* MergeDeclarationMarker */:
|
|
109087
|
+
case 359 /* EndOfDeclarationMarker */:
|
|
109082
109088
|
return;
|
|
109083
|
-
case
|
|
109089
|
+
case 360 /* SyntheticReferenceExpression */:
|
|
109084
109090
|
return Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
109085
109091
|
}
|
|
109086
109092
|
}
|
|
@@ -112328,7 +112334,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112328
112334
|
emitLeadingComments(
|
|
112329
112335
|
pos,
|
|
112330
112336
|
/*isEmittedNode*/
|
|
112331
|
-
node.kind !==
|
|
112337
|
+
node.kind !== 355 /* NotEmittedStatement */
|
|
112332
112338
|
);
|
|
112333
112339
|
}
|
|
112334
112340
|
if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
|
|
@@ -112352,7 +112358,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112352
112358
|
containerPos = savedContainerPos;
|
|
112353
112359
|
containerEnd = savedContainerEnd;
|
|
112354
112360
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
112355
|
-
if (!skipTrailingComments && node.kind !==
|
|
112361
|
+
if (!skipTrailingComments && node.kind !== 355 /* NotEmittedStatement */) {
|
|
112356
112362
|
emitTrailingComments(end);
|
|
112357
112363
|
}
|
|
112358
112364
|
}
|
|
@@ -112624,7 +112630,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112624
112630
|
}
|
|
112625
112631
|
} else {
|
|
112626
112632
|
const source = sourceMapRange.source || sourceMapSource;
|
|
112627
|
-
if (node.kind !==
|
|
112633
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
|
|
112628
112634
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
112629
112635
|
}
|
|
112630
112636
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
@@ -112639,7 +112645,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112639
112645
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
112640
112646
|
sourceMapsDisabled = false;
|
|
112641
112647
|
}
|
|
112642
|
-
if (node.kind !==
|
|
112648
|
+
if (node.kind !== 355 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
|
|
112643
112649
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
112644
112650
|
}
|
|
112645
112651
|
}
|
|
@@ -119641,9 +119647,6 @@ function getFilesInErrorForSummary(diagnostics) {
|
|
|
119641
119647
|
}
|
|
119642
119648
|
);
|
|
119643
119649
|
return filesInError.map((fileName) => {
|
|
119644
|
-
if (fileName === void 0) {
|
|
119645
|
-
return void 0;
|
|
119646
|
-
}
|
|
119647
119650
|
const diagnosticForFileName = find(
|
|
119648
119651
|
diagnostics,
|
|
119649
119652
|
(diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName
|
|
@@ -120317,8 +120320,6 @@ function createWatchProgram(host) {
|
|
|
120317
120320
|
parseConfigFile2();
|
|
120318
120321
|
newLine = updateNewLine();
|
|
120319
120322
|
}
|
|
120320
|
-
Debug.assert(compilerOptions);
|
|
120321
|
-
Debug.assert(rootFileNames);
|
|
120322
120323
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions);
|
|
120323
120324
|
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
120324
120325
|
writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`);
|
|
@@ -120421,8 +120422,6 @@ function createWatchProgram(host) {
|
|
|
120421
120422
|
}
|
|
120422
120423
|
function synchronizeProgram() {
|
|
120423
120424
|
writeLog(`Synchronizing program`);
|
|
120424
|
-
Debug.assert(compilerOptions);
|
|
120425
|
-
Debug.assert(rootFileNames);
|
|
120426
120425
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
120427
120426
|
const program = getCurrentBuilderProgram();
|
|
120428
120427
|
if (hasChangedCompilerOptions) {
|
|
@@ -120662,8 +120661,6 @@ function createWatchProgram(host) {
|
|
|
120662
120661
|
}
|
|
120663
120662
|
function reloadFileNamesFromConfigFile() {
|
|
120664
120663
|
writeLog("Reloading new file names and options");
|
|
120665
|
-
Debug.assert(compilerOptions);
|
|
120666
|
-
Debug.assert(configFileName);
|
|
120667
120664
|
reloadLevel = 0 /* None */;
|
|
120668
120665
|
rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
120669
120666
|
if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -120672,7 +120669,6 @@ function createWatchProgram(host) {
|
|
|
120672
120669
|
synchronizeProgram();
|
|
120673
120670
|
}
|
|
120674
120671
|
function reloadConfigFile() {
|
|
120675
|
-
Debug.assert(configFileName);
|
|
120676
120672
|
writeLog(`Reloading config file: ${configFileName}`);
|
|
120677
120673
|
reloadLevel = 0 /* None */;
|
|
120678
120674
|
if (cachedDirectoryStructureHost) {
|
|
@@ -120685,7 +120681,6 @@ function createWatchProgram(host) {
|
|
|
120685
120681
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
120686
120682
|
}
|
|
120687
120683
|
function parseConfigFile2() {
|
|
120688
|
-
Debug.assert(configFileName);
|
|
120689
120684
|
setConfigFileParsingResult(getParsedCommandLineOfConfigFile(
|
|
120690
120685
|
configFileName,
|
|
120691
120686
|
optionsToExtendForConfigFile,
|
|
@@ -120713,7 +120708,6 @@ function createWatchProgram(host) {
|
|
|
120713
120708
|
return config.parsedCommandLine;
|
|
120714
120709
|
if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) {
|
|
120715
120710
|
writeLog("Reloading new file names and options");
|
|
120716
|
-
Debug.assert(compilerOptions);
|
|
120717
120711
|
const fileNames = getFileNamesFromConfigSpecs(
|
|
120718
120712
|
config.parsedCommandLine.options.configFile.configFileSpecs,
|
|
120719
120713
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
|
|
@@ -120805,8 +120799,7 @@ function createWatchProgram(host) {
|
|
|
120805
120799
|
return watchDirectory(
|
|
120806
120800
|
directory,
|
|
120807
120801
|
(fileOrDirectory) => {
|
|
120808
|
-
Debug.assert(configFileName);
|
|
120809
|
-
Debug.assert(compilerOptions);
|
|
120802
|
+
Debug.assert(!!configFileName);
|
|
120810
120803
|
const fileOrDirectoryPath = toPath3(fileOrDirectory);
|
|
120811
120804
|
if (cachedDirectoryStructureHost) {
|
|
120812
120805
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -120837,7 +120830,6 @@ function createWatchProgram(host) {
|
|
|
120837
120830
|
);
|
|
120838
120831
|
}
|
|
120839
120832
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
120840
|
-
Debug.assert(configFileName);
|
|
120841
120833
|
updateSharedExtendedConfigFileWatcher(
|
|
120842
120834
|
forProjectPath,
|
|
120843
120835
|
options,
|
|
@@ -124339,6 +124331,8 @@ __export(ts_exports3, {
|
|
|
124339
124331
|
getJSDocReturnTag: () => getJSDocReturnTag,
|
|
124340
124332
|
getJSDocReturnType: () => getJSDocReturnType,
|
|
124341
124333
|
getJSDocRoot: () => getJSDocRoot,
|
|
124334
|
+
getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType,
|
|
124335
|
+
getJSDocSatisfiesTag: () => getJSDocSatisfiesTag,
|
|
124342
124336
|
getJSDocTags: () => getJSDocTags,
|
|
124343
124337
|
getJSDocTagsNoCache: () => getJSDocTagsNoCache,
|
|
124344
124338
|
getJSDocTemplateTag: () => getJSDocTemplateTag,
|
|
@@ -124678,7 +124672,6 @@ __export(ts_exports3, {
|
|
|
124678
124672
|
isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess,
|
|
124679
124673
|
isArray: () => isArray,
|
|
124680
124674
|
isArrayBindingElement: () => isArrayBindingElement,
|
|
124681
|
-
isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement,
|
|
124682
124675
|
isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern,
|
|
124683
124676
|
isArrayBindingPattern: () => isArrayBindingPattern,
|
|
124684
124677
|
isArrayLiteralExpression: () => isArrayLiteralExpression,
|
|
@@ -124711,7 +124704,6 @@ __export(ts_exports3, {
|
|
|
124711
124704
|
isBindableStaticNameExpression: () => isBindableStaticNameExpression,
|
|
124712
124705
|
isBindingElement: () => isBindingElement,
|
|
124713
124706
|
isBindingName: () => isBindingName,
|
|
124714
|
-
isBindingOrAssignmentElement: () => isBindingOrAssignmentElement,
|
|
124715
124707
|
isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern,
|
|
124716
124708
|
isBindingPattern: () => isBindingPattern,
|
|
124717
124709
|
isBlock: () => isBlock,
|
|
@@ -124918,7 +124910,6 @@ __export(ts_exports3, {
|
|
|
124918
124910
|
isInferTypeNode: () => isInferTypeNode,
|
|
124919
124911
|
isInfinityOrNaNString: () => isInfinityOrNaNString,
|
|
124920
124912
|
isInitializedProperty: () => isInitializedProperty,
|
|
124921
|
-
isInitializedVariable: () => isInitializedVariable,
|
|
124922
124913
|
isInsideJsxElement: () => isInsideJsxElement,
|
|
124923
124914
|
isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute,
|
|
124924
124915
|
isInsideNodeModules: () => isInsideNodeModules,
|
|
@@ -124968,6 +124959,8 @@ __export(ts_exports3, {
|
|
|
124968
124959
|
isJSDocPublicTag: () => isJSDocPublicTag,
|
|
124969
124960
|
isJSDocReadonlyTag: () => isJSDocReadonlyTag,
|
|
124970
124961
|
isJSDocReturnTag: () => isJSDocReturnTag,
|
|
124962
|
+
isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression,
|
|
124963
|
+
isJSDocSatisfiesTag: () => isJSDocSatisfiesTag,
|
|
124971
124964
|
isJSDocSeeTag: () => isJSDocSeeTag,
|
|
124972
124965
|
isJSDocSignature: () => isJSDocSignature,
|
|
124973
124966
|
isJSDocTag: () => isJSDocTag,
|
|
@@ -125023,12 +125016,13 @@ __export(ts_exports3, {
|
|
|
125023
125016
|
isLiteralLikeElementAccess: () => isLiteralLikeElementAccess,
|
|
125024
125017
|
isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
125025
125018
|
isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression,
|
|
125026
|
-
isLiteralTypeLiteral: () => isLiteralTypeLiteral,
|
|
125027
125019
|
isLiteralTypeNode: () => isLiteralTypeNode,
|
|
125028
125020
|
isLocalName: () => isLocalName,
|
|
125029
125021
|
isLogicalOperator: () => isLogicalOperator,
|
|
125030
125022
|
isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression,
|
|
125031
125023
|
isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator,
|
|
125024
|
+
isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression,
|
|
125025
|
+
isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator,
|
|
125032
125026
|
isMappedTypeNode: () => isMappedTypeNode,
|
|
125033
125027
|
isMemberName: () => isMemberName,
|
|
125034
125028
|
isMergeDeclarationMarker: () => isMergeDeclarationMarker,
|
|
@@ -125714,6 +125708,7 @@ __export(ts_exports3, {
|
|
|
125714
125708
|
tryGetDirectories: () => tryGetDirectories,
|
|
125715
125709
|
tryGetExtensionFromPath: () => tryGetExtensionFromPath2,
|
|
125716
125710
|
tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier,
|
|
125711
|
+
tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode,
|
|
125717
125712
|
tryGetModuleNameFromFile: () => tryGetModuleNameFromFile,
|
|
125718
125713
|
tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration,
|
|
125719
125714
|
tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks,
|
|
@@ -128839,7 +128834,7 @@ function isNonGlobalDeclaration(declaration) {
|
|
|
128839
128834
|
if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) {
|
|
128840
128835
|
return false;
|
|
128841
128836
|
}
|
|
128842
|
-
return isInJSFile(declaration) || !findAncestor(declaration,
|
|
128837
|
+
return isInJSFile(declaration) || !findAncestor(declaration, isGlobalScopeAugmentation);
|
|
128843
128838
|
}
|
|
128844
128839
|
function isDeprecatedDeclaration(decl) {
|
|
128845
128840
|
return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */);
|
|
@@ -133064,7 +133059,7 @@ var NodeObject = class {
|
|
|
133064
133059
|
if (!children.length) {
|
|
133065
133060
|
return void 0;
|
|
133066
133061
|
}
|
|
133067
|
-
const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind >
|
|
133062
|
+
const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 353 /* LastJSDocNode */);
|
|
133068
133063
|
return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
|
|
133069
133064
|
}
|
|
133070
133065
|
getLastToken(sourceFile) {
|
|
@@ -133131,7 +133126,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) {
|
|
|
133131
133126
|
}
|
|
133132
133127
|
}
|
|
133133
133128
|
function createSyntaxList(nodes, parent2) {
|
|
133134
|
-
const list = createNode(
|
|
133129
|
+
const list = createNode(354 /* SyntaxList */, nodes.pos, nodes.end, parent2);
|
|
133135
133130
|
list._children = [];
|
|
133136
133131
|
let pos = nodes.pos;
|
|
133137
133132
|
for (const node of nodes) {
|
|
@@ -138038,7 +138033,7 @@ function doChange(changes, sourceFile, decl) {
|
|
|
138038
138033
|
if (!param.type) {
|
|
138039
138034
|
const paramType = getJSDocType(param);
|
|
138040
138035
|
if (paramType)
|
|
138041
|
-
changes.tryInsertTypeAnnotation(sourceFile, param,
|
|
138036
|
+
changes.tryInsertTypeAnnotation(sourceFile, param, transformJSDocType(paramType));
|
|
138042
138037
|
}
|
|
138043
138038
|
}
|
|
138044
138039
|
if (needParens)
|
|
@@ -138046,12 +138041,12 @@ function doChange(changes, sourceFile, decl) {
|
|
|
138046
138041
|
if (!decl.type) {
|
|
138047
138042
|
const returnType = getJSDocReturnType(decl);
|
|
138048
138043
|
if (returnType)
|
|
138049
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
138044
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(returnType));
|
|
138050
138045
|
}
|
|
138051
138046
|
} else {
|
|
138052
138047
|
const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist");
|
|
138053
138048
|
Debug.assert(!decl.type, "The JSDocType decl should have a type");
|
|
138054
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl,
|
|
138049
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType));
|
|
138055
138050
|
}
|
|
138056
138051
|
}
|
|
138057
138052
|
function isDeclarationWithType(node) {
|
|
@@ -138088,19 +138083,19 @@ function transformJSDocTypeLiteral(node) {
|
|
|
138088
138083
|
void 0,
|
|
138089
138084
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
138090
138085
|
isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(57 /* QuestionToken */) : void 0,
|
|
138091
|
-
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType
|
|
138086
|
+
tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType) || factory.createKeywordTypeNode(131 /* AnyKeyword */)
|
|
138092
138087
|
)));
|
|
138093
138088
|
setEmitFlags(typeNode, 1 /* SingleLine */);
|
|
138094
138089
|
return typeNode;
|
|
138095
138090
|
}
|
|
138096
138091
|
function transformJSDocOptionalType(node) {
|
|
138097
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType
|
|
138092
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("undefined", emptyArray)]);
|
|
138098
138093
|
}
|
|
138099
138094
|
function transformJSDocNullableType(node) {
|
|
138100
|
-
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType
|
|
138095
|
+
return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType), factory.createTypeReferenceNode("null", emptyArray)]);
|
|
138101
138096
|
}
|
|
138102
138097
|
function transformJSDocVariadicType(node) {
|
|
138103
|
-
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType
|
|
138098
|
+
return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType));
|
|
138104
138099
|
}
|
|
138105
138100
|
function transformJSDocFunctionType(node) {
|
|
138106
138101
|
var _a2;
|
|
@@ -138111,7 +138106,7 @@ function transformJSDocParameter(node) {
|
|
|
138111
138106
|
const isRest = node.type.kind === 321 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1;
|
|
138112
138107
|
const name = node.name || (isRest ? "rest" : "arg" + index);
|
|
138113
138108
|
const dotdotdot = isRest ? factory.createToken(25 /* DotDotDotToken */) : node.dotDotDotToken;
|
|
138114
|
-
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType
|
|
138109
|
+
return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType), node.initializer);
|
|
138115
138110
|
}
|
|
138116
138111
|
function transformJSDocTypeReference(node) {
|
|
138117
138112
|
let name = node.typeName;
|
|
@@ -138138,7 +138133,7 @@ function transformJSDocTypeReference(node) {
|
|
|
138138
138133
|
if ((text === "Array" || text === "Promise") && !node.typeArguments) {
|
|
138139
138134
|
args = factory.createNodeArray([factory.createTypeReferenceNode("any", emptyArray)]);
|
|
138140
138135
|
} else {
|
|
138141
|
-
args = visitNodes2(node.typeArguments, transformJSDocType
|
|
138136
|
+
args = visitNodes2(node.typeArguments, transformJSDocType);
|
|
138142
138137
|
}
|
|
138143
138138
|
}
|
|
138144
138139
|
return factory.createTypeReferenceNode(name, args);
|
|
@@ -140696,19 +140691,13 @@ function getUmdSymbol(token, checker) {
|
|
|
140696
140691
|
if (isUMDExportSymbol(umdSymbol))
|
|
140697
140692
|
return umdSymbol;
|
|
140698
140693
|
const { parent: parent2 } = token;
|
|
140699
|
-
|
|
140700
|
-
|
|
140701
|
-
|
|
140702
|
-
|
|
140703
|
-
|
|
140704
|
-
|
|
140705
|
-
|
|
140706
|
-
);
|
|
140707
|
-
if (isUMDExportSymbol(parentSymbol)) {
|
|
140708
|
-
return parentSymbol;
|
|
140709
|
-
}
|
|
140710
|
-
}
|
|
140711
|
-
return void 0;
|
|
140694
|
+
return isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2) ? tryCast(checker.resolveName(
|
|
140695
|
+
checker.getJsxNamespace(parent2),
|
|
140696
|
+
isJsxOpeningLikeElement(parent2) ? token : parent2,
|
|
140697
|
+
111551 /* Value */,
|
|
140698
|
+
/*excludeGlobals*/
|
|
140699
|
+
false
|
|
140700
|
+
), isUMDExportSymbol) : void 0;
|
|
140712
140701
|
}
|
|
140713
140702
|
function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) {
|
|
140714
140703
|
switch (exportKind) {
|
|
@@ -145820,17 +145809,18 @@ function findJsonProperty(obj, name) {
|
|
|
145820
145809
|
}
|
|
145821
145810
|
function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
|
|
145822
145811
|
let symbols;
|
|
145823
|
-
const typeNode = visitNode(importTypeNode, visit
|
|
145812
|
+
const typeNode = visitNode(importTypeNode, visit);
|
|
145824
145813
|
if (symbols && typeNode) {
|
|
145825
145814
|
return { typeNode, symbols };
|
|
145826
145815
|
}
|
|
145827
145816
|
function visit(node) {
|
|
145817
|
+
var _a2;
|
|
145828
145818
|
if (isLiteralImportTypeNode(node) && node.qualifier) {
|
|
145829
145819
|
const firstIdentifier = getFirstIdentifier(node.qualifier);
|
|
145830
145820
|
const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget);
|
|
145831
145821
|
const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier;
|
|
145832
145822
|
symbols = append(symbols, firstIdentifier.symbol);
|
|
145833
|
-
const typeArguments =
|
|
145823
|
+
const typeArguments = (_a2 = node.typeArguments) == null ? void 0 : _a2.map(visit);
|
|
145834
145824
|
return factory.createTypeReferenceNode(qualifier, typeArguments);
|
|
145835
145825
|
}
|
|
145836
145826
|
return visitEachChild(node, visit, nullTransformationContext);
|
|
@@ -147387,10 +147377,10 @@ function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options,
|
|
|
147387
147377
|
} else if (!tracker.hasValue(type.value)) {
|
|
147388
147378
|
switch (typeof type.value) {
|
|
147389
147379
|
case "object":
|
|
147390
|
-
elements.push(factory.createBigIntLiteral(type.value));
|
|
147380
|
+
elements.push(type.value.negative ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value));
|
|
147391
147381
|
break;
|
|
147392
147382
|
case "number":
|
|
147393
|
-
elements.push(factory.createNumericLiteral(type.value));
|
|
147383
|
+
elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(40 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value));
|
|
147394
147384
|
break;
|
|
147395
147385
|
case "string":
|
|
147396
147386
|
elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */));
|
|
@@ -148827,6 +148817,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
148827
148817
|
case 347 /* JSDocTypeTag */:
|
|
148828
148818
|
case 349 /* JSDocTypedefTag */:
|
|
148829
148819
|
case 352 /* JSDocThrowsTag */:
|
|
148820
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
148830
148821
|
return true;
|
|
148831
148822
|
case 348 /* JSDocTemplateTag */:
|
|
148832
148823
|
return !!tag.constraint;
|
|
@@ -150087,7 +150078,7 @@ function getPropertiesForCompletion(type, checker) {
|
|
|
150087
150078
|
function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
|
|
150088
150079
|
var _a2;
|
|
150089
150080
|
switch (location.kind) {
|
|
150090
|
-
case
|
|
150081
|
+
case 354 /* SyntaxList */:
|
|
150091
150082
|
return tryCast(location.parent, isObjectTypeDeclaration);
|
|
150092
150083
|
case 1 /* EndOfFileToken */:
|
|
150093
150084
|
const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
|
|
@@ -151093,7 +151084,7 @@ function removeLeadingDirectorySeparator(path) {
|
|
|
151093
151084
|
}
|
|
151094
151085
|
function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
|
|
151095
151086
|
const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
|
|
151096
|
-
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment));
|
|
151087
|
+
const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
|
|
151097
151088
|
if (fragmentDirectory !== void 0) {
|
|
151098
151089
|
const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
|
|
151099
151090
|
return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
|
|
@@ -154506,6 +154497,7 @@ var jsDocTagNames = [
|
|
|
154506
154497
|
"readonly",
|
|
154507
154498
|
"requires",
|
|
154508
154499
|
"returns",
|
|
154500
|
+
"satisfies",
|
|
154509
154501
|
"see",
|
|
154510
154502
|
"since",
|
|
154511
154503
|
"static",
|
|
@@ -154615,6 +154607,7 @@ function getCommentDisplayParts(tag, checker) {
|
|
|
154615
154607
|
}
|
|
154616
154608
|
return displayParts;
|
|
154617
154609
|
case 347 /* JSDocTypeTag */:
|
|
154610
|
+
case 353 /* JSDocSatisfiesTag */:
|
|
154618
154611
|
return withNode(tag.typeExpression);
|
|
154619
154612
|
case 349 /* JSDocTypedefTag */:
|
|
154620
154613
|
case 341 /* JSDocCallbackTag */:
|
|
@@ -160052,7 +160045,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
|
|
|
160052
160045
|
let ignoreReturns = false;
|
|
160053
160046
|
const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]);
|
|
160054
160047
|
if (hasWritesOrVariableDeclarations || substitutions.size) {
|
|
160055
|
-
const rewrittenStatements = visitNodes2(statements, visitor
|
|
160048
|
+
const rewrittenStatements = visitNodes2(statements, visitor).slice();
|
|
160056
160049
|
if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) {
|
|
160057
160050
|
const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes);
|
|
160058
160051
|
if (assignments.length === 1) {
|
|
@@ -160080,7 +160073,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
|
|
|
160080
160073
|
if (!returnValueProperty) {
|
|
160081
160074
|
returnValueProperty = "__return";
|
|
160082
160075
|
}
|
|
160083
|
-
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor
|
|
160076
|
+
assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor)));
|
|
160084
160077
|
}
|
|
160085
160078
|
if (assignments.length === 1) {
|
|
160086
160079
|
return factory.createReturnStatement(assignments[0].name);
|
|
@@ -163098,7 +163091,6 @@ function assignPositionsToNodeArray(nodes, visitor, test, start2, count) {
|
|
|
163098
163091
|
if (!visited) {
|
|
163099
163092
|
return visited;
|
|
163100
163093
|
}
|
|
163101
|
-
Debug.assert(nodes);
|
|
163102
163094
|
const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited;
|
|
163103
163095
|
setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes));
|
|
163104
163096
|
return nodeArray;
|
|
@@ -174766,7 +174758,6 @@ var Session3 = class {
|
|
|
174766
174758
|
constructor(opts) {
|
|
174767
174759
|
this.changeSeq = 0;
|
|
174768
174760
|
this.handlers = new Map(Object.entries({
|
|
174769
|
-
// TODO(jakebailey): correctly type the handlers
|
|
174770
174761
|
[CommandNames.Status]: () => {
|
|
174771
174762
|
const response = { version };
|
|
174772
174763
|
return this.requiredResponse(response);
|
|
@@ -179991,6 +179982,8 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
179991
179982
|
getJSDocReturnTag,
|
|
179992
179983
|
getJSDocReturnType,
|
|
179993
179984
|
getJSDocRoot,
|
|
179985
|
+
getJSDocSatisfiesExpressionType,
|
|
179986
|
+
getJSDocSatisfiesTag,
|
|
179994
179987
|
getJSDocTags,
|
|
179995
179988
|
getJSDocTagsNoCache,
|
|
179996
179989
|
getJSDocTemplateTag,
|
|
@@ -180330,7 +180323,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180330
180323
|
isArgumentExpressionOfElementAccess,
|
|
180331
180324
|
isArray,
|
|
180332
180325
|
isArrayBindingElement,
|
|
180333
|
-
isArrayBindingOrAssignmentElement,
|
|
180334
180326
|
isArrayBindingOrAssignmentPattern,
|
|
180335
180327
|
isArrayBindingPattern,
|
|
180336
180328
|
isArrayLiteralExpression,
|
|
@@ -180363,7 +180355,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180363
180355
|
isBindableStaticNameExpression,
|
|
180364
180356
|
isBindingElement,
|
|
180365
180357
|
isBindingName,
|
|
180366
|
-
isBindingOrAssignmentElement,
|
|
180367
180358
|
isBindingOrAssignmentPattern,
|
|
180368
180359
|
isBindingPattern,
|
|
180369
180360
|
isBlock,
|
|
@@ -180570,7 +180561,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180570
180561
|
isInferTypeNode,
|
|
180571
180562
|
isInfinityOrNaNString,
|
|
180572
180563
|
isInitializedProperty,
|
|
180573
|
-
isInitializedVariable,
|
|
180574
180564
|
isInsideJsxElement,
|
|
180575
180565
|
isInsideJsxElementOrAttribute,
|
|
180576
180566
|
isInsideNodeModules,
|
|
@@ -180620,6 +180610,8 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180620
180610
|
isJSDocPublicTag,
|
|
180621
180611
|
isJSDocReadonlyTag,
|
|
180622
180612
|
isJSDocReturnTag,
|
|
180613
|
+
isJSDocSatisfiesExpression,
|
|
180614
|
+
isJSDocSatisfiesTag,
|
|
180623
180615
|
isJSDocSeeTag,
|
|
180624
180616
|
isJSDocSignature,
|
|
180625
180617
|
isJSDocTag,
|
|
@@ -180675,12 +180667,13 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
180675
180667
|
isLiteralLikeElementAccess,
|
|
180676
180668
|
isLiteralNameOfPropertyDeclarationOrIndexAccess,
|
|
180677
180669
|
isLiteralTypeLikeExpression,
|
|
180678
|
-
isLiteralTypeLiteral,
|
|
180679
180670
|
isLiteralTypeNode,
|
|
180680
180671
|
isLocalName,
|
|
180681
180672
|
isLogicalOperator,
|
|
180682
180673
|
isLogicalOrCoalescingAssignmentExpression,
|
|
180683
180674
|
isLogicalOrCoalescingAssignmentOperator,
|
|
180675
|
+
isLogicalOrCoalescingBinaryExpression,
|
|
180676
|
+
isLogicalOrCoalescingBinaryOperator,
|
|
180684
180677
|
isMappedTypeNode,
|
|
180685
180678
|
isMemberName,
|
|
180686
180679
|
isMergeDeclarationMarker,
|
|
@@ -181366,6 +181359,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
181366
181359
|
tryGetDirectories,
|
|
181367
181360
|
tryGetExtensionFromPath,
|
|
181368
181361
|
tryGetImportFromModuleSpecifier,
|
|
181362
|
+
tryGetJSDocSatisfiesTypeNode,
|
|
181369
181363
|
tryGetModuleNameFromFile,
|
|
181370
181364
|
tryGetModuleSpecifierFromDeclaration,
|
|
181371
181365
|
tryGetNativePerformanceHooks,
|