@typescript-deploys/pr-build 5.0.0-pr-51753-3 → 5.0.0-pr-51682-13
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 +1792 -1264
- package/lib/tsserver.js +1864 -1332
- package/lib/tsserverlibrary.d.ts +97 -87
- package/lib/tsserverlibrary.js +1861 -1329
- package/lib/typescript.d.ts +97 -87
- package/lib/typescript.js +1857 -1325
- package/lib/typingsInstaller.js +1141 -747
- package/package.json +1 -1
package/lib/typingsInstaller.js
CHANGED
|
@@ -50,7 +50,7 @@ var path = __toESM(require("path"));
|
|
|
50
50
|
|
|
51
51
|
// src/compiler/corePublic.ts
|
|
52
52
|
var versionMajorMinor = "5.0";
|
|
53
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
53
|
+
var version = `${versionMajorMinor}.0-insiders.20221208`;
|
|
54
54
|
|
|
55
55
|
// src/compiler/core.ts
|
|
56
56
|
var emptyArray = [];
|
|
@@ -2853,15 +2853,14 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
2853
2853
|
SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 348] = "JSDocTypedefTag";
|
|
2854
2854
|
SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 349] = "JSDocSeeTag";
|
|
2855
2855
|
SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 350] = "JSDocPropertyTag";
|
|
2856
|
-
SyntaxKind4[SyntaxKind4["
|
|
2857
|
-
SyntaxKind4[SyntaxKind4["
|
|
2858
|
-
SyntaxKind4[SyntaxKind4["
|
|
2859
|
-
SyntaxKind4[SyntaxKind4["
|
|
2860
|
-
SyntaxKind4[SyntaxKind4["
|
|
2861
|
-
SyntaxKind4[SyntaxKind4["
|
|
2862
|
-
SyntaxKind4[SyntaxKind4["
|
|
2863
|
-
SyntaxKind4[SyntaxKind4["
|
|
2864
|
-
SyntaxKind4[SyntaxKind4["Count"] = 359] = "Count";
|
|
2856
|
+
SyntaxKind4[SyntaxKind4["SyntaxList"] = 351] = "SyntaxList";
|
|
2857
|
+
SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 352] = "NotEmittedStatement";
|
|
2858
|
+
SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 353] = "PartiallyEmittedExpression";
|
|
2859
|
+
SyntaxKind4[SyntaxKind4["CommaListExpression"] = 354] = "CommaListExpression";
|
|
2860
|
+
SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 355] = "MergeDeclarationMarker";
|
|
2861
|
+
SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 356] = "EndOfDeclarationMarker";
|
|
2862
|
+
SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 357] = "SyntheticReferenceExpression";
|
|
2863
|
+
SyntaxKind4[SyntaxKind4["Count"] = 358] = "Count";
|
|
2865
2864
|
SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
|
|
2866
2865
|
SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
|
|
2867
2866
|
SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -9166,6 +9165,8 @@ function getJSDocTypeTag(node) {
|
|
|
9166
9165
|
return void 0;
|
|
9167
9166
|
}
|
|
9168
9167
|
function getJSDocTagsWorker(node, noCache) {
|
|
9168
|
+
if (!canHaveJSDoc(node))
|
|
9169
|
+
return emptyArray;
|
|
9169
9170
|
let tags = node.jsDocCache;
|
|
9170
9171
|
if (tags === void 0 || noCache) {
|
|
9171
9172
|
const comments = getJSDocCommentsAndTags(node, noCache);
|
|
@@ -9473,8 +9474,8 @@ function isExpressionKind(kind) {
|
|
|
9473
9474
|
case 227 /* SpreadElement */:
|
|
9474
9475
|
case 231 /* AsExpression */:
|
|
9475
9476
|
case 229 /* OmittedExpression */:
|
|
9476
|
-
case
|
|
9477
|
-
case
|
|
9477
|
+
case 354 /* CommaListExpression */:
|
|
9478
|
+
case 353 /* PartiallyEmittedExpression */:
|
|
9478
9479
|
case 235 /* SatisfiesExpression */:
|
|
9479
9480
|
return true;
|
|
9480
9481
|
default:
|
|
@@ -9498,6 +9499,114 @@ function isNamedImportBindings(node) {
|
|
|
9498
9499
|
const kind = node.kind;
|
|
9499
9500
|
return kind === 272 /* NamedImports */ || kind === 271 /* NamespaceImport */;
|
|
9500
9501
|
}
|
|
9502
|
+
function canHaveSymbol(node) {
|
|
9503
|
+
switch (node.kind) {
|
|
9504
|
+
case 216 /* ArrowFunction */:
|
|
9505
|
+
case 223 /* BinaryExpression */:
|
|
9506
|
+
case 205 /* BindingElement */:
|
|
9507
|
+
case 210 /* CallExpression */:
|
|
9508
|
+
case 176 /* CallSignature */:
|
|
9509
|
+
case 260 /* ClassDeclaration */:
|
|
9510
|
+
case 228 /* ClassExpression */:
|
|
9511
|
+
case 172 /* ClassStaticBlockDeclaration */:
|
|
9512
|
+
case 173 /* Constructor */:
|
|
9513
|
+
case 182 /* ConstructorType */:
|
|
9514
|
+
case 177 /* ConstructSignature */:
|
|
9515
|
+
case 209 /* ElementAccessExpression */:
|
|
9516
|
+
case 263 /* EnumDeclaration */:
|
|
9517
|
+
case 302 /* EnumMember */:
|
|
9518
|
+
case 274 /* ExportAssignment */:
|
|
9519
|
+
case 275 /* ExportDeclaration */:
|
|
9520
|
+
case 278 /* ExportSpecifier */:
|
|
9521
|
+
case 259 /* FunctionDeclaration */:
|
|
9522
|
+
case 215 /* FunctionExpression */:
|
|
9523
|
+
case 181 /* FunctionType */:
|
|
9524
|
+
case 174 /* GetAccessor */:
|
|
9525
|
+
case 79 /* Identifier */:
|
|
9526
|
+
case 270 /* ImportClause */:
|
|
9527
|
+
case 268 /* ImportEqualsDeclaration */:
|
|
9528
|
+
case 273 /* ImportSpecifier */:
|
|
9529
|
+
case 178 /* IndexSignature */:
|
|
9530
|
+
case 261 /* InterfaceDeclaration */:
|
|
9531
|
+
case 341 /* JSDocCallbackTag */:
|
|
9532
|
+
case 342 /* JSDocEnumTag */:
|
|
9533
|
+
case 320 /* JSDocFunctionType */:
|
|
9534
|
+
case 343 /* JSDocParameterTag */:
|
|
9535
|
+
case 350 /* JSDocPropertyTag */:
|
|
9536
|
+
case 326 /* JSDocSignature */:
|
|
9537
|
+
case 348 /* JSDocTypedefTag */:
|
|
9538
|
+
case 325 /* JSDocTypeLiteral */:
|
|
9539
|
+
case 288 /* JsxAttribute */:
|
|
9540
|
+
case 289 /* JsxAttributes */:
|
|
9541
|
+
case 290 /* JsxSpreadAttribute */:
|
|
9542
|
+
case 197 /* MappedType */:
|
|
9543
|
+
case 171 /* MethodDeclaration */:
|
|
9544
|
+
case 170 /* MethodSignature */:
|
|
9545
|
+
case 264 /* ModuleDeclaration */:
|
|
9546
|
+
case 199 /* NamedTupleMember */:
|
|
9547
|
+
case 277 /* NamespaceExport */:
|
|
9548
|
+
case 267 /* NamespaceExportDeclaration */:
|
|
9549
|
+
case 271 /* NamespaceImport */:
|
|
9550
|
+
case 211 /* NewExpression */:
|
|
9551
|
+
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
9552
|
+
case 8 /* NumericLiteral */:
|
|
9553
|
+
case 207 /* ObjectLiteralExpression */:
|
|
9554
|
+
case 166 /* Parameter */:
|
|
9555
|
+
case 208 /* PropertyAccessExpression */:
|
|
9556
|
+
case 299 /* PropertyAssignment */:
|
|
9557
|
+
case 169 /* PropertyDeclaration */:
|
|
9558
|
+
case 168 /* PropertySignature */:
|
|
9559
|
+
case 175 /* SetAccessor */:
|
|
9560
|
+
case 300 /* ShorthandPropertyAssignment */:
|
|
9561
|
+
case 308 /* SourceFile */:
|
|
9562
|
+
case 301 /* SpreadAssignment */:
|
|
9563
|
+
case 10 /* StringLiteral */:
|
|
9564
|
+
case 262 /* TypeAliasDeclaration */:
|
|
9565
|
+
case 184 /* TypeLiteral */:
|
|
9566
|
+
case 165 /* TypeParameter */:
|
|
9567
|
+
case 257 /* VariableDeclaration */:
|
|
9568
|
+
return true;
|
|
9569
|
+
default:
|
|
9570
|
+
return false;
|
|
9571
|
+
}
|
|
9572
|
+
}
|
|
9573
|
+
function canHaveLocals(node) {
|
|
9574
|
+
switch (node.kind) {
|
|
9575
|
+
case 216 /* ArrowFunction */:
|
|
9576
|
+
case 238 /* Block */:
|
|
9577
|
+
case 176 /* CallSignature */:
|
|
9578
|
+
case 266 /* CaseBlock */:
|
|
9579
|
+
case 295 /* CatchClause */:
|
|
9580
|
+
case 172 /* ClassStaticBlockDeclaration */:
|
|
9581
|
+
case 191 /* ConditionalType */:
|
|
9582
|
+
case 173 /* Constructor */:
|
|
9583
|
+
case 182 /* ConstructorType */:
|
|
9584
|
+
case 177 /* ConstructSignature */:
|
|
9585
|
+
case 245 /* ForStatement */:
|
|
9586
|
+
case 246 /* ForInStatement */:
|
|
9587
|
+
case 247 /* ForOfStatement */:
|
|
9588
|
+
case 259 /* FunctionDeclaration */:
|
|
9589
|
+
case 215 /* FunctionExpression */:
|
|
9590
|
+
case 181 /* FunctionType */:
|
|
9591
|
+
case 174 /* GetAccessor */:
|
|
9592
|
+
case 178 /* IndexSignature */:
|
|
9593
|
+
case 341 /* JSDocCallbackTag */:
|
|
9594
|
+
case 342 /* JSDocEnumTag */:
|
|
9595
|
+
case 320 /* JSDocFunctionType */:
|
|
9596
|
+
case 326 /* JSDocSignature */:
|
|
9597
|
+
case 348 /* JSDocTypedefTag */:
|
|
9598
|
+
case 197 /* MappedType */:
|
|
9599
|
+
case 171 /* MethodDeclaration */:
|
|
9600
|
+
case 170 /* MethodSignature */:
|
|
9601
|
+
case 264 /* ModuleDeclaration */:
|
|
9602
|
+
case 175 /* SetAccessor */:
|
|
9603
|
+
case 308 /* SourceFile */:
|
|
9604
|
+
case 262 /* TypeAliasDeclaration */:
|
|
9605
|
+
return true;
|
|
9606
|
+
default:
|
|
9607
|
+
return false;
|
|
9608
|
+
}
|
|
9609
|
+
}
|
|
9501
9610
|
function isDeclarationKind(kind) {
|
|
9502
9611
|
return kind === 216 /* ArrowFunction */ || kind === 205 /* BindingElement */ || kind === 260 /* ClassDeclaration */ || kind === 228 /* ClassExpression */ || kind === 172 /* ClassStaticBlockDeclaration */ || kind === 173 /* Constructor */ || kind === 263 /* EnumDeclaration */ || kind === 302 /* EnumMember */ || kind === 278 /* ExportSpecifier */ || kind === 259 /* FunctionDeclaration */ || kind === 215 /* FunctionExpression */ || kind === 174 /* GetAccessor */ || kind === 270 /* ImportClause */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 273 /* ImportSpecifier */ || kind === 261 /* InterfaceDeclaration */ || kind === 288 /* JsxAttribute */ || kind === 171 /* MethodDeclaration */ || kind === 170 /* MethodSignature */ || kind === 264 /* ModuleDeclaration */ || kind === 267 /* NamespaceExportDeclaration */ || kind === 271 /* NamespaceImport */ || kind === 277 /* NamespaceExport */ || kind === 166 /* Parameter */ || kind === 299 /* PropertyAssignment */ || kind === 169 /* PropertyDeclaration */ || kind === 168 /* PropertySignature */ || kind === 175 /* SetAccessor */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 262 /* TypeAliasDeclaration */ || kind === 165 /* TypeParameter */ || kind === 257 /* VariableDeclaration */ || kind === 348 /* JSDocTypedefTag */ || kind === 341 /* JSDocCallbackTag */ || kind === 350 /* JSDocPropertyTag */;
|
|
9503
9612
|
}
|
|
@@ -9505,7 +9614,7 @@ function isDeclarationStatementKind(kind) {
|
|
|
9505
9614
|
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 */;
|
|
9506
9615
|
}
|
|
9507
9616
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
9508
|
-
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 ===
|
|
9617
|
+
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 === 352 /* NotEmittedStatement */ || kind === 356 /* EndOfDeclarationMarker */ || kind === 355 /* MergeDeclarationMarker */;
|
|
9509
9618
|
}
|
|
9510
9619
|
function isDeclaration(node) {
|
|
9511
9620
|
if (node.kind === 165 /* TypeParameter */) {
|
|
@@ -9565,6 +9674,8 @@ function isJSDocNode(node) {
|
|
|
9565
9674
|
return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 350 /* LastJSDocNode */;
|
|
9566
9675
|
}
|
|
9567
9676
|
function hasJSDocNodes(node) {
|
|
9677
|
+
if (!canHaveJSDoc(node))
|
|
9678
|
+
return false;
|
|
9568
9679
|
const { jsDoc } = node;
|
|
9569
9680
|
return !!jsDoc && jsDoc.length > 0;
|
|
9570
9681
|
}
|
|
@@ -9614,11 +9725,7 @@ function createSingleLineStringWriter() {
|
|
|
9614
9725
|
writeLine: () => str += " ",
|
|
9615
9726
|
increaseIndent: noop,
|
|
9616
9727
|
decreaseIndent: noop,
|
|
9617
|
-
clear: () => str = ""
|
|
9618
|
-
trackSymbol: () => false,
|
|
9619
|
-
reportInaccessibleThisError: noop,
|
|
9620
|
-
reportInaccessibleUniqueSymbolError: noop,
|
|
9621
|
-
reportPrivateInBaseOfClassExpression: noop
|
|
9728
|
+
clear: () => str = ""
|
|
9622
9729
|
};
|
|
9623
9730
|
}
|
|
9624
9731
|
function copyEntries(source, target) {
|
|
@@ -9690,7 +9797,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
9690
9797
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
9691
9798
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
9692
9799
|
}
|
|
9693
|
-
if (node.kind ===
|
|
9800
|
+
if (node.kind === 351 /* SyntaxList */ && node._children.length > 0) {
|
|
9694
9801
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
9695
9802
|
}
|
|
9696
9803
|
return skipTrivia(
|
|
@@ -9941,7 +10048,7 @@ function isObjectLiteralOrClassExpressionMethodOrAccessor(node) {
|
|
|
9941
10048
|
function getContainingClass(node) {
|
|
9942
10049
|
return findAncestor(node.parent, isClassLike);
|
|
9943
10050
|
}
|
|
9944
|
-
function getThisContainer(node, includeArrowFunctions) {
|
|
10051
|
+
function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) {
|
|
9945
10052
|
Debug.assert(node.kind !== 308 /* SourceFile */);
|
|
9946
10053
|
while (true) {
|
|
9947
10054
|
node = node.parent;
|
|
@@ -9950,10 +10057,10 @@ function getThisContainer(node, includeArrowFunctions) {
|
|
|
9950
10057
|
}
|
|
9951
10058
|
switch (node.kind) {
|
|
9952
10059
|
case 164 /* ComputedPropertyName */:
|
|
9953
|
-
if (isClassLike(node.parent.parent)) {
|
|
10060
|
+
if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) {
|
|
9954
10061
|
return node;
|
|
9955
10062
|
}
|
|
9956
|
-
node = node.parent;
|
|
10063
|
+
node = node.parent.parent;
|
|
9957
10064
|
break;
|
|
9958
10065
|
case 167 /* Decorator */:
|
|
9959
10066
|
if (node.parent.kind === 166 /* Parameter */ && isClassElement(node.parent.parent)) {
|
|
@@ -9990,7 +10097,7 @@ function isInTopLevelContext(node) {
|
|
|
9990
10097
|
if (isIdentifier(node) && (isClassDeclaration(node.parent) || isFunctionDeclaration(node.parent)) && node.parent.name === node) {
|
|
9991
10098
|
node = node.parent;
|
|
9992
10099
|
}
|
|
9993
|
-
const container = getThisContainer(node, true);
|
|
10100
|
+
const container = getThisContainer(node, true, false);
|
|
9994
10101
|
return isSourceFile(container);
|
|
9995
10102
|
}
|
|
9996
10103
|
function getImmediatelyInvokedFunctionExpression(func) {
|
|
@@ -10263,6 +10370,78 @@ function getSingleVariableOfVariableStatement(node) {
|
|
|
10263
10370
|
function getNestedModuleDeclaration(node) {
|
|
10264
10371
|
return isModuleDeclaration(node) && node.body && node.body.kind === 264 /* ModuleDeclaration */ ? node.body : void 0;
|
|
10265
10372
|
}
|
|
10373
|
+
function canHaveJSDoc(node) {
|
|
10374
|
+
switch (node.kind) {
|
|
10375
|
+
case 216 /* ArrowFunction */:
|
|
10376
|
+
case 223 /* BinaryExpression */:
|
|
10377
|
+
case 238 /* Block */:
|
|
10378
|
+
case 249 /* BreakStatement */:
|
|
10379
|
+
case 176 /* CallSignature */:
|
|
10380
|
+
case 292 /* CaseClause */:
|
|
10381
|
+
case 260 /* ClassDeclaration */:
|
|
10382
|
+
case 228 /* ClassExpression */:
|
|
10383
|
+
case 172 /* ClassStaticBlockDeclaration */:
|
|
10384
|
+
case 173 /* Constructor */:
|
|
10385
|
+
case 182 /* ConstructorType */:
|
|
10386
|
+
case 177 /* ConstructSignature */:
|
|
10387
|
+
case 248 /* ContinueStatement */:
|
|
10388
|
+
case 256 /* DebuggerStatement */:
|
|
10389
|
+
case 243 /* DoStatement */:
|
|
10390
|
+
case 209 /* ElementAccessExpression */:
|
|
10391
|
+
case 239 /* EmptyStatement */:
|
|
10392
|
+
case 1 /* EndOfFileToken */:
|
|
10393
|
+
case 263 /* EnumDeclaration */:
|
|
10394
|
+
case 302 /* EnumMember */:
|
|
10395
|
+
case 274 /* ExportAssignment */:
|
|
10396
|
+
case 275 /* ExportDeclaration */:
|
|
10397
|
+
case 278 /* ExportSpecifier */:
|
|
10398
|
+
case 241 /* ExpressionStatement */:
|
|
10399
|
+
case 246 /* ForInStatement */:
|
|
10400
|
+
case 247 /* ForOfStatement */:
|
|
10401
|
+
case 245 /* ForStatement */:
|
|
10402
|
+
case 259 /* FunctionDeclaration */:
|
|
10403
|
+
case 215 /* FunctionExpression */:
|
|
10404
|
+
case 181 /* FunctionType */:
|
|
10405
|
+
case 174 /* GetAccessor */:
|
|
10406
|
+
case 79 /* Identifier */:
|
|
10407
|
+
case 242 /* IfStatement */:
|
|
10408
|
+
case 269 /* ImportDeclaration */:
|
|
10409
|
+
case 268 /* ImportEqualsDeclaration */:
|
|
10410
|
+
case 178 /* IndexSignature */:
|
|
10411
|
+
case 261 /* InterfaceDeclaration */:
|
|
10412
|
+
case 320 /* JSDocFunctionType */:
|
|
10413
|
+
case 326 /* JSDocSignature */:
|
|
10414
|
+
case 253 /* LabeledStatement */:
|
|
10415
|
+
case 171 /* MethodDeclaration */:
|
|
10416
|
+
case 170 /* MethodSignature */:
|
|
10417
|
+
case 264 /* ModuleDeclaration */:
|
|
10418
|
+
case 199 /* NamedTupleMember */:
|
|
10419
|
+
case 267 /* NamespaceExportDeclaration */:
|
|
10420
|
+
case 207 /* ObjectLiteralExpression */:
|
|
10421
|
+
case 166 /* Parameter */:
|
|
10422
|
+
case 214 /* ParenthesizedExpression */:
|
|
10423
|
+
case 208 /* PropertyAccessExpression */:
|
|
10424
|
+
case 299 /* PropertyAssignment */:
|
|
10425
|
+
case 169 /* PropertyDeclaration */:
|
|
10426
|
+
case 168 /* PropertySignature */:
|
|
10427
|
+
case 250 /* ReturnStatement */:
|
|
10428
|
+
case 175 /* SetAccessor */:
|
|
10429
|
+
case 300 /* ShorthandPropertyAssignment */:
|
|
10430
|
+
case 301 /* SpreadAssignment */:
|
|
10431
|
+
case 252 /* SwitchStatement */:
|
|
10432
|
+
case 254 /* ThrowStatement */:
|
|
10433
|
+
case 255 /* TryStatement */:
|
|
10434
|
+
case 262 /* TypeAliasDeclaration */:
|
|
10435
|
+
case 165 /* TypeParameter */:
|
|
10436
|
+
case 257 /* VariableDeclaration */:
|
|
10437
|
+
case 240 /* VariableStatement */:
|
|
10438
|
+
case 244 /* WhileStatement */:
|
|
10439
|
+
case 251 /* WithStatement */:
|
|
10440
|
+
return true;
|
|
10441
|
+
default:
|
|
10442
|
+
return false;
|
|
10443
|
+
}
|
|
10444
|
+
}
|
|
10266
10445
|
function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
10267
10446
|
let result;
|
|
10268
10447
|
if (isVariableLike(hostNode) && hasInitializer(hostNode) && hasJSDocNodes(hostNode.initializer)) {
|
|
@@ -10548,7 +10727,7 @@ function getOperator(expression) {
|
|
|
10548
10727
|
}
|
|
10549
10728
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
10550
10729
|
switch (nodeKind) {
|
|
10551
|
-
case
|
|
10730
|
+
case 354 /* CommaListExpression */:
|
|
10552
10731
|
return 0 /* Comma */;
|
|
10553
10732
|
case 227 /* SpreadElement */:
|
|
10554
10733
|
return 1 /* Spread */;
|
|
@@ -10953,7 +11132,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
|
|
|
10953
11132
|
case 209 /* ElementAccessExpression */:
|
|
10954
11133
|
case 208 /* PropertyAccessExpression */:
|
|
10955
11134
|
case 232 /* NonNullExpression */:
|
|
10956
|
-
case
|
|
11135
|
+
case 353 /* PartiallyEmittedExpression */:
|
|
10957
11136
|
case 235 /* SatisfiesExpression */:
|
|
10958
11137
|
node = node.expression;
|
|
10959
11138
|
continue;
|
|
@@ -10992,6 +11171,7 @@ function Node4(kind, pos, end) {
|
|
|
10992
11171
|
this.transformFlags = 0 /* None */;
|
|
10993
11172
|
this.parent = void 0;
|
|
10994
11173
|
this.original = void 0;
|
|
11174
|
+
this.emitNode = void 0;
|
|
10995
11175
|
}
|
|
10996
11176
|
function Token(kind, pos, end) {
|
|
10997
11177
|
this.pos = pos;
|
|
@@ -11001,6 +11181,7 @@ function Token(kind, pos, end) {
|
|
|
11001
11181
|
this.flags = 0 /* None */;
|
|
11002
11182
|
this.transformFlags = 0 /* None */;
|
|
11003
11183
|
this.parent = void 0;
|
|
11184
|
+
this.emitNode = void 0;
|
|
11004
11185
|
}
|
|
11005
11186
|
function Identifier2(kind, pos, end) {
|
|
11006
11187
|
this.pos = pos;
|
|
@@ -11011,6 +11192,7 @@ function Identifier2(kind, pos, end) {
|
|
|
11011
11192
|
this.transformFlags = 0 /* None */;
|
|
11012
11193
|
this.parent = void 0;
|
|
11013
11194
|
this.original = void 0;
|
|
11195
|
+
this.emitNode = void 0;
|
|
11014
11196
|
this.flowNode = void 0;
|
|
11015
11197
|
}
|
|
11016
11198
|
function SourceMapSource(fileName, text, skipTrivia2) {
|
|
@@ -12454,12 +12636,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12454
12636
|
get updateJSDocThisTag() {
|
|
12455
12637
|
return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocThisTag */);
|
|
12456
12638
|
},
|
|
12457
|
-
get createJSDocEnumTag() {
|
|
12458
|
-
return getJSDocTypeLikeTagCreateFunction(342 /* JSDocEnumTag */);
|
|
12459
|
-
},
|
|
12460
|
-
get updateJSDocEnumTag() {
|
|
12461
|
-
return getJSDocTypeLikeTagUpdateFunction(342 /* JSDocEnumTag */);
|
|
12462
|
-
},
|
|
12463
12639
|
get createJSDocAuthorTag() {
|
|
12464
12640
|
return getJSDocSimpleTagCreateFunction(333 /* JSDocAuthorTag */);
|
|
12465
12641
|
},
|
|
@@ -12508,12 +12684,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12508
12684
|
get updateJSDocDeprecatedTag() {
|
|
12509
12685
|
return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */);
|
|
12510
12686
|
},
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
},
|
|
12514
|
-
get updateJSDocSatisfiesTag() {
|
|
12515
|
-
return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocSatisfiesTag */);
|
|
12516
|
-
},
|
|
12687
|
+
createJSDocEnumTag,
|
|
12688
|
+
updateJSDocEnumTag,
|
|
12517
12689
|
createJSDocUnknownTag,
|
|
12518
12690
|
updateJSDocUnknownTag,
|
|
12519
12691
|
createJSDocText,
|
|
@@ -12560,6 +12732,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12560
12732
|
updateEnumMember,
|
|
12561
12733
|
createSourceFile: createSourceFile2,
|
|
12562
12734
|
updateSourceFile,
|
|
12735
|
+
createRedirectedSourceFile,
|
|
12563
12736
|
createBundle,
|
|
12564
12737
|
updateBundle,
|
|
12565
12738
|
createUnparsedSource,
|
|
@@ -12736,8 +12909,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12736
12909
|
}
|
|
12737
12910
|
const length2 = elements.length;
|
|
12738
12911
|
const array = length2 >= 1 && length2 <= 4 ? elements.slice() : elements;
|
|
12739
|
-
|
|
12912
|
+
array.pos = -1;
|
|
12913
|
+
array.end = -1;
|
|
12740
12914
|
array.hasTrailingComma = !!hasTrailingComma;
|
|
12915
|
+
array.transformFlags = 0 /* None */;
|
|
12741
12916
|
aggregateChildrenFlags(array);
|
|
12742
12917
|
Debug.attachNodeArrayDebugInfo(array);
|
|
12743
12918
|
return array;
|
|
@@ -12749,61 +12924,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12749
12924
|
const node = createBaseNode(kind);
|
|
12750
12925
|
node.symbol = void 0;
|
|
12751
12926
|
node.localSymbol = void 0;
|
|
12752
|
-
node.locals = void 0;
|
|
12753
|
-
node.nextContainer = void 0;
|
|
12754
|
-
return node;
|
|
12755
|
-
}
|
|
12756
|
-
function createBaseNamedDeclaration(kind, modifiers, name) {
|
|
12757
|
-
const node = createBaseDeclaration(kind);
|
|
12758
|
-
name = asName(name);
|
|
12759
|
-
node.name = name;
|
|
12760
|
-
if (canHaveModifiers(node)) {
|
|
12761
|
-
node.modifiers = asNodeArray(modifiers);
|
|
12762
|
-
node.transformFlags |= propagateChildrenFlags(node.modifiers);
|
|
12763
|
-
}
|
|
12764
|
-
if (name) {
|
|
12765
|
-
switch (node.kind) {
|
|
12766
|
-
case 171 /* MethodDeclaration */:
|
|
12767
|
-
case 174 /* GetAccessor */:
|
|
12768
|
-
case 175 /* SetAccessor */:
|
|
12769
|
-
case 169 /* PropertyDeclaration */:
|
|
12770
|
-
case 299 /* PropertyAssignment */:
|
|
12771
|
-
if (isIdentifier(name)) {
|
|
12772
|
-
node.transformFlags |= propagateIdentifierNameFlags(name);
|
|
12773
|
-
break;
|
|
12774
|
-
}
|
|
12775
|
-
default:
|
|
12776
|
-
node.transformFlags |= propagateChildFlags(name);
|
|
12777
|
-
break;
|
|
12778
|
-
}
|
|
12779
|
-
}
|
|
12780
|
-
return node;
|
|
12781
|
-
}
|
|
12782
|
-
function createBaseGenericNamedDeclaration(kind, modifiers, name, typeParameters) {
|
|
12783
|
-
const node = createBaseNamedDeclaration(
|
|
12784
|
-
kind,
|
|
12785
|
-
modifiers,
|
|
12786
|
-
name
|
|
12787
|
-
);
|
|
12788
|
-
node.typeParameters = asNodeArray(typeParameters);
|
|
12789
|
-
node.transformFlags |= propagateChildrenFlags(node.typeParameters);
|
|
12790
|
-
if (typeParameters)
|
|
12791
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12792
|
-
return node;
|
|
12793
|
-
}
|
|
12794
|
-
function createBaseSignatureDeclaration(kind, modifiers, name, typeParameters, parameters, type) {
|
|
12795
|
-
const node = createBaseGenericNamedDeclaration(
|
|
12796
|
-
kind,
|
|
12797
|
-
modifiers,
|
|
12798
|
-
name,
|
|
12799
|
-
typeParameters
|
|
12800
|
-
);
|
|
12801
|
-
node.parameters = createNodeArray(parameters);
|
|
12802
|
-
node.type = type;
|
|
12803
|
-
node.transformFlags |= propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type);
|
|
12804
|
-
if (type)
|
|
12805
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12806
|
-
node.typeArguments = void 0;
|
|
12807
12927
|
return node;
|
|
12808
12928
|
}
|
|
12809
12929
|
function finishUpdateBaseSignatureDeclaration(updated, original) {
|
|
@@ -12812,86 +12932,23 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12812
12932
|
}
|
|
12813
12933
|
return update(updated, original);
|
|
12814
12934
|
}
|
|
12815
|
-
function createBaseFunctionLikeDeclaration(kind, modifiers, name, typeParameters, parameters, type, body) {
|
|
12816
|
-
const node = createBaseSignatureDeclaration(
|
|
12817
|
-
kind,
|
|
12818
|
-
modifiers,
|
|
12819
|
-
name,
|
|
12820
|
-
typeParameters,
|
|
12821
|
-
parameters,
|
|
12822
|
-
type
|
|
12823
|
-
);
|
|
12824
|
-
node.body = body;
|
|
12825
|
-
node.transformFlags |= propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
12826
|
-
if (!body)
|
|
12827
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12828
|
-
return node;
|
|
12829
|
-
}
|
|
12830
|
-
function createBaseInterfaceOrClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses) {
|
|
12831
|
-
const node = createBaseGenericNamedDeclaration(
|
|
12832
|
-
kind,
|
|
12833
|
-
modifiers,
|
|
12834
|
-
name,
|
|
12835
|
-
typeParameters
|
|
12836
|
-
);
|
|
12837
|
-
node.heritageClauses = asNodeArray(heritageClauses);
|
|
12838
|
-
node.transformFlags |= propagateChildrenFlags(node.heritageClauses);
|
|
12839
|
-
return node;
|
|
12840
|
-
}
|
|
12841
|
-
function createBaseClassLikeDeclaration(kind, modifiers, name, typeParameters, heritageClauses, members) {
|
|
12842
|
-
const node = createBaseInterfaceOrClassLikeDeclaration(
|
|
12843
|
-
kind,
|
|
12844
|
-
modifiers,
|
|
12845
|
-
name,
|
|
12846
|
-
typeParameters,
|
|
12847
|
-
heritageClauses
|
|
12848
|
-
);
|
|
12849
|
-
node.members = createNodeArray(members);
|
|
12850
|
-
node.transformFlags |= propagateChildrenFlags(node.members);
|
|
12851
|
-
return node;
|
|
12852
|
-
}
|
|
12853
|
-
function createBaseBindingLikeDeclaration(kind, modifiers, name, initializer) {
|
|
12854
|
-
const node = createBaseNamedDeclaration(
|
|
12855
|
-
kind,
|
|
12856
|
-
modifiers,
|
|
12857
|
-
name
|
|
12858
|
-
);
|
|
12859
|
-
node.initializer = initializer;
|
|
12860
|
-
node.transformFlags |= propagateChildFlags(node.initializer);
|
|
12861
|
-
return node;
|
|
12862
|
-
}
|
|
12863
|
-
function createBaseVariableLikeDeclaration(kind, modifiers, name, type, initializer) {
|
|
12864
|
-
const node = createBaseBindingLikeDeclaration(
|
|
12865
|
-
kind,
|
|
12866
|
-
modifiers,
|
|
12867
|
-
name,
|
|
12868
|
-
initializer
|
|
12869
|
-
);
|
|
12870
|
-
node.type = type;
|
|
12871
|
-
node.transformFlags |= propagateChildFlags(type);
|
|
12872
|
-
if (type)
|
|
12873
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
12874
|
-
return node;
|
|
12875
|
-
}
|
|
12876
|
-
function createBaseLiteral(kind, text) {
|
|
12877
|
-
const node = createBaseToken(kind);
|
|
12878
|
-
node.text = text;
|
|
12879
|
-
return node;
|
|
12880
|
-
}
|
|
12881
12935
|
function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
|
|
12882
|
-
const node =
|
|
12936
|
+
const node = createBaseDeclaration(8 /* NumericLiteral */);
|
|
12937
|
+
node.text = typeof value === "number" ? value + "" : value;
|
|
12883
12938
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
12884
12939
|
if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
|
|
12885
12940
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
12886
12941
|
return node;
|
|
12887
12942
|
}
|
|
12888
12943
|
function createBigIntLiteral(value) {
|
|
12889
|
-
const node =
|
|
12944
|
+
const node = createBaseToken(9 /* BigIntLiteral */);
|
|
12945
|
+
node.text = typeof value === "string" ? value : pseudoBigIntToString(value) + "n";
|
|
12890
12946
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
12891
12947
|
return node;
|
|
12892
12948
|
}
|
|
12893
12949
|
function createBaseStringLiteral(text, isSingleQuote) {
|
|
12894
|
-
const node =
|
|
12950
|
+
const node = createBaseDeclaration(10 /* StringLiteral */);
|
|
12951
|
+
node.text = text;
|
|
12895
12952
|
node.singleQuote = isSingleQuote;
|
|
12896
12953
|
return node;
|
|
12897
12954
|
}
|
|
@@ -12908,7 +12965,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12908
12965
|
return node;
|
|
12909
12966
|
}
|
|
12910
12967
|
function createRegularExpressionLiteral(text) {
|
|
12911
|
-
const node =
|
|
12968
|
+
const node = createBaseToken(13 /* RegularExpressionLiteral */);
|
|
12969
|
+
node.text = text;
|
|
12912
12970
|
return node;
|
|
12913
12971
|
}
|
|
12914
12972
|
function createLiteralLikeNode(kind, text) {
|
|
@@ -12929,20 +12987,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12929
12987
|
return createTemplateLiteralLikeNode(kind, text, void 0, 0);
|
|
12930
12988
|
}
|
|
12931
12989
|
}
|
|
12932
|
-
function createBaseIdentifier(
|
|
12933
|
-
if (originalKeywordKind === void 0 && text) {
|
|
12934
|
-
originalKeywordKind = stringToToken(text);
|
|
12935
|
-
}
|
|
12936
|
-
if (originalKeywordKind === 79 /* Identifier */) {
|
|
12937
|
-
originalKeywordKind = void 0;
|
|
12938
|
-
}
|
|
12990
|
+
function createBaseIdentifier(escapedText, originalKeywordKind) {
|
|
12939
12991
|
const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
|
|
12940
12992
|
node.originalKeywordKind = originalKeywordKind;
|
|
12941
|
-
node.escapedText =
|
|
12993
|
+
node.escapedText = escapedText;
|
|
12994
|
+
node.autoGenerateFlags = 0 /* None */;
|
|
12942
12995
|
return node;
|
|
12943
12996
|
}
|
|
12944
12997
|
function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
12945
|
-
const node = createBaseIdentifier(text, void 0);
|
|
12998
|
+
const node = createBaseIdentifier(escapeLeadingUnderscores(text), void 0);
|
|
12946
12999
|
node.autoGenerateFlags = autoGenerateFlags;
|
|
12947
13000
|
node.autoGenerateId = nextAutoGenerateId;
|
|
12948
13001
|
node.autoGeneratePrefix = prefix;
|
|
@@ -12951,15 +13004,23 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12951
13004
|
return node;
|
|
12952
13005
|
}
|
|
12953
13006
|
function createIdentifier(text, typeArguments, originalKeywordKind, hasExtendedUnicodeEscape) {
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
13007
|
+
if (originalKeywordKind === void 0 && text) {
|
|
13008
|
+
originalKeywordKind = stringToToken(text);
|
|
13009
|
+
}
|
|
13010
|
+
if (originalKeywordKind === 79 /* Identifier */) {
|
|
13011
|
+
originalKeywordKind = void 0;
|
|
12957
13012
|
}
|
|
13013
|
+
const node = createBaseIdentifier(escapeLeadingUnderscores(text), originalKeywordKind);
|
|
13014
|
+
node.typeArguments = asNodeArray(typeArguments);
|
|
13015
|
+
node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
|
|
13016
|
+
node.jsDoc = void 0;
|
|
13017
|
+
node.jsDocCache = void 0;
|
|
13018
|
+
node.flowNode = void 0;
|
|
13019
|
+
node.symbol = void 0;
|
|
12958
13020
|
if (node.originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
12959
13021
|
node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
|
|
12960
13022
|
}
|
|
12961
|
-
if (hasExtendedUnicodeEscape) {
|
|
12962
|
-
node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
|
|
13023
|
+
if (node.hasExtendedUnicodeEscape) {
|
|
12963
13024
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
12964
13025
|
}
|
|
12965
13026
|
return node;
|
|
@@ -12997,19 +13058,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12997
13058
|
name.original = node;
|
|
12998
13059
|
return name;
|
|
12999
13060
|
}
|
|
13000
|
-
function createBasePrivateIdentifier(
|
|
13061
|
+
function createBasePrivateIdentifier(escapedText) {
|
|
13001
13062
|
const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
|
|
13002
|
-
node.escapedText =
|
|
13063
|
+
node.escapedText = escapedText;
|
|
13064
|
+
node.autoGenerateFlags = 0 /* None */;
|
|
13003
13065
|
node.transformFlags |= 16777216 /* ContainsClassFields */;
|
|
13004
13066
|
return node;
|
|
13005
13067
|
}
|
|
13006
13068
|
function createPrivateIdentifier(text) {
|
|
13007
13069
|
if (!startsWith(text, "#"))
|
|
13008
13070
|
Debug.fail("First character of private identifier must be #: " + text);
|
|
13009
|
-
return createBasePrivateIdentifier(text);
|
|
13071
|
+
return createBasePrivateIdentifier(escapeLeadingUnderscores(text));
|
|
13010
13072
|
}
|
|
13011
13073
|
function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
13012
|
-
const node = createBasePrivateIdentifier(text);
|
|
13074
|
+
const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));
|
|
13013
13075
|
node.autoGenerateFlags = autoGenerateFlags;
|
|
13014
13076
|
node.autoGenerateId = nextAutoGenerateId;
|
|
13015
13077
|
node.autoGeneratePrefix = prefix;
|
|
@@ -13069,6 +13131,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13069
13131
|
break;
|
|
13070
13132
|
case 106 /* SuperKeyword */:
|
|
13071
13133
|
transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */;
|
|
13134
|
+
node.flowNode = void 0;
|
|
13072
13135
|
break;
|
|
13073
13136
|
case 124 /* StaticKeyword */:
|
|
13074
13137
|
transformFlags = 1024 /* ContainsES2015 */;
|
|
@@ -13078,6 +13141,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13078
13141
|
break;
|
|
13079
13142
|
case 108 /* ThisKeyword */:
|
|
13080
13143
|
transformFlags = 16384 /* ContainsLexicalThis */;
|
|
13144
|
+
node.flowNode = void 0;
|
|
13081
13145
|
break;
|
|
13082
13146
|
}
|
|
13083
13147
|
if (transformFlags) {
|
|
@@ -13142,6 +13206,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13142
13206
|
node.left = left;
|
|
13143
13207
|
node.right = asName(right);
|
|
13144
13208
|
node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right);
|
|
13209
|
+
node.flowNode = void 0;
|
|
13145
13210
|
return node;
|
|
13146
13211
|
}
|
|
13147
13212
|
function updateQualifiedName(node, left, right) {
|
|
@@ -13157,40 +13222,36 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13157
13222
|
return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node;
|
|
13158
13223
|
}
|
|
13159
13224
|
function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) {
|
|
13160
|
-
const node =
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
name
|
|
13164
|
-
);
|
|
13225
|
+
const node = createBaseDeclaration(165 /* TypeParameter */);
|
|
13226
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13227
|
+
node.name = asName(name);
|
|
13165
13228
|
node.constraint = constraint;
|
|
13166
13229
|
node.default = defaultType;
|
|
13167
13230
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13231
|
+
node.expression = void 0;
|
|
13232
|
+
node.jsDoc = void 0;
|
|
13233
|
+
node.jsDocCache = void 0;
|
|
13168
13234
|
return node;
|
|
13169
13235
|
}
|
|
13170
13236
|
function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) {
|
|
13171
13237
|
return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node;
|
|
13172
13238
|
}
|
|
13173
13239
|
function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
name,
|
|
13178
|
-
type,
|
|
13179
|
-
initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer)
|
|
13180
|
-
);
|
|
13240
|
+
var _a2, _b;
|
|
13241
|
+
const node = createBaseDeclaration(166 /* Parameter */);
|
|
13242
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13181
13243
|
node.dotDotDotToken = dotDotDotToken;
|
|
13244
|
+
node.name = asName(name);
|
|
13182
13245
|
node.questionToken = questionToken;
|
|
13246
|
+
node.type = type;
|
|
13247
|
+
node.initializer = asInitializer(initializer);
|
|
13183
13248
|
if (isThisIdentifier(node.name)) {
|
|
13184
13249
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13185
13250
|
} else {
|
|
13186
|
-
node.transformFlags
|
|
13187
|
-
if (questionToken)
|
|
13188
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13189
|
-
if (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */)
|
|
13190
|
-
node.transformFlags |= 8192 /* ContainsTypeScriptClassSyntax */;
|
|
13191
|
-
if (initializer || dotDotDotToken)
|
|
13192
|
-
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
13251
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (((_a2 = node.questionToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */) | (((_b = node.dotDotDotToken) != null ? _b : node.initializer) ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);
|
|
13193
13252
|
}
|
|
13253
|
+
node.jsDoc = void 0;
|
|
13254
|
+
node.jsDocCache = void 0;
|
|
13194
13255
|
return node;
|
|
13195
13256
|
}
|
|
13196
13257
|
function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
@@ -13206,15 +13267,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13206
13267
|
return node.expression !== expression ? update(createDecorator(expression), node) : node;
|
|
13207
13268
|
}
|
|
13208
13269
|
function createPropertySignature(modifiers, name, questionToken, type) {
|
|
13209
|
-
const node =
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
name
|
|
13213
|
-
);
|
|
13270
|
+
const node = createBaseDeclaration(168 /* PropertySignature */);
|
|
13271
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13272
|
+
node.name = asName(name);
|
|
13214
13273
|
node.type = type;
|
|
13215
13274
|
node.questionToken = questionToken;
|
|
13216
13275
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13217
13276
|
node.initializer = void 0;
|
|
13277
|
+
node.jsDoc = void 0;
|
|
13278
|
+
node.jsDocCache = void 0;
|
|
13218
13279
|
return node;
|
|
13219
13280
|
}
|
|
13220
13281
|
function updatePropertySignature(node, modifiers, name, questionToken, type) {
|
|
@@ -13227,69 +13288,68 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13227
13288
|
return update(updated, original);
|
|
13228
13289
|
}
|
|
13229
13290
|
function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
13230
|
-
const node =
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
name,
|
|
13234
|
-
type,
|
|
13235
|
-
initializer
|
|
13236
|
-
);
|
|
13291
|
+
const node = createBaseDeclaration(169 /* PropertyDeclaration */);
|
|
13292
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13293
|
+
node.name = asName(name);
|
|
13237
13294
|
node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;
|
|
13238
13295
|
node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;
|
|
13239
|
-
node.
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
}
|
|
13296
|
+
node.type = type;
|
|
13297
|
+
node.initializer = asInitializer(initializer);
|
|
13298
|
+
const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */;
|
|
13299
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;
|
|
13300
|
+
node.jsDoc = void 0;
|
|
13301
|
+
node.jsDocCache = void 0;
|
|
13246
13302
|
return node;
|
|
13247
13303
|
}
|
|
13248
13304
|
function updatePropertyDeclaration(node, modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
13249
13305
|
return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node;
|
|
13250
13306
|
}
|
|
13251
13307
|
function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) {
|
|
13252
|
-
const node =
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
name,
|
|
13256
|
-
typeParameters,
|
|
13257
|
-
parameters,
|
|
13258
|
-
type
|
|
13259
|
-
);
|
|
13308
|
+
const node = createBaseDeclaration(170 /* MethodSignature */);
|
|
13309
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13310
|
+
node.name = asName(name);
|
|
13260
13311
|
node.questionToken = questionToken;
|
|
13312
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
13313
|
+
node.parameters = asNodeArray(parameters);
|
|
13314
|
+
node.type = type;
|
|
13261
13315
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13316
|
+
node.jsDoc = void 0;
|
|
13317
|
+
node.jsDocCache = void 0;
|
|
13318
|
+
node.locals = void 0;
|
|
13319
|
+
node.nextContainer = void 0;
|
|
13320
|
+
node.typeArguments = void 0;
|
|
13262
13321
|
return node;
|
|
13263
13322
|
}
|
|
13264
13323
|
function updateMethodSignature(node, modifiers, name, questionToken, typeParameters, parameters, type) {
|
|
13265
13324
|
return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node;
|
|
13266
13325
|
}
|
|
13267
13326
|
function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
13268
|
-
const node =
|
|
13269
|
-
|
|
13270
|
-
modifiers,
|
|
13271
|
-
name,
|
|
13272
|
-
typeParameters,
|
|
13273
|
-
parameters,
|
|
13274
|
-
type,
|
|
13275
|
-
body
|
|
13276
|
-
);
|
|
13327
|
+
const node = createBaseDeclaration(171 /* MethodDeclaration */);
|
|
13328
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13277
13329
|
node.asteriskToken = asteriskToken;
|
|
13330
|
+
node.name = asName(name);
|
|
13278
13331
|
node.questionToken = questionToken;
|
|
13279
|
-
node.transformFlags |= propagateChildFlags(node.asteriskToken) | propagateChildFlags(node.questionToken) | 1024 /* ContainsES2015 */;
|
|
13280
|
-
if (questionToken) {
|
|
13281
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13282
|
-
}
|
|
13283
|
-
if (modifiersToFlags(node.modifiers) & 512 /* Async */) {
|
|
13284
|
-
if (asteriskToken) {
|
|
13285
|
-
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
13286
|
-
} else {
|
|
13287
|
-
node.transformFlags |= 256 /* ContainsES2017 */;
|
|
13288
|
-
}
|
|
13289
|
-
} else if (asteriskToken) {
|
|
13290
|
-
node.transformFlags |= 2048 /* ContainsGenerator */;
|
|
13291
|
-
}
|
|
13292
13332
|
node.exclamationToken = void 0;
|
|
13333
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
13334
|
+
node.parameters = createNodeArray(parameters);
|
|
13335
|
+
node.type = type;
|
|
13336
|
+
node.body = body;
|
|
13337
|
+
if (!node.body) {
|
|
13338
|
+
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13339
|
+
} else {
|
|
13340
|
+
const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
|
|
13341
|
+
const isGenerator = !!node.asteriskToken;
|
|
13342
|
+
const isAsyncGenerator = isAsync && isGenerator;
|
|
13343
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
13344
|
+
}
|
|
13345
|
+
node.typeArguments = void 0;
|
|
13346
|
+
node.jsDoc = void 0;
|
|
13347
|
+
node.jsDocCache = void 0;
|
|
13348
|
+
node.locals = void 0;
|
|
13349
|
+
node.nextContainer = void 0;
|
|
13350
|
+
node.flowNode = void 0;
|
|
13351
|
+
node.endFlowNode = void 0;
|
|
13352
|
+
node.returnFlowNode = void 0;
|
|
13293
13353
|
return node;
|
|
13294
13354
|
}
|
|
13295
13355
|
function updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
|
|
@@ -13302,16 +13362,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13302
13362
|
return update(updated, original);
|
|
13303
13363
|
}
|
|
13304
13364
|
function createClassStaticBlockDeclaration(body) {
|
|
13305
|
-
const node =
|
|
13306
|
-
172 /* ClassStaticBlockDeclaration */,
|
|
13307
|
-
void 0,
|
|
13308
|
-
void 0,
|
|
13309
|
-
void 0
|
|
13310
|
-
);
|
|
13365
|
+
const node = createBaseDeclaration(172 /* ClassStaticBlockDeclaration */);
|
|
13311
13366
|
node.body = body;
|
|
13312
13367
|
node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */;
|
|
13313
13368
|
node.illegalDecorators = void 0;
|
|
13314
13369
|
node.modifiers = void 0;
|
|
13370
|
+
node.jsDoc = void 0;
|
|
13371
|
+
node.jsDocCache = void 0;
|
|
13372
|
+
node.locals = void 0;
|
|
13373
|
+
node.nextContainer = void 0;
|
|
13374
|
+
node.endFlowNode = void 0;
|
|
13375
|
+
node.returnFlowNode = void 0;
|
|
13315
13376
|
return node;
|
|
13316
13377
|
}
|
|
13317
13378
|
function updateClassStaticBlockDeclaration(node, body) {
|
|
@@ -13325,19 +13386,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13325
13386
|
return update(updated, original);
|
|
13326
13387
|
}
|
|
13327
13388
|
function createConstructorDeclaration(modifiers, parameters, body) {
|
|
13328
|
-
const node =
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
parameters,
|
|
13334
|
-
void 0,
|
|
13335
|
-
body
|
|
13336
|
-
);
|
|
13337
|
-
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
13389
|
+
const node = createBaseDeclaration(173 /* Constructor */);
|
|
13390
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13391
|
+
node.parameters = createNodeArray(parameters);
|
|
13392
|
+
node.body = body;
|
|
13393
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */;
|
|
13338
13394
|
node.illegalDecorators = void 0;
|
|
13339
13395
|
node.typeParameters = void 0;
|
|
13340
13396
|
node.type = void 0;
|
|
13397
|
+
node.typeArguments = void 0;
|
|
13398
|
+
node.jsDoc = void 0;
|
|
13399
|
+
node.jsDocCache = void 0;
|
|
13400
|
+
node.locals = void 0;
|
|
13401
|
+
node.nextContainer = void 0;
|
|
13402
|
+
node.endFlowNode = void 0;
|
|
13403
|
+
node.returnFlowNode = void 0;
|
|
13341
13404
|
return node;
|
|
13342
13405
|
}
|
|
13343
13406
|
function updateConstructorDeclaration(node, modifiers, parameters, body) {
|
|
@@ -13352,16 +13415,26 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13352
13415
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
13353
13416
|
}
|
|
13354
13417
|
function createGetAccessorDeclaration(modifiers, name, parameters, type, body) {
|
|
13355
|
-
const node =
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13418
|
+
const node = createBaseDeclaration(174 /* GetAccessor */);
|
|
13419
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13420
|
+
node.name = asName(name);
|
|
13421
|
+
node.parameters = createNodeArray(parameters);
|
|
13422
|
+
node.type = type;
|
|
13423
|
+
node.body = body;
|
|
13424
|
+
if (!node.body) {
|
|
13425
|
+
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13426
|
+
} else {
|
|
13427
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
13428
|
+
}
|
|
13429
|
+
node.typeArguments = void 0;
|
|
13364
13430
|
node.typeParameters = void 0;
|
|
13431
|
+
node.jsDoc = void 0;
|
|
13432
|
+
node.jsDocCache = void 0;
|
|
13433
|
+
node.locals = void 0;
|
|
13434
|
+
node.nextContainer = void 0;
|
|
13435
|
+
node.flowNode = void 0;
|
|
13436
|
+
node.endFlowNode = void 0;
|
|
13437
|
+
node.returnFlowNode = void 0;
|
|
13365
13438
|
return node;
|
|
13366
13439
|
}
|
|
13367
13440
|
function updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body) {
|
|
@@ -13374,17 +13447,26 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13374
13447
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
13375
13448
|
}
|
|
13376
13449
|
function createSetAccessorDeclaration(modifiers, name, parameters, body) {
|
|
13377
|
-
const node =
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
|
|
13381
|
-
|
|
13382
|
-
|
|
13383
|
-
|
|
13384
|
-
|
|
13385
|
-
|
|
13450
|
+
const node = createBaseDeclaration(175 /* SetAccessor */);
|
|
13451
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13452
|
+
node.name = asName(name);
|
|
13453
|
+
node.parameters = createNodeArray(parameters);
|
|
13454
|
+
node.body = body;
|
|
13455
|
+
if (!node.body) {
|
|
13456
|
+
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13457
|
+
} else {
|
|
13458
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
13459
|
+
}
|
|
13460
|
+
node.typeArguments = void 0;
|
|
13386
13461
|
node.typeParameters = void 0;
|
|
13387
13462
|
node.type = void 0;
|
|
13463
|
+
node.jsDoc = void 0;
|
|
13464
|
+
node.jsDocCache = void 0;
|
|
13465
|
+
node.locals = void 0;
|
|
13466
|
+
node.nextContainer = void 0;
|
|
13467
|
+
node.flowNode = void 0;
|
|
13468
|
+
node.endFlowNode = void 0;
|
|
13469
|
+
node.returnFlowNode = void 0;
|
|
13388
13470
|
return node;
|
|
13389
13471
|
}
|
|
13390
13472
|
function updateSetAccessorDeclaration(node, modifiers, name, parameters, body) {
|
|
@@ -13398,45 +13480,49 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13398
13480
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
13399
13481
|
}
|
|
13400
13482
|
function createCallSignature(typeParameters, parameters, type) {
|
|
13401
|
-
const node =
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
|
|
13405
|
-
typeParameters,
|
|
13406
|
-
parameters,
|
|
13407
|
-
type
|
|
13408
|
-
);
|
|
13483
|
+
const node = createBaseDeclaration(176 /* CallSignature */);
|
|
13484
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
13485
|
+
node.parameters = asNodeArray(parameters);
|
|
13486
|
+
node.type = type;
|
|
13409
13487
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13488
|
+
node.jsDoc = void 0;
|
|
13489
|
+
node.jsDocCache = void 0;
|
|
13490
|
+
node.locals = void 0;
|
|
13491
|
+
node.nextContainer = void 0;
|
|
13492
|
+
node.typeArguments = void 0;
|
|
13410
13493
|
return node;
|
|
13411
13494
|
}
|
|
13412
13495
|
function updateCallSignature(node, typeParameters, parameters, type) {
|
|
13413
13496
|
return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node;
|
|
13414
13497
|
}
|
|
13415
13498
|
function createConstructSignature(typeParameters, parameters, type) {
|
|
13416
|
-
const node =
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
|
-
typeParameters,
|
|
13421
|
-
parameters,
|
|
13422
|
-
type
|
|
13423
|
-
);
|
|
13499
|
+
const node = createBaseDeclaration(177 /* ConstructSignature */);
|
|
13500
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
13501
|
+
node.parameters = asNodeArray(parameters);
|
|
13502
|
+
node.type = type;
|
|
13424
13503
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13504
|
+
node.jsDoc = void 0;
|
|
13505
|
+
node.jsDocCache = void 0;
|
|
13506
|
+
node.locals = void 0;
|
|
13507
|
+
node.nextContainer = void 0;
|
|
13508
|
+
node.typeArguments = void 0;
|
|
13425
13509
|
return node;
|
|
13426
13510
|
}
|
|
13427
13511
|
function updateConstructSignature(node, typeParameters, parameters, type) {
|
|
13428
13512
|
return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node;
|
|
13429
13513
|
}
|
|
13430
13514
|
function createIndexSignature(modifiers, parameters, type) {
|
|
13431
|
-
const node =
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
void 0,
|
|
13436
|
-
parameters,
|
|
13437
|
-
type
|
|
13438
|
-
);
|
|
13515
|
+
const node = createBaseDeclaration(178 /* IndexSignature */);
|
|
13516
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13517
|
+
node.parameters = asNodeArray(parameters);
|
|
13518
|
+
node.type = type;
|
|
13439
13519
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13520
|
+
node.illegalDecorators = void 0;
|
|
13521
|
+
node.jsDoc = void 0;
|
|
13522
|
+
node.jsDocCache = void 0;
|
|
13523
|
+
node.locals = void 0;
|
|
13524
|
+
node.nextContainer = void 0;
|
|
13525
|
+
node.typeArguments = void 0;
|
|
13440
13526
|
return node;
|
|
13441
13527
|
}
|
|
13442
13528
|
function updateIndexSignature(node, modifiers, parameters, type) {
|
|
@@ -13477,16 +13563,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13477
13563
|
return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node;
|
|
13478
13564
|
}
|
|
13479
13565
|
function createFunctionTypeNode(typeParameters, parameters, type) {
|
|
13480
|
-
const node =
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
typeParameters,
|
|
13485
|
-
parameters,
|
|
13486
|
-
type
|
|
13487
|
-
);
|
|
13566
|
+
const node = createBaseDeclaration(181 /* FunctionType */);
|
|
13567
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
13568
|
+
node.parameters = asNodeArray(parameters);
|
|
13569
|
+
node.type = type;
|
|
13488
13570
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13489
13571
|
node.modifiers = void 0;
|
|
13572
|
+
node.jsDoc = void 0;
|
|
13573
|
+
node.jsDocCache = void 0;
|
|
13574
|
+
node.locals = void 0;
|
|
13575
|
+
node.nextContainer = void 0;
|
|
13576
|
+
node.typeArguments = void 0;
|
|
13490
13577
|
return node;
|
|
13491
13578
|
}
|
|
13492
13579
|
function updateFunctionTypeNode(node, typeParameters, parameters, type) {
|
|
@@ -13502,15 +13589,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13502
13589
|
return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified.");
|
|
13503
13590
|
}
|
|
13504
13591
|
function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {
|
|
13505
|
-
const node =
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13510
|
-
parameters,
|
|
13511
|
-
type
|
|
13512
|
-
);
|
|
13592
|
+
const node = createBaseDeclaration(182 /* ConstructorType */);
|
|
13593
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13594
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
13595
|
+
node.parameters = asNodeArray(parameters);
|
|
13596
|
+
node.type = type;
|
|
13513
13597
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13598
|
+
node.jsDoc = void 0;
|
|
13599
|
+
node.jsDocCache = void 0;
|
|
13600
|
+
node.locals = void 0;
|
|
13601
|
+
node.nextContainer = void 0;
|
|
13602
|
+
node.typeArguments = void 0;
|
|
13514
13603
|
return node;
|
|
13515
13604
|
}
|
|
13516
13605
|
function createConstructorTypeNode2(typeParameters, parameters, type) {
|
|
@@ -13536,7 +13625,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13536
13625
|
return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node;
|
|
13537
13626
|
}
|
|
13538
13627
|
function createTypeLiteralNode(members) {
|
|
13539
|
-
const node =
|
|
13628
|
+
const node = createBaseDeclaration(184 /* TypeLiteral */);
|
|
13540
13629
|
node.members = createNodeArray(members);
|
|
13541
13630
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13542
13631
|
return node;
|
|
@@ -13563,12 +13652,14 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13563
13652
|
return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node;
|
|
13564
13653
|
}
|
|
13565
13654
|
function createNamedTupleMember(dotDotDotToken, name, questionToken, type) {
|
|
13566
|
-
const node =
|
|
13655
|
+
const node = createBaseDeclaration(199 /* NamedTupleMember */);
|
|
13567
13656
|
node.dotDotDotToken = dotDotDotToken;
|
|
13568
13657
|
node.name = name;
|
|
13569
13658
|
node.questionToken = questionToken;
|
|
13570
13659
|
node.type = type;
|
|
13571
13660
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13661
|
+
node.jsDoc = void 0;
|
|
13662
|
+
node.jsDocCache = void 0;
|
|
13572
13663
|
return node;
|
|
13573
13664
|
}
|
|
13574
13665
|
function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {
|
|
@@ -13620,6 +13711,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13620
13711
|
node.trueType = trueType;
|
|
13621
13712
|
node.falseType = falseType;
|
|
13622
13713
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13714
|
+
node.locals = void 0;
|
|
13715
|
+
node.nextContainer = void 0;
|
|
13623
13716
|
return node;
|
|
13624
13717
|
}
|
|
13625
13718
|
function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) {
|
|
@@ -13692,7 +13785,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13692
13785
|
return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node;
|
|
13693
13786
|
}
|
|
13694
13787
|
function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
|
|
13695
|
-
const node =
|
|
13788
|
+
const node = createBaseDeclaration(197 /* MappedType */);
|
|
13696
13789
|
node.readonlyToken = readonlyToken;
|
|
13697
13790
|
node.typeParameter = typeParameter;
|
|
13698
13791
|
node.nameType = nameType;
|
|
@@ -13700,6 +13793,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13700
13793
|
node.type = type;
|
|
13701
13794
|
node.members = members && createNodeArray(members);
|
|
13702
13795
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13796
|
+
node.locals = void 0;
|
|
13797
|
+
node.nextContainer = void 0;
|
|
13703
13798
|
return node;
|
|
13704
13799
|
}
|
|
13705
13800
|
function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
|
|
@@ -13736,31 +13831,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13736
13831
|
return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node;
|
|
13737
13832
|
}
|
|
13738
13833
|
function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
|
|
13739
|
-
const node =
|
|
13740
|
-
205 /* BindingElement */,
|
|
13741
|
-
void 0,
|
|
13742
|
-
name,
|
|
13743
|
-
initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer)
|
|
13744
|
-
);
|
|
13745
|
-
node.propertyName = asName(propertyName);
|
|
13834
|
+
const node = createBaseDeclaration(205 /* BindingElement */);
|
|
13746
13835
|
node.dotDotDotToken = dotDotDotToken;
|
|
13747
|
-
node.
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
node.transformFlags |= 32768 /* ContainsRestOrSpread */;
|
|
13836
|
+
node.propertyName = asName(propertyName);
|
|
13837
|
+
node.name = asName(name);
|
|
13838
|
+
node.initializer = asInitializer(initializer);
|
|
13839
|
+
node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.propertyName) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (node.dotDotDotToken ? 32768 /* ContainsRestOrSpread */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
13840
|
+
node.flowNode = void 0;
|
|
13753
13841
|
return node;
|
|
13754
13842
|
}
|
|
13755
13843
|
function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
|
|
13756
13844
|
return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node;
|
|
13757
13845
|
}
|
|
13758
|
-
function createBaseExpression(kind) {
|
|
13759
|
-
const node = createBaseNode(kind);
|
|
13760
|
-
return node;
|
|
13761
|
-
}
|
|
13762
13846
|
function createArrayLiteralExpression(elements, multiLine) {
|
|
13763
|
-
const node =
|
|
13847
|
+
const node = createBaseNode(206 /* ArrayLiteralExpression */);
|
|
13764
13848
|
const lastElement = elements && lastOrUndefined(elements);
|
|
13765
13849
|
const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0);
|
|
13766
13850
|
node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray);
|
|
@@ -13772,20 +13856,34 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13772
13856
|
return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node;
|
|
13773
13857
|
}
|
|
13774
13858
|
function createObjectLiteralExpression(properties, multiLine) {
|
|
13775
|
-
const node =
|
|
13859
|
+
const node = createBaseDeclaration(207 /* ObjectLiteralExpression */);
|
|
13776
13860
|
node.properties = createNodeArray(properties);
|
|
13777
13861
|
node.multiLine = multiLine;
|
|
13778
13862
|
node.transformFlags |= propagateChildrenFlags(node.properties);
|
|
13863
|
+
node.jsDoc = void 0;
|
|
13864
|
+
node.jsDocCache = void 0;
|
|
13779
13865
|
return node;
|
|
13780
13866
|
}
|
|
13781
13867
|
function updateObjectLiteralExpression(node, properties) {
|
|
13782
13868
|
return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node;
|
|
13783
13869
|
}
|
|
13870
|
+
function createBasePropertyAccessExpression(expression, questionDotToken, name) {
|
|
13871
|
+
const node = createBaseDeclaration(208 /* PropertyAccessExpression */);
|
|
13872
|
+
node.expression = expression;
|
|
13873
|
+
node.questionDotToken = questionDotToken;
|
|
13874
|
+
node.name = name;
|
|
13875
|
+
node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
13876
|
+
node.jsDoc = void 0;
|
|
13877
|
+
node.jsDocCache = void 0;
|
|
13878
|
+
node.flowNode = void 0;
|
|
13879
|
+
return node;
|
|
13880
|
+
}
|
|
13784
13881
|
function createPropertyAccessExpression(expression, name) {
|
|
13785
|
-
const node =
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13882
|
+
const node = createBasePropertyAccessExpression(
|
|
13883
|
+
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false),
|
|
13884
|
+
void 0,
|
|
13885
|
+
asName(name)
|
|
13886
|
+
);
|
|
13789
13887
|
if (isSuperKeyword(expression)) {
|
|
13790
13888
|
node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;
|
|
13791
13889
|
}
|
|
@@ -13798,23 +13896,36 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13798
13896
|
return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node;
|
|
13799
13897
|
}
|
|
13800
13898
|
function createPropertyAccessChain(expression, questionDotToken, name) {
|
|
13801
|
-
const node =
|
|
13899
|
+
const node = createBasePropertyAccessExpression(
|
|
13900
|
+
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true),
|
|
13901
|
+
questionDotToken,
|
|
13902
|
+
asName(name)
|
|
13903
|
+
);
|
|
13802
13904
|
node.flags |= 32 /* OptionalChain */;
|
|
13803
|
-
node.
|
|
13804
|
-
node.questionDotToken = questionDotToken;
|
|
13805
|
-
node.name = asName(name);
|
|
13806
|
-
node.transformFlags |= 32 /* ContainsES2020 */ | propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
13905
|
+
node.transformFlags |= 32 /* ContainsES2020 */;
|
|
13807
13906
|
return node;
|
|
13808
13907
|
}
|
|
13809
13908
|
function updatePropertyAccessChain(node, expression, questionDotToken, name) {
|
|
13810
13909
|
Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead.");
|
|
13811
13910
|
return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node;
|
|
13812
13911
|
}
|
|
13912
|
+
function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) {
|
|
13913
|
+
const node = createBaseDeclaration(209 /* ElementAccessExpression */);
|
|
13914
|
+
node.expression = expression;
|
|
13915
|
+
node.questionDotToken = questionDotToken;
|
|
13916
|
+
node.argumentExpression = argumentExpression;
|
|
13917
|
+
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression);
|
|
13918
|
+
node.jsDoc = void 0;
|
|
13919
|
+
node.jsDocCache = void 0;
|
|
13920
|
+
node.flowNode = void 0;
|
|
13921
|
+
return node;
|
|
13922
|
+
}
|
|
13813
13923
|
function createElementAccessExpression(expression, index) {
|
|
13814
|
-
const node =
|
|
13815
|
-
|
|
13816
|
-
|
|
13817
|
-
|
|
13924
|
+
const node = createBaseElementAccessExpression(
|
|
13925
|
+
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false),
|
|
13926
|
+
void 0,
|
|
13927
|
+
asExpression(index)
|
|
13928
|
+
);
|
|
13818
13929
|
if (isSuperKeyword(expression)) {
|
|
13819
13930
|
node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */;
|
|
13820
13931
|
}
|
|
@@ -13827,31 +13938,43 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13827
13938
|
return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node;
|
|
13828
13939
|
}
|
|
13829
13940
|
function createElementAccessChain(expression, questionDotToken, index) {
|
|
13830
|
-
const node =
|
|
13941
|
+
const node = createBaseElementAccessExpression(
|
|
13942
|
+
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true),
|
|
13943
|
+
questionDotToken,
|
|
13944
|
+
asExpression(index)
|
|
13945
|
+
);
|
|
13831
13946
|
node.flags |= 32 /* OptionalChain */;
|
|
13832
|
-
node.
|
|
13833
|
-
node.questionDotToken = questionDotToken;
|
|
13834
|
-
node.argumentExpression = asExpression(index);
|
|
13835
|
-
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression) | 32 /* ContainsES2020 */;
|
|
13947
|
+
node.transformFlags |= 32 /* ContainsES2020 */;
|
|
13836
13948
|
return node;
|
|
13837
13949
|
}
|
|
13838
13950
|
function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) {
|
|
13839
13951
|
Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead.");
|
|
13840
13952
|
return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node;
|
|
13841
13953
|
}
|
|
13842
|
-
function
|
|
13843
|
-
const node =
|
|
13844
|
-
node.expression =
|
|
13845
|
-
node.
|
|
13846
|
-
node.
|
|
13847
|
-
node.
|
|
13954
|
+
function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) {
|
|
13955
|
+
const node = createBaseDeclaration(210 /* CallExpression */);
|
|
13956
|
+
node.expression = expression;
|
|
13957
|
+
node.questionDotToken = questionDotToken;
|
|
13958
|
+
node.typeArguments = typeArguments;
|
|
13959
|
+
node.arguments = argumentsArray;
|
|
13960
|
+
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments);
|
|
13848
13961
|
if (node.typeArguments) {
|
|
13849
13962
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13850
13963
|
}
|
|
13964
|
+
if (isSuperProperty(node.expression)) {
|
|
13965
|
+
node.transformFlags |= 16384 /* ContainsLexicalThis */;
|
|
13966
|
+
}
|
|
13967
|
+
return node;
|
|
13968
|
+
}
|
|
13969
|
+
function createCallExpression(expression, typeArguments, argumentsArray) {
|
|
13970
|
+
const node = createBaseCallExpression(
|
|
13971
|
+
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false),
|
|
13972
|
+
void 0,
|
|
13973
|
+
asNodeArray(typeArguments),
|
|
13974
|
+
parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray))
|
|
13975
|
+
);
|
|
13851
13976
|
if (isImportKeyword(node.expression)) {
|
|
13852
13977
|
node.transformFlags |= 8388608 /* ContainsDynamicImport */;
|
|
13853
|
-
} else if (isSuperProperty(node.expression)) {
|
|
13854
|
-
node.transformFlags |= 16384 /* ContainsLexicalThis */;
|
|
13855
13978
|
}
|
|
13856
13979
|
return node;
|
|
13857
13980
|
}
|
|
@@ -13862,19 +13985,14 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13862
13985
|
return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node;
|
|
13863
13986
|
}
|
|
13864
13987
|
function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) {
|
|
13865
|
-
const node =
|
|
13988
|
+
const node = createBaseCallExpression(
|
|
13989
|
+
parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true),
|
|
13990
|
+
questionDotToken,
|
|
13991
|
+
asNodeArray(typeArguments),
|
|
13992
|
+
parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray))
|
|
13993
|
+
);
|
|
13866
13994
|
node.flags |= 32 /* OptionalChain */;
|
|
13867
|
-
node.
|
|
13868
|
-
node.questionDotToken = questionDotToken;
|
|
13869
|
-
node.typeArguments = asNodeArray(typeArguments);
|
|
13870
|
-
node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray));
|
|
13871
|
-
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments) | 32 /* ContainsES2020 */;
|
|
13872
|
-
if (node.typeArguments) {
|
|
13873
|
-
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
13874
|
-
}
|
|
13875
|
-
if (isSuperProperty(node.expression)) {
|
|
13876
|
-
node.transformFlags |= 16384 /* ContainsLexicalThis */;
|
|
13877
|
-
}
|
|
13995
|
+
node.transformFlags |= 32 /* ContainsES2020 */;
|
|
13878
13996
|
return node;
|
|
13879
13997
|
}
|
|
13880
13998
|
function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) {
|
|
@@ -13882,7 +14000,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13882
14000
|
return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node;
|
|
13883
14001
|
}
|
|
13884
14002
|
function createNewExpression(expression, typeArguments, argumentsArray) {
|
|
13885
|
-
const node =
|
|
14003
|
+
const node = createBaseDeclaration(211 /* NewExpression */);
|
|
13886
14004
|
node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression);
|
|
13887
14005
|
node.typeArguments = asNodeArray(typeArguments);
|
|
13888
14006
|
node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0;
|
|
@@ -13896,7 +14014,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13896
14014
|
return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node;
|
|
13897
14015
|
}
|
|
13898
14016
|
function createTaggedTemplateExpression(tag, typeArguments, template) {
|
|
13899
|
-
const node =
|
|
14017
|
+
const node = createBaseNode(212 /* TaggedTemplateExpression */);
|
|
13900
14018
|
node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false);
|
|
13901
14019
|
node.typeArguments = asNodeArray(typeArguments);
|
|
13902
14020
|
node.template = template;
|
|
@@ -13913,7 +14031,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13913
14031
|
return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node;
|
|
13914
14032
|
}
|
|
13915
14033
|
function createTypeAssertion(type, expression) {
|
|
13916
|
-
const node =
|
|
14034
|
+
const node = createBaseNode(213 /* TypeAssertionExpression */);
|
|
13917
14035
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
13918
14036
|
node.type = type;
|
|
13919
14037
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;
|
|
@@ -13923,65 +14041,67 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13923
14041
|
return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node;
|
|
13924
14042
|
}
|
|
13925
14043
|
function createParenthesizedExpression(expression) {
|
|
13926
|
-
const node =
|
|
14044
|
+
const node = createBaseNode(214 /* ParenthesizedExpression */);
|
|
13927
14045
|
node.expression = expression;
|
|
13928
14046
|
node.transformFlags = propagateChildFlags(node.expression);
|
|
14047
|
+
node.jsDoc = void 0;
|
|
14048
|
+
node.jsDocCache = void 0;
|
|
13929
14049
|
return node;
|
|
13930
14050
|
}
|
|
13931
14051
|
function updateParenthesizedExpression(node, expression) {
|
|
13932
14052
|
return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node;
|
|
13933
14053
|
}
|
|
13934
14054
|
function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
13935
|
-
const node =
|
|
13936
|
-
|
|
13937
|
-
modifiers,
|
|
13938
|
-
name,
|
|
13939
|
-
typeParameters,
|
|
13940
|
-
parameters,
|
|
13941
|
-
type,
|
|
13942
|
-
body
|
|
13943
|
-
);
|
|
14055
|
+
const node = createBaseDeclaration(215 /* FunctionExpression */);
|
|
14056
|
+
node.modifiers = asNodeArray(modifiers);
|
|
13944
14057
|
node.asteriskToken = asteriskToken;
|
|
13945
|
-
node.
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
13949
|
-
|
|
13950
|
-
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
|
|
13954
|
-
|
|
13955
|
-
|
|
13956
|
-
|
|
13957
|
-
|
|
14058
|
+
node.name = asName(name);
|
|
14059
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14060
|
+
node.parameters = createNodeArray(parameters);
|
|
14061
|
+
node.type = type;
|
|
14062
|
+
node.body = body;
|
|
14063
|
+
const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
|
|
14064
|
+
const isGenerator = !!node.asteriskToken;
|
|
14065
|
+
const isAsyncGenerator = isAsync && isGenerator;
|
|
14066
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14067
|
+
node.typeArguments = void 0;
|
|
14068
|
+
node.jsDoc = void 0;
|
|
14069
|
+
node.jsDocCache = void 0;
|
|
14070
|
+
node.locals = void 0;
|
|
14071
|
+
node.nextContainer = void 0;
|
|
14072
|
+
node.flowNode = void 0;
|
|
14073
|
+
node.endFlowNode = void 0;
|
|
14074
|
+
node.returnFlowNode = void 0;
|
|
13958
14075
|
return node;
|
|
13959
14076
|
}
|
|
13960
14077
|
function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
13961
14078
|
return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node;
|
|
13962
14079
|
}
|
|
13963
14080
|
function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
13964
|
-
const node =
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
parameters,
|
|
13970
|
-
type,
|
|
13971
|
-
parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body)
|
|
13972
|
-
);
|
|
14081
|
+
const node = createBaseDeclaration(216 /* ArrowFunction */);
|
|
14082
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14083
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14084
|
+
node.parameters = createNodeArray(parameters);
|
|
14085
|
+
node.type = type;
|
|
13973
14086
|
node.equalsGreaterThanToken = equalsGreaterThanToken != null ? equalsGreaterThanToken : createToken(38 /* EqualsGreaterThanToken */);
|
|
13974
|
-
node.
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
14087
|
+
node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body);
|
|
14088
|
+
const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
|
|
14089
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
14090
|
+
node.typeArguments = void 0;
|
|
14091
|
+
node.jsDoc = void 0;
|
|
14092
|
+
node.jsDocCache = void 0;
|
|
14093
|
+
node.locals = void 0;
|
|
14094
|
+
node.nextContainer = void 0;
|
|
14095
|
+
node.flowNode = void 0;
|
|
14096
|
+
node.endFlowNode = void 0;
|
|
14097
|
+
node.returnFlowNode = void 0;
|
|
13978
14098
|
return node;
|
|
13979
14099
|
}
|
|
13980
14100
|
function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
|
|
13981
14101
|
return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node;
|
|
13982
14102
|
}
|
|
13983
14103
|
function createDeleteExpression(expression) {
|
|
13984
|
-
const node =
|
|
14104
|
+
const node = createBaseNode(217 /* DeleteExpression */);
|
|
13985
14105
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
13986
14106
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
13987
14107
|
return node;
|
|
@@ -13990,7 +14110,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13990
14110
|
return node.expression !== expression ? update(createDeleteExpression(expression), node) : node;
|
|
13991
14111
|
}
|
|
13992
14112
|
function createTypeOfExpression(expression) {
|
|
13993
|
-
const node =
|
|
14113
|
+
const node = createBaseNode(218 /* TypeOfExpression */);
|
|
13994
14114
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
13995
14115
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
13996
14116
|
return node;
|
|
@@ -13999,7 +14119,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13999
14119
|
return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node;
|
|
14000
14120
|
}
|
|
14001
14121
|
function createVoidExpression(expression) {
|
|
14002
|
-
const node =
|
|
14122
|
+
const node = createBaseNode(219 /* VoidExpression */);
|
|
14003
14123
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14004
14124
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14005
14125
|
return node;
|
|
@@ -14008,7 +14128,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14008
14128
|
return node.expression !== expression ? update(createVoidExpression(expression), node) : node;
|
|
14009
14129
|
}
|
|
14010
14130
|
function createAwaitExpression(expression) {
|
|
14011
|
-
const node =
|
|
14131
|
+
const node = createBaseNode(220 /* AwaitExpression */);
|
|
14012
14132
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
14013
14133
|
node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */;
|
|
14014
14134
|
return node;
|
|
@@ -14017,7 +14137,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14017
14137
|
return node.expression !== expression ? update(createAwaitExpression(expression), node) : node;
|
|
14018
14138
|
}
|
|
14019
14139
|
function createPrefixUnaryExpression(operator, operand) {
|
|
14020
|
-
const node =
|
|
14140
|
+
const node = createBaseNode(221 /* PrefixUnaryExpression */);
|
|
14021
14141
|
node.operator = operator;
|
|
14022
14142
|
node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand);
|
|
14023
14143
|
node.transformFlags |= propagateChildFlags(node.operand);
|
|
@@ -14030,7 +14150,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14030
14150
|
return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node;
|
|
14031
14151
|
}
|
|
14032
14152
|
function createPostfixUnaryExpression(operand, operator) {
|
|
14033
|
-
const node =
|
|
14153
|
+
const node = createBaseNode(222 /* PostfixUnaryExpression */);
|
|
14034
14154
|
node.operator = operator;
|
|
14035
14155
|
node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand);
|
|
14036
14156
|
node.transformFlags |= propagateChildFlags(node.operand);
|
|
@@ -14043,7 +14163,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14043
14163
|
return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node;
|
|
14044
14164
|
}
|
|
14045
14165
|
function createBinaryExpression(left, operator, right) {
|
|
14046
|
-
const node =
|
|
14166
|
+
const node = createBaseDeclaration(223 /* BinaryExpression */);
|
|
14047
14167
|
const operatorToken = asToken(operator);
|
|
14048
14168
|
const operatorKind = operatorToken.kind;
|
|
14049
14169
|
node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left);
|
|
@@ -14066,6 +14186,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14066
14186
|
if (operatorKind === 101 /* InKeyword */ && isPrivateIdentifier(node.left)) {
|
|
14067
14187
|
node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */;
|
|
14068
14188
|
}
|
|
14189
|
+
node.jsDoc = void 0;
|
|
14190
|
+
node.jsDocCache = void 0;
|
|
14069
14191
|
return node;
|
|
14070
14192
|
}
|
|
14071
14193
|
function propagateAssignmentPatternFlags(node) {
|
|
@@ -14092,7 +14214,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14092
14214
|
return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node;
|
|
14093
14215
|
}
|
|
14094
14216
|
function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) {
|
|
14095
|
-
const node =
|
|
14217
|
+
const node = createBaseNode(224 /* ConditionalExpression */);
|
|
14096
14218
|
node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition);
|
|
14097
14219
|
node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */);
|
|
14098
14220
|
node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue);
|
|
@@ -14105,7 +14227,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14105
14227
|
return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node;
|
|
14106
14228
|
}
|
|
14107
14229
|
function createTemplateExpression(head, templateSpans) {
|
|
14108
|
-
const node =
|
|
14230
|
+
const node = createBaseNode(225 /* TemplateExpression */);
|
|
14109
14231
|
node.head = head;
|
|
14110
14232
|
node.templateSpans = createNodeArray(templateSpans);
|
|
14111
14233
|
node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */;
|
|
@@ -14114,7 +14236,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14114
14236
|
function updateTemplateExpression(node, head, templateSpans) {
|
|
14115
14237
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateExpression(head, templateSpans), node) : node;
|
|
14116
14238
|
}
|
|
14117
|
-
function
|
|
14239
|
+
function checkTemplateLiteralLikeNode(kind, text, rawText, templateFlags = 0 /* None */) {
|
|
14118
14240
|
Debug.assert(!(templateFlags & ~2048 /* TemplateLiteralLikeFlags */), "Unsupported template flags.");
|
|
14119
14241
|
let cooked = void 0;
|
|
14120
14242
|
if (rawText !== void 0 && rawText !== text) {
|
|
@@ -14131,34 +14253,56 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14131
14253
|
} else if (cooked !== void 0) {
|
|
14132
14254
|
Debug.assert(text === cooked, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");
|
|
14133
14255
|
}
|
|
14134
|
-
return
|
|
14256
|
+
return text;
|
|
14135
14257
|
}
|
|
14136
|
-
function
|
|
14258
|
+
function getTransformFlagsOfTemplateLiteralLike(templateFlags) {
|
|
14259
|
+
let transformFlags = 1024 /* ContainsES2015 */;
|
|
14260
|
+
if (templateFlags) {
|
|
14261
|
+
transformFlags |= 128 /* ContainsES2018 */;
|
|
14262
|
+
}
|
|
14263
|
+
return transformFlags;
|
|
14264
|
+
}
|
|
14265
|
+
function createTemplateLiteralLikeToken(kind, text, rawText, templateFlags) {
|
|
14137
14266
|
const node = createBaseToken(kind);
|
|
14138
14267
|
node.text = text;
|
|
14139
14268
|
node.rawText = rawText;
|
|
14140
14269
|
node.templateFlags = templateFlags & 2048 /* TemplateLiteralLikeFlags */;
|
|
14141
|
-
node.transformFlags
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14270
|
+
node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);
|
|
14271
|
+
return node;
|
|
14272
|
+
}
|
|
14273
|
+
function createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags) {
|
|
14274
|
+
const node = createBaseDeclaration(kind);
|
|
14275
|
+
node.text = text;
|
|
14276
|
+
node.rawText = rawText;
|
|
14277
|
+
node.templateFlags = templateFlags & 2048 /* TemplateLiteralLikeFlags */;
|
|
14278
|
+
node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);
|
|
14145
14279
|
return node;
|
|
14146
14280
|
}
|
|
14281
|
+
function createTemplateLiteralLikeNode(kind, text, rawText, templateFlags) {
|
|
14282
|
+
if (kind === 14 /* NoSubstitutionTemplateLiteral */) {
|
|
14283
|
+
return createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags);
|
|
14284
|
+
}
|
|
14285
|
+
return createTemplateLiteralLikeToken(kind, text, rawText, templateFlags);
|
|
14286
|
+
}
|
|
14147
14287
|
function createTemplateHead(text, rawText, templateFlags) {
|
|
14148
|
-
|
|
14288
|
+
text = checkTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14289
|
+
return createTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14149
14290
|
}
|
|
14150
14291
|
function createTemplateMiddle(text, rawText, templateFlags) {
|
|
14151
|
-
|
|
14292
|
+
text = checkTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14293
|
+
return createTemplateLiteralLikeNode(16 /* TemplateMiddle */, text, rawText, templateFlags);
|
|
14152
14294
|
}
|
|
14153
14295
|
function createTemplateTail(text, rawText, templateFlags) {
|
|
14154
|
-
|
|
14296
|
+
text = checkTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14297
|
+
return createTemplateLiteralLikeNode(17 /* TemplateTail */, text, rawText, templateFlags);
|
|
14155
14298
|
}
|
|
14156
14299
|
function createNoSubstitutionTemplateLiteral(text, rawText, templateFlags) {
|
|
14157
|
-
|
|
14300
|
+
text = checkTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText, templateFlags);
|
|
14301
|
+
return createTemplateLiteralLikeDeclaration(14 /* NoSubstitutionTemplateLiteral */, text, rawText, templateFlags);
|
|
14158
14302
|
}
|
|
14159
14303
|
function createYieldExpression(asteriskToken, expression) {
|
|
14160
14304
|
Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression.");
|
|
14161
|
-
const node =
|
|
14305
|
+
const node = createBaseNode(226 /* YieldExpression */);
|
|
14162
14306
|
node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
14163
14307
|
node.asteriskToken = asteriskToken;
|
|
14164
14308
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */;
|
|
@@ -14168,7 +14312,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14168
14312
|
return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node;
|
|
14169
14313
|
}
|
|
14170
14314
|
function createSpreadElement(expression) {
|
|
14171
|
-
const node =
|
|
14315
|
+
const node = createBaseNode(227 /* SpreadElement */);
|
|
14172
14316
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
14173
14317
|
node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */;
|
|
14174
14318
|
return node;
|
|
@@ -14177,22 +14321,22 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14177
14321
|
return node.expression !== expression ? update(createSpreadElement(expression), node) : node;
|
|
14178
14322
|
}
|
|
14179
14323
|
function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14180
|
-
const node =
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
node.
|
|
14324
|
+
const node = createBaseDeclaration(228 /* ClassExpression */);
|
|
14325
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14326
|
+
node.name = asName(name);
|
|
14327
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14328
|
+
node.heritageClauses = asNodeArray(heritageClauses);
|
|
14329
|
+
node.members = createNodeArray(members);
|
|
14330
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
14331
|
+
node.jsDoc = void 0;
|
|
14332
|
+
node.jsDocCache = void 0;
|
|
14189
14333
|
return node;
|
|
14190
14334
|
}
|
|
14191
14335
|
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
14192
14336
|
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node;
|
|
14193
14337
|
}
|
|
14194
14338
|
function createOmittedExpression() {
|
|
14195
|
-
return
|
|
14339
|
+
return createBaseNode(229 /* OmittedExpression */);
|
|
14196
14340
|
}
|
|
14197
14341
|
function createExpressionWithTypeArguments(expression, typeArguments) {
|
|
14198
14342
|
const node = createBaseNode(230 /* ExpressionWithTypeArguments */);
|
|
@@ -14205,7 +14349,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14205
14349
|
return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node;
|
|
14206
14350
|
}
|
|
14207
14351
|
function createAsExpression(expression, type) {
|
|
14208
|
-
const node =
|
|
14352
|
+
const node = createBaseNode(231 /* AsExpression */);
|
|
14209
14353
|
node.expression = expression;
|
|
14210
14354
|
node.type = type;
|
|
14211
14355
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;
|
|
@@ -14215,7 +14359,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14215
14359
|
return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node;
|
|
14216
14360
|
}
|
|
14217
14361
|
function createNonNullExpression(expression) {
|
|
14218
|
-
const node =
|
|
14362
|
+
const node = createBaseNode(232 /* NonNullExpression */);
|
|
14219
14363
|
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false);
|
|
14220
14364
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
14221
14365
|
return node;
|
|
@@ -14227,7 +14371,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14227
14371
|
return node.expression !== expression ? update(createNonNullExpression(expression), node) : node;
|
|
14228
14372
|
}
|
|
14229
14373
|
function createSatisfiesExpression(expression, type) {
|
|
14230
|
-
const node =
|
|
14374
|
+
const node = createBaseNode(235 /* SatisfiesExpression */);
|
|
14231
14375
|
node.expression = expression;
|
|
14232
14376
|
node.type = type;
|
|
14233
14377
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */;
|
|
@@ -14237,7 +14381,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14237
14381
|
return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node;
|
|
14238
14382
|
}
|
|
14239
14383
|
function createNonNullChain(expression) {
|
|
14240
|
-
const node =
|
|
14384
|
+
const node = createBaseNode(232 /* NonNullExpression */);
|
|
14241
14385
|
node.flags |= 32 /* OptionalChain */;
|
|
14242
14386
|
node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true);
|
|
14243
14387
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -14248,7 +14392,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14248
14392
|
return node.expression !== expression ? update(createNonNullChain(expression), node) : node;
|
|
14249
14393
|
}
|
|
14250
14394
|
function createMetaProperty(keywordToken, name) {
|
|
14251
|
-
const node =
|
|
14395
|
+
const node = createBaseNode(233 /* MetaProperty */);
|
|
14252
14396
|
node.keywordToken = keywordToken;
|
|
14253
14397
|
node.name = name;
|
|
14254
14398
|
node.transformFlags |= propagateChildFlags(node.name);
|
|
@@ -14262,6 +14406,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14262
14406
|
default:
|
|
14263
14407
|
return Debug.assertNever(keywordToken);
|
|
14264
14408
|
}
|
|
14409
|
+
node.flowNode = void 0;
|
|
14265
14410
|
return node;
|
|
14266
14411
|
}
|
|
14267
14412
|
function updateMetaProperty(node, name) {
|
|
@@ -14287,31 +14432,45 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14287
14432
|
node.statements = createNodeArray(statements);
|
|
14288
14433
|
node.multiLine = multiLine;
|
|
14289
14434
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
14435
|
+
node.jsDoc = void 0;
|
|
14436
|
+
node.jsDocCache = void 0;
|
|
14437
|
+
node.locals = void 0;
|
|
14438
|
+
node.nextContainer = void 0;
|
|
14290
14439
|
return node;
|
|
14291
14440
|
}
|
|
14292
14441
|
function updateBlock(node, statements) {
|
|
14293
14442
|
return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node;
|
|
14294
14443
|
}
|
|
14295
14444
|
function createVariableStatement(modifiers, declarationList) {
|
|
14296
|
-
const node =
|
|
14445
|
+
const node = createBaseNode(240 /* VariableStatement */);
|
|
14297
14446
|
node.modifiers = asNodeArray(modifiers);
|
|
14298
14447
|
node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
|
|
14299
14448
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList);
|
|
14300
14449
|
if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
14301
14450
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14302
14451
|
}
|
|
14452
|
+
node.illegalDecorators = void 0;
|
|
14453
|
+
node.jsDoc = void 0;
|
|
14454
|
+
node.jsDocCache = void 0;
|
|
14455
|
+
node.flowNode = void 0;
|
|
14303
14456
|
return node;
|
|
14304
14457
|
}
|
|
14305
14458
|
function updateVariableStatement(node, modifiers, declarationList) {
|
|
14306
14459
|
return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node;
|
|
14307
14460
|
}
|
|
14308
14461
|
function createEmptyStatement() {
|
|
14309
|
-
|
|
14462
|
+
const node = createBaseNode(239 /* EmptyStatement */);
|
|
14463
|
+
node.jsDoc = void 0;
|
|
14464
|
+
node.jsDocCache = void 0;
|
|
14465
|
+
return node;
|
|
14310
14466
|
}
|
|
14311
14467
|
function createExpressionStatement(expression) {
|
|
14312
14468
|
const node = createBaseNode(241 /* ExpressionStatement */);
|
|
14313
14469
|
node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);
|
|
14314
14470
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14471
|
+
node.jsDoc = void 0;
|
|
14472
|
+
node.jsDocCache = void 0;
|
|
14473
|
+
node.flowNode = void 0;
|
|
14315
14474
|
return node;
|
|
14316
14475
|
}
|
|
14317
14476
|
function updateExpressionStatement(node, expression) {
|
|
@@ -14323,6 +14482,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14323
14482
|
node.thenStatement = asEmbeddedStatement(thenStatement);
|
|
14324
14483
|
node.elseStatement = asEmbeddedStatement(elseStatement);
|
|
14325
14484
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement);
|
|
14485
|
+
node.jsDoc = void 0;
|
|
14486
|
+
node.jsDocCache = void 0;
|
|
14487
|
+
node.flowNode = void 0;
|
|
14326
14488
|
return node;
|
|
14327
14489
|
}
|
|
14328
14490
|
function updateIfStatement(node, expression, thenStatement, elseStatement) {
|
|
@@ -14333,6 +14495,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14333
14495
|
node.statement = asEmbeddedStatement(statement);
|
|
14334
14496
|
node.expression = expression;
|
|
14335
14497
|
node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression);
|
|
14498
|
+
node.jsDoc = void 0;
|
|
14499
|
+
node.jsDocCache = void 0;
|
|
14500
|
+
node.flowNode = void 0;
|
|
14336
14501
|
return node;
|
|
14337
14502
|
}
|
|
14338
14503
|
function updateDoStatement(node, statement, expression) {
|
|
@@ -14343,6 +14508,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14343
14508
|
node.expression = expression;
|
|
14344
14509
|
node.statement = asEmbeddedStatement(statement);
|
|
14345
14510
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
14511
|
+
node.jsDoc = void 0;
|
|
14512
|
+
node.jsDocCache = void 0;
|
|
14513
|
+
node.flowNode = void 0;
|
|
14346
14514
|
return node;
|
|
14347
14515
|
}
|
|
14348
14516
|
function updateWhileStatement(node, expression, statement) {
|
|
@@ -14355,6 +14523,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14355
14523
|
node.incrementor = incrementor;
|
|
14356
14524
|
node.statement = asEmbeddedStatement(statement);
|
|
14357
14525
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement);
|
|
14526
|
+
node.jsDoc = void 0;
|
|
14527
|
+
node.jsDocCache = void 0;
|
|
14528
|
+
node.locals = void 0;
|
|
14529
|
+
node.nextContainer = void 0;
|
|
14530
|
+
node.flowNode = void 0;
|
|
14358
14531
|
return node;
|
|
14359
14532
|
}
|
|
14360
14533
|
function updateForStatement(node, initializer, condition, incrementor, statement) {
|
|
@@ -14366,6 +14539,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14366
14539
|
node.expression = expression;
|
|
14367
14540
|
node.statement = asEmbeddedStatement(statement);
|
|
14368
14541
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
14542
|
+
node.jsDoc = void 0;
|
|
14543
|
+
node.jsDocCache = void 0;
|
|
14544
|
+
node.locals = void 0;
|
|
14545
|
+
node.nextContainer = void 0;
|
|
14546
|
+
node.flowNode = void 0;
|
|
14369
14547
|
return node;
|
|
14370
14548
|
}
|
|
14371
14549
|
function updateForInStatement(node, initializer, expression, statement) {
|
|
@@ -14380,6 +14558,11 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14380
14558
|
node.transformFlags |= propagateChildFlags(node.awaitModifier) | propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement) | 1024 /* ContainsES2015 */;
|
|
14381
14559
|
if (awaitModifier)
|
|
14382
14560
|
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
14561
|
+
node.jsDoc = void 0;
|
|
14562
|
+
node.jsDocCache = void 0;
|
|
14563
|
+
node.locals = void 0;
|
|
14564
|
+
node.nextContainer = void 0;
|
|
14565
|
+
node.flowNode = void 0;
|
|
14383
14566
|
return node;
|
|
14384
14567
|
}
|
|
14385
14568
|
function updateForOfStatement(node, awaitModifier, initializer, expression, statement) {
|
|
@@ -14389,6 +14572,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14389
14572
|
const node = createBaseNode(248 /* ContinueStatement */);
|
|
14390
14573
|
node.label = asName(label);
|
|
14391
14574
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14575
|
+
node.jsDoc = void 0;
|
|
14576
|
+
node.jsDocCache = void 0;
|
|
14577
|
+
node.flowNode = void 0;
|
|
14392
14578
|
return node;
|
|
14393
14579
|
}
|
|
14394
14580
|
function updateContinueStatement(node, label) {
|
|
@@ -14398,6 +14584,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14398
14584
|
const node = createBaseNode(249 /* BreakStatement */);
|
|
14399
14585
|
node.label = asName(label);
|
|
14400
14586
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14587
|
+
node.jsDoc = void 0;
|
|
14588
|
+
node.jsDocCache = void 0;
|
|
14589
|
+
node.flowNode = void 0;
|
|
14401
14590
|
return node;
|
|
14402
14591
|
}
|
|
14403
14592
|
function updateBreakStatement(node, label) {
|
|
@@ -14407,6 +14596,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14407
14596
|
const node = createBaseNode(250 /* ReturnStatement */);
|
|
14408
14597
|
node.expression = expression;
|
|
14409
14598
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14599
|
+
node.jsDoc = void 0;
|
|
14600
|
+
node.jsDocCache = void 0;
|
|
14601
|
+
node.flowNode = void 0;
|
|
14410
14602
|
return node;
|
|
14411
14603
|
}
|
|
14412
14604
|
function updateReturnStatement(node, expression) {
|
|
@@ -14417,6 +14609,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14417
14609
|
node.expression = expression;
|
|
14418
14610
|
node.statement = asEmbeddedStatement(statement);
|
|
14419
14611
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
14612
|
+
node.jsDoc = void 0;
|
|
14613
|
+
node.jsDocCache = void 0;
|
|
14614
|
+
node.flowNode = void 0;
|
|
14420
14615
|
return node;
|
|
14421
14616
|
}
|
|
14422
14617
|
function updateWithStatement(node, expression, statement) {
|
|
@@ -14427,6 +14622,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14427
14622
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
14428
14623
|
node.caseBlock = caseBlock;
|
|
14429
14624
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock);
|
|
14625
|
+
node.jsDoc = void 0;
|
|
14626
|
+
node.jsDocCache = void 0;
|
|
14627
|
+
node.flowNode = void 0;
|
|
14628
|
+
node.possiblyExhaustive = false;
|
|
14430
14629
|
return node;
|
|
14431
14630
|
}
|
|
14432
14631
|
function updateSwitchStatement(node, expression, caseBlock) {
|
|
@@ -14437,6 +14636,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14437
14636
|
node.label = asName(label);
|
|
14438
14637
|
node.statement = asEmbeddedStatement(statement);
|
|
14439
14638
|
node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement);
|
|
14639
|
+
node.jsDoc = void 0;
|
|
14640
|
+
node.jsDocCache = void 0;
|
|
14641
|
+
node.flowNode = void 0;
|
|
14440
14642
|
return node;
|
|
14441
14643
|
}
|
|
14442
14644
|
function updateLabeledStatement(node, label, statement) {
|
|
@@ -14446,6 +14648,9 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14446
14648
|
const node = createBaseNode(254 /* ThrowStatement */);
|
|
14447
14649
|
node.expression = expression;
|
|
14448
14650
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
14651
|
+
node.jsDoc = void 0;
|
|
14652
|
+
node.jsDocCache = void 0;
|
|
14653
|
+
node.flowNode = void 0;
|
|
14449
14654
|
return node;
|
|
14450
14655
|
}
|
|
14451
14656
|
function updateThrowStatement(node, expression) {
|
|
@@ -14457,27 +14662,31 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14457
14662
|
node.catchClause = catchClause;
|
|
14458
14663
|
node.finallyBlock = finallyBlock;
|
|
14459
14664
|
node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock);
|
|
14665
|
+
node.jsDoc = void 0;
|
|
14666
|
+
node.jsDocCache = void 0;
|
|
14667
|
+
node.flowNode = void 0;
|
|
14460
14668
|
return node;
|
|
14461
14669
|
}
|
|
14462
14670
|
function updateTryStatement(node, tryBlock, catchClause, finallyBlock) {
|
|
14463
14671
|
return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node;
|
|
14464
14672
|
}
|
|
14465
14673
|
function createDebuggerStatement() {
|
|
14466
|
-
|
|
14674
|
+
const node = createBaseNode(256 /* DebuggerStatement */);
|
|
14675
|
+
node.jsDoc = void 0;
|
|
14676
|
+
node.jsDocCache = void 0;
|
|
14677
|
+
node.flowNode = void 0;
|
|
14678
|
+
return node;
|
|
14467
14679
|
}
|
|
14468
14680
|
function createVariableDeclaration(name, exclamationToken, type, initializer) {
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
name,
|
|
14473
|
-
type,
|
|
14474
|
-
initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer)
|
|
14475
|
-
);
|
|
14681
|
+
var _a2;
|
|
14682
|
+
const node = createBaseDeclaration(257 /* VariableDeclaration */);
|
|
14683
|
+
node.name = asName(name);
|
|
14476
14684
|
node.exclamationToken = exclamationToken;
|
|
14477
|
-
node.
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14685
|
+
node.type = type;
|
|
14686
|
+
node.initializer = asInitializer(initializer);
|
|
14687
|
+
node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (((_a2 = node.exclamationToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
14688
|
+
node.jsDoc = void 0;
|
|
14689
|
+
node.jsDocCache = void 0;
|
|
14481
14690
|
return node;
|
|
14482
14691
|
}
|
|
14483
14692
|
function updateVariableDeclaration(node, name, exclamationToken, type, initializer) {
|
|
@@ -14497,31 +14706,30 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14497
14706
|
return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node;
|
|
14498
14707
|
}
|
|
14499
14708
|
function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
14500
|
-
const node =
|
|
14501
|
-
|
|
14502
|
-
modifiers,
|
|
14503
|
-
name,
|
|
14504
|
-
typeParameters,
|
|
14505
|
-
parameters,
|
|
14506
|
-
type,
|
|
14507
|
-
body
|
|
14508
|
-
);
|
|
14709
|
+
const node = createBaseDeclaration(259 /* FunctionDeclaration */);
|
|
14710
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14509
14711
|
node.asteriskToken = asteriskToken;
|
|
14712
|
+
node.name = asName(name);
|
|
14713
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14714
|
+
node.parameters = createNodeArray(parameters);
|
|
14715
|
+
node.type = type;
|
|
14716
|
+
node.body = body;
|
|
14510
14717
|
if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
14511
14718
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14512
14719
|
} else {
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
} else {
|
|
14518
|
-
node.transformFlags |= 256 /* ContainsES2017 */;
|
|
14519
|
-
}
|
|
14520
|
-
} else if (node.asteriskToken) {
|
|
14521
|
-
node.transformFlags |= 2048 /* ContainsGenerator */;
|
|
14522
|
-
}
|
|
14720
|
+
const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */;
|
|
14721
|
+
const isGenerator = !!node.asteriskToken;
|
|
14722
|
+
const isAsyncGenerator = isAsync && isGenerator;
|
|
14723
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
14523
14724
|
}
|
|
14524
14725
|
node.illegalDecorators = void 0;
|
|
14726
|
+
node.typeArguments = void 0;
|
|
14727
|
+
node.jsDoc = void 0;
|
|
14728
|
+
node.jsDocCache = void 0;
|
|
14729
|
+
node.locals = void 0;
|
|
14730
|
+
node.nextContainer = void 0;
|
|
14731
|
+
node.endFlowNode = void 0;
|
|
14732
|
+
node.returnFlowNode = void 0;
|
|
14525
14733
|
return node;
|
|
14526
14734
|
}
|
|
14527
14735
|
function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
|
|
@@ -14533,39 +14741,39 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14533
14741
|
}
|
|
14534
14742
|
return finishUpdateBaseSignatureDeclaration(updated, original);
|
|
14535
14743
|
}
|
|
14536
|
-
function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14537
|
-
const node =
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
members
|
|
14544
|
-
);
|
|
14744
|
+
function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14745
|
+
const node = createBaseDeclaration(260 /* ClassDeclaration */);
|
|
14746
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14747
|
+
node.name = asName(name);
|
|
14748
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14749
|
+
node.heritageClauses = asNodeArray(heritageClauses);
|
|
14750
|
+
node.members = createNodeArray(members);
|
|
14545
14751
|
if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) {
|
|
14546
14752
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14547
14753
|
} else {
|
|
14548
|
-
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
14754
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
14549
14755
|
if (node.transformFlags & 8192 /* ContainsTypeScriptClassSyntax */) {
|
|
14550
14756
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
14551
14757
|
}
|
|
14552
14758
|
}
|
|
14759
|
+
node.jsDoc = void 0;
|
|
14760
|
+
node.jsDocCache = void 0;
|
|
14553
14761
|
return node;
|
|
14554
14762
|
}
|
|
14555
14763
|
function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
14556
14764
|
return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node;
|
|
14557
14765
|
}
|
|
14558
14766
|
function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) {
|
|
14559
|
-
const node =
|
|
14560
|
-
|
|
14561
|
-
|
|
14562
|
-
|
|
14563
|
-
|
|
14564
|
-
heritageClauses
|
|
14565
|
-
);
|
|
14767
|
+
const node = createBaseDeclaration(261 /* InterfaceDeclaration */);
|
|
14768
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14769
|
+
node.name = asName(name);
|
|
14770
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14771
|
+
node.heritageClauses = asNodeArray(heritageClauses);
|
|
14566
14772
|
node.members = createNodeArray(members);
|
|
14567
14773
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14568
14774
|
node.illegalDecorators = void 0;
|
|
14775
|
+
node.jsDoc = void 0;
|
|
14776
|
+
node.jsDocCache = void 0;
|
|
14569
14777
|
return node;
|
|
14570
14778
|
}
|
|
14571
14779
|
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -14578,15 +14786,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14578
14786
|
return update(updated, original);
|
|
14579
14787
|
}
|
|
14580
14788
|
function createTypeAliasDeclaration(modifiers, name, typeParameters, type) {
|
|
14581
|
-
const node =
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
typeParameters
|
|
14586
|
-
);
|
|
14789
|
+
const node = createBaseDeclaration(262 /* TypeAliasDeclaration */);
|
|
14790
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14791
|
+
node.name = asName(name);
|
|
14792
|
+
node.typeParameters = asNodeArray(typeParameters);
|
|
14587
14793
|
node.type = type;
|
|
14588
14794
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14589
14795
|
node.illegalDecorators = void 0;
|
|
14796
|
+
node.jsDoc = void 0;
|
|
14797
|
+
node.jsDocCache = void 0;
|
|
14798
|
+
node.locals = void 0;
|
|
14799
|
+
node.nextContainer = void 0;
|
|
14590
14800
|
return node;
|
|
14591
14801
|
}
|
|
14592
14802
|
function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) {
|
|
@@ -14599,15 +14809,15 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14599
14809
|
return update(updated, original);
|
|
14600
14810
|
}
|
|
14601
14811
|
function createEnumDeclaration(modifiers, name, members) {
|
|
14602
|
-
const node =
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
name
|
|
14606
|
-
);
|
|
14812
|
+
const node = createBaseDeclaration(263 /* EnumDeclaration */);
|
|
14813
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14814
|
+
node.name = asName(name);
|
|
14607
14815
|
node.members = createNodeArray(members);
|
|
14608
|
-
node.transformFlags |= propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */;
|
|
14816
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */;
|
|
14609
14817
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14610
14818
|
node.illegalDecorators = void 0;
|
|
14819
|
+
node.jsDoc = void 0;
|
|
14820
|
+
node.jsDocCache = void 0;
|
|
14611
14821
|
return node;
|
|
14612
14822
|
}
|
|
14613
14823
|
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
@@ -14632,6 +14842,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14632
14842
|
}
|
|
14633
14843
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14634
14844
|
node.illegalDecorators = void 0;
|
|
14845
|
+
node.jsDoc = void 0;
|
|
14846
|
+
node.jsDocCache = void 0;
|
|
14847
|
+
node.locals = void 0;
|
|
14848
|
+
node.nextContainer = void 0;
|
|
14635
14849
|
return node;
|
|
14636
14850
|
}
|
|
14637
14851
|
function updateModuleDeclaration(node, modifiers, name, body) {
|
|
@@ -14647,6 +14861,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14647
14861
|
const node = createBaseNode(265 /* ModuleBlock */);
|
|
14648
14862
|
node.statements = createNodeArray(statements);
|
|
14649
14863
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
14864
|
+
node.jsDoc = void 0;
|
|
14865
|
+
node.jsDocCache = void 0;
|
|
14650
14866
|
return node;
|
|
14651
14867
|
}
|
|
14652
14868
|
function updateModuleBlock(node, statements) {
|
|
@@ -14656,20 +14872,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14656
14872
|
const node = createBaseNode(266 /* CaseBlock */);
|
|
14657
14873
|
node.clauses = createNodeArray(clauses);
|
|
14658
14874
|
node.transformFlags |= propagateChildrenFlags(node.clauses);
|
|
14875
|
+
node.locals = void 0;
|
|
14876
|
+
node.nextContainer = void 0;
|
|
14659
14877
|
return node;
|
|
14660
14878
|
}
|
|
14661
14879
|
function updateCaseBlock(node, clauses) {
|
|
14662
14880
|
return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node;
|
|
14663
14881
|
}
|
|
14664
14882
|
function createNamespaceExportDeclaration(name) {
|
|
14665
|
-
const node =
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
name
|
|
14669
|
-
);
|
|
14670
|
-
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14883
|
+
const node = createBaseDeclaration(267 /* NamespaceExportDeclaration */);
|
|
14884
|
+
node.name = asName(name);
|
|
14885
|
+
node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */;
|
|
14671
14886
|
node.illegalDecorators = void 0;
|
|
14672
14887
|
node.modifiers = void 0;
|
|
14888
|
+
node.jsDoc = void 0;
|
|
14889
|
+
node.jsDocCache = void 0;
|
|
14673
14890
|
return node;
|
|
14674
14891
|
}
|
|
14675
14892
|
function updateNamespaceExportDeclaration(node, name) {
|
|
@@ -14683,18 +14900,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14683
14900
|
return update(updated, original);
|
|
14684
14901
|
}
|
|
14685
14902
|
function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) {
|
|
14686
|
-
const node =
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
name
|
|
14690
|
-
);
|
|
14903
|
+
const node = createBaseDeclaration(268 /* ImportEqualsDeclaration */);
|
|
14904
|
+
node.modifiers = asNodeArray(modifiers);
|
|
14905
|
+
node.name = asName(name);
|
|
14691
14906
|
node.isTypeOnly = isTypeOnly;
|
|
14692
14907
|
node.moduleReference = moduleReference;
|
|
14693
|
-
node.transformFlags |= propagateChildFlags(node.moduleReference);
|
|
14694
|
-
if (!isExternalModuleReference(node.moduleReference))
|
|
14908
|
+
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.moduleReference);
|
|
14909
|
+
if (!isExternalModuleReference(node.moduleReference)) {
|
|
14695
14910
|
node.transformFlags |= 1 /* ContainsTypeScript */;
|
|
14911
|
+
}
|
|
14696
14912
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14697
14913
|
node.illegalDecorators = void 0;
|
|
14914
|
+
node.jsDoc = void 0;
|
|
14915
|
+
node.jsDocCache = void 0;
|
|
14698
14916
|
return node;
|
|
14699
14917
|
}
|
|
14700
14918
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
@@ -14707,7 +14925,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14707
14925
|
return update(updated, original);
|
|
14708
14926
|
}
|
|
14709
14927
|
function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) {
|
|
14710
|
-
const node =
|
|
14928
|
+
const node = createBaseNode(269 /* ImportDeclaration */);
|
|
14711
14929
|
node.modifiers = asNodeArray(modifiers);
|
|
14712
14930
|
node.importClause = importClause;
|
|
14713
14931
|
node.moduleSpecifier = moduleSpecifier;
|
|
@@ -14715,6 +14933,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14715
14933
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14716
14934
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14717
14935
|
node.illegalDecorators = void 0;
|
|
14936
|
+
node.jsDoc = void 0;
|
|
14937
|
+
node.jsDocCache = void 0;
|
|
14718
14938
|
return node;
|
|
14719
14939
|
}
|
|
14720
14940
|
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
@@ -14727,7 +14947,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14727
14947
|
return update(updated, original);
|
|
14728
14948
|
}
|
|
14729
14949
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
14730
|
-
const node =
|
|
14950
|
+
const node = createBaseDeclaration(270 /* ImportClause */);
|
|
14731
14951
|
node.isTypeOnly = isTypeOnly;
|
|
14732
14952
|
node.name = name;
|
|
14733
14953
|
node.namedBindings = namedBindings;
|
|
@@ -14771,7 +14991,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14771
14991
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
14772
14992
|
}
|
|
14773
14993
|
function createNamespaceImport(name) {
|
|
14774
|
-
const node =
|
|
14994
|
+
const node = createBaseDeclaration(271 /* NamespaceImport */);
|
|
14775
14995
|
node.name = name;
|
|
14776
14996
|
node.transformFlags |= propagateChildFlags(node.name);
|
|
14777
14997
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
@@ -14781,7 +15001,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14781
15001
|
return node.name !== name ? update(createNamespaceImport(name), node) : node;
|
|
14782
15002
|
}
|
|
14783
15003
|
function createNamespaceExport(name) {
|
|
14784
|
-
const node =
|
|
15004
|
+
const node = createBaseDeclaration(277 /* NamespaceExport */);
|
|
14785
15005
|
node.name = name;
|
|
14786
15006
|
node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */;
|
|
14787
15007
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
@@ -14801,7 +15021,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14801
15021
|
return node.elements !== elements ? update(createNamedImports(elements), node) : node;
|
|
14802
15022
|
}
|
|
14803
15023
|
function createImportSpecifier(isTypeOnly, propertyName, name) {
|
|
14804
|
-
const node =
|
|
15024
|
+
const node = createBaseDeclaration(273 /* ImportSpecifier */);
|
|
14805
15025
|
node.isTypeOnly = isTypeOnly;
|
|
14806
15026
|
node.propertyName = propertyName;
|
|
14807
15027
|
node.name = name;
|
|
@@ -14820,6 +15040,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14820
15040
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression);
|
|
14821
15041
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14822
15042
|
node.illegalDecorators = void 0;
|
|
15043
|
+
node.jsDoc = void 0;
|
|
15044
|
+
node.jsDocCache = void 0;
|
|
14823
15045
|
return node;
|
|
14824
15046
|
}
|
|
14825
15047
|
function updateExportAssignment(node, modifiers, expression) {
|
|
@@ -14841,6 +15063,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14841
15063
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14842
15064
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14843
15065
|
node.illegalDecorators = void 0;
|
|
15066
|
+
node.jsDoc = void 0;
|
|
15067
|
+
node.jsDocCache = void 0;
|
|
14844
15068
|
return node;
|
|
14845
15069
|
}
|
|
14846
15070
|
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
@@ -14869,6 +15093,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14869
15093
|
node.name = asName(name);
|
|
14870
15094
|
node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);
|
|
14871
15095
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15096
|
+
node.jsDoc = void 0;
|
|
15097
|
+
node.jsDocCache = void 0;
|
|
14872
15098
|
return node;
|
|
14873
15099
|
}
|
|
14874
15100
|
function updateExportSpecifier(node, isTypeOnly, propertyName, name) {
|
|
@@ -14876,6 +15102,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14876
15102
|
}
|
|
14877
15103
|
function createMissingDeclaration() {
|
|
14878
15104
|
const node = createBaseDeclaration(279 /* MissingDeclaration */);
|
|
15105
|
+
node.jsDoc = void 0;
|
|
15106
|
+
node.jsDocCache = void 0;
|
|
14879
15107
|
return node;
|
|
14880
15108
|
}
|
|
14881
15109
|
function createExternalModuleReference(expression) {
|
|
@@ -14911,21 +15139,22 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14911
15139
|
return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node;
|
|
14912
15140
|
}
|
|
14913
15141
|
function createJSDocFunctionType(parameters, type) {
|
|
14914
|
-
const node =
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
15142
|
+
const node = createBaseDeclaration(320 /* JSDocFunctionType */);
|
|
15143
|
+
node.parameters = asNodeArray(parameters);
|
|
15144
|
+
node.type = type;
|
|
15145
|
+
node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
15146
|
+
node.jsDoc = void 0;
|
|
15147
|
+
node.jsDocCache = void 0;
|
|
15148
|
+
node.locals = void 0;
|
|
15149
|
+
node.nextContainer = void 0;
|
|
15150
|
+
node.typeArguments = void 0;
|
|
14922
15151
|
return node;
|
|
14923
15152
|
}
|
|
14924
15153
|
function updateJSDocFunctionType(node, parameters, type) {
|
|
14925
15154
|
return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node;
|
|
14926
15155
|
}
|
|
14927
15156
|
function createJSDocTypeLiteral(propertyTags, isArrayType = false) {
|
|
14928
|
-
const node =
|
|
15157
|
+
const node = createBaseDeclaration(325 /* JSDocTypeLiteral */);
|
|
14929
15158
|
node.jsDocPropertyTags = asNodeArray(propertyTags);
|
|
14930
15159
|
node.isArrayType = isArrayType;
|
|
14931
15160
|
return node;
|
|
@@ -14942,10 +15171,14 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14942
15171
|
return node.type !== type ? update(createJSDocTypeExpression(type), node) : node;
|
|
14943
15172
|
}
|
|
14944
15173
|
function createJSDocSignature(typeParameters, parameters, type) {
|
|
14945
|
-
const node =
|
|
15174
|
+
const node = createBaseDeclaration(326 /* JSDocSignature */);
|
|
14946
15175
|
node.typeParameters = asNodeArray(typeParameters);
|
|
14947
15176
|
node.parameters = createNodeArray(parameters);
|
|
14948
15177
|
node.type = type;
|
|
15178
|
+
node.jsDoc = void 0;
|
|
15179
|
+
node.jsDocCache = void 0;
|
|
15180
|
+
node.locals = void 0;
|
|
15181
|
+
node.nextContainer = void 0;
|
|
14949
15182
|
return node;
|
|
14950
15183
|
}
|
|
14951
15184
|
function updateJSDocSignature(node, typeParameters, parameters, type) {
|
|
@@ -14961,6 +15194,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14961
15194
|
node.comment = comment;
|
|
14962
15195
|
return node;
|
|
14963
15196
|
}
|
|
15197
|
+
function createBaseJSDocTagDeclaration(kind, tagName, comment) {
|
|
15198
|
+
const node = createBaseDeclaration(kind);
|
|
15199
|
+
node.tagName = tagName;
|
|
15200
|
+
node.comment = comment;
|
|
15201
|
+
return node;
|
|
15202
|
+
}
|
|
14964
15203
|
function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
|
|
14965
15204
|
const node = createBaseJSDocTag(347 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment);
|
|
14966
15205
|
node.constraint = constraint;
|
|
@@ -14971,17 +15210,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14971
15210
|
return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node;
|
|
14972
15211
|
}
|
|
14973
15212
|
function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {
|
|
14974
|
-
const node =
|
|
15213
|
+
const node = createBaseJSDocTagDeclaration(348 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment);
|
|
14975
15214
|
node.typeExpression = typeExpression;
|
|
14976
15215
|
node.fullName = fullName;
|
|
14977
15216
|
node.name = getJSDocTypeAliasName(fullName);
|
|
15217
|
+
node.locals = void 0;
|
|
15218
|
+
node.nextContainer = void 0;
|
|
14978
15219
|
return node;
|
|
14979
15220
|
}
|
|
14980
15221
|
function updateJSDocTypedefTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) {
|
|
14981
15222
|
return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node;
|
|
14982
15223
|
}
|
|
14983
15224
|
function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
14984
|
-
const node =
|
|
15225
|
+
const node = createBaseJSDocTagDeclaration(343 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment);
|
|
14985
15226
|
node.typeExpression = typeExpression;
|
|
14986
15227
|
node.name = name;
|
|
14987
15228
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -14992,7 +15233,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14992
15233
|
return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node;
|
|
14993
15234
|
}
|
|
14994
15235
|
function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
|
|
14995
|
-
const node =
|
|
15236
|
+
const node = createBaseJSDocTagDeclaration(350 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment);
|
|
14996
15237
|
node.typeExpression = typeExpression;
|
|
14997
15238
|
node.name = name;
|
|
14998
15239
|
node.isNameFirst = !!isNameFirst;
|
|
@@ -15003,10 +15244,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15003
15244
|
return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node;
|
|
15004
15245
|
}
|
|
15005
15246
|
function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {
|
|
15006
|
-
const node =
|
|
15247
|
+
const node = createBaseJSDocTagDeclaration(341 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment);
|
|
15007
15248
|
node.typeExpression = typeExpression;
|
|
15008
15249
|
node.fullName = fullName;
|
|
15009
15250
|
node.name = getJSDocTypeAliasName(fullName);
|
|
15251
|
+
node.locals = void 0;
|
|
15252
|
+
node.nextContainer = void 0;
|
|
15010
15253
|
return node;
|
|
15011
15254
|
}
|
|
15012
15255
|
function updateJSDocCallbackTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) {
|
|
@@ -15103,6 +15346,16 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15103
15346
|
function updateJSDocUnknownTag(node, tagName, comment) {
|
|
15104
15347
|
return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node;
|
|
15105
15348
|
}
|
|
15349
|
+
function createJSDocEnumTag(tagName, typeExpression, comment) {
|
|
15350
|
+
const node = createBaseJSDocTagDeclaration(342 /* JSDocEnumTag */, tagName != null ? tagName : createIdentifier(getDefaultTagNameForKind(342 /* JSDocEnumTag */)), comment);
|
|
15351
|
+
node.typeExpression = typeExpression;
|
|
15352
|
+
node.locals = void 0;
|
|
15353
|
+
node.nextContainer = void 0;
|
|
15354
|
+
return node;
|
|
15355
|
+
}
|
|
15356
|
+
function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {
|
|
15357
|
+
return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node;
|
|
15358
|
+
}
|
|
15106
15359
|
function createJSDocText(text) {
|
|
15107
15360
|
const node = createBaseNode(324 /* JSDocText */);
|
|
15108
15361
|
node.text = text;
|
|
@@ -15200,7 +15453,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15200
15453
|
return node;
|
|
15201
15454
|
}
|
|
15202
15455
|
function createJsxAttribute(name, initializer) {
|
|
15203
|
-
const node =
|
|
15456
|
+
const node = createBaseDeclaration(288 /* JsxAttribute */);
|
|
15204
15457
|
node.name = name;
|
|
15205
15458
|
node.initializer = initializer;
|
|
15206
15459
|
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */;
|
|
@@ -15210,7 +15463,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15210
15463
|
return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node;
|
|
15211
15464
|
}
|
|
15212
15465
|
function createJsxAttributes(properties) {
|
|
15213
|
-
const node =
|
|
15466
|
+
const node = createBaseDeclaration(289 /* JsxAttributes */);
|
|
15214
15467
|
node.properties = createNodeArray(properties);
|
|
15215
15468
|
node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */;
|
|
15216
15469
|
return node;
|
|
@@ -15242,6 +15495,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15242
15495
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
15243
15496
|
node.statements = createNodeArray(statements);
|
|
15244
15497
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements);
|
|
15498
|
+
node.jsDoc = void 0;
|
|
15499
|
+
node.jsDocCache = void 0;
|
|
15245
15500
|
return node;
|
|
15246
15501
|
}
|
|
15247
15502
|
function updateCaseClause(node, expression, statements) {
|
|
@@ -15278,36 +15533,27 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15278
15533
|
}
|
|
15279
15534
|
function createCatchClause(variableDeclaration, block) {
|
|
15280
15535
|
const node = createBaseNode(295 /* CatchClause */);
|
|
15281
|
-
|
|
15282
|
-
variableDeclaration = createVariableDeclaration(
|
|
15283
|
-
variableDeclaration,
|
|
15284
|
-
void 0,
|
|
15285
|
-
void 0,
|
|
15286
|
-
void 0
|
|
15287
|
-
);
|
|
15288
|
-
}
|
|
15289
|
-
node.variableDeclaration = variableDeclaration;
|
|
15536
|
+
node.variableDeclaration = asVariableDeclaration(variableDeclaration);
|
|
15290
15537
|
node.block = block;
|
|
15291
|
-
node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block);
|
|
15292
|
-
|
|
15293
|
-
|
|
15538
|
+
node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */);
|
|
15539
|
+
node.locals = void 0;
|
|
15540
|
+
node.nextContainer = void 0;
|
|
15294
15541
|
return node;
|
|
15295
15542
|
}
|
|
15296
15543
|
function updateCatchClause(node, variableDeclaration, block) {
|
|
15297
15544
|
return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node;
|
|
15298
15545
|
}
|
|
15299
15546
|
function createPropertyAssignment(name, initializer) {
|
|
15300
|
-
const node =
|
|
15301
|
-
|
|
15302
|
-
void 0,
|
|
15303
|
-
name
|
|
15304
|
-
);
|
|
15547
|
+
const node = createBaseDeclaration(299 /* PropertyAssignment */);
|
|
15548
|
+
node.name = asName(name);
|
|
15305
15549
|
node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
15306
|
-
node.transformFlags |=
|
|
15550
|
+
node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer);
|
|
15307
15551
|
node.illegalDecorators = void 0;
|
|
15308
15552
|
node.modifiers = void 0;
|
|
15309
15553
|
node.questionToken = void 0;
|
|
15310
15554
|
node.exclamationToken = void 0;
|
|
15555
|
+
node.jsDoc = void 0;
|
|
15556
|
+
node.jsDocCache = void 0;
|
|
15311
15557
|
return node;
|
|
15312
15558
|
}
|
|
15313
15559
|
function updatePropertyAssignment(node, name, initializer) {
|
|
@@ -15323,18 +15569,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15323
15569
|
return update(updated, original);
|
|
15324
15570
|
}
|
|
15325
15571
|
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
|
|
15326
|
-
const node =
|
|
15327
|
-
|
|
15328
|
-
void 0,
|
|
15329
|
-
name
|
|
15330
|
-
);
|
|
15572
|
+
const node = createBaseDeclaration(300 /* ShorthandPropertyAssignment */);
|
|
15573
|
+
node.name = asName(name);
|
|
15331
15574
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
15332
|
-
node.transformFlags |= propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */;
|
|
15575
|
+
node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */;
|
|
15333
15576
|
node.equalsToken = void 0;
|
|
15334
15577
|
node.illegalDecorators = void 0;
|
|
15335
15578
|
node.modifiers = void 0;
|
|
15336
15579
|
node.questionToken = void 0;
|
|
15337
15580
|
node.exclamationToken = void 0;
|
|
15581
|
+
node.jsDoc = void 0;
|
|
15582
|
+
node.jsDocCache = void 0;
|
|
15338
15583
|
return node;
|
|
15339
15584
|
}
|
|
15340
15585
|
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
|
|
@@ -15351,19 +15596,23 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15351
15596
|
return update(updated, original);
|
|
15352
15597
|
}
|
|
15353
15598
|
function createSpreadAssignment(expression) {
|
|
15354
|
-
const node =
|
|
15599
|
+
const node = createBaseDeclaration(301 /* SpreadAssignment */);
|
|
15355
15600
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
15356
15601
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;
|
|
15602
|
+
node.jsDoc = void 0;
|
|
15603
|
+
node.jsDocCache = void 0;
|
|
15357
15604
|
return node;
|
|
15358
15605
|
}
|
|
15359
15606
|
function updateSpreadAssignment(node, expression) {
|
|
15360
15607
|
return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node;
|
|
15361
15608
|
}
|
|
15362
15609
|
function createEnumMember(name, initializer) {
|
|
15363
|
-
const node =
|
|
15610
|
+
const node = createBaseDeclaration(302 /* EnumMember */);
|
|
15364
15611
|
node.name = asName(name);
|
|
15365
15612
|
node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
15366
15613
|
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */;
|
|
15614
|
+
node.jsDoc = void 0;
|
|
15615
|
+
node.jsDocCache = void 0;
|
|
15367
15616
|
return node;
|
|
15368
15617
|
}
|
|
15369
15618
|
function updateEnumMember(node, name, initializer) {
|
|
@@ -15374,33 +15623,111 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15374
15623
|
node.statements = createNodeArray(statements);
|
|
15375
15624
|
node.endOfFileToken = endOfFileToken;
|
|
15376
15625
|
node.flags |= flags2;
|
|
15377
|
-
node.fileName = "";
|
|
15378
15626
|
node.text = "";
|
|
15627
|
+
node.fileName = "";
|
|
15628
|
+
node.path = "";
|
|
15629
|
+
node.resolvedPath = "";
|
|
15630
|
+
node.originalFileName = "";
|
|
15379
15631
|
node.languageVersion = 0;
|
|
15380
15632
|
node.languageVariant = 0;
|
|
15381
15633
|
node.scriptKind = 0;
|
|
15382
15634
|
node.isDeclarationFile = false;
|
|
15383
15635
|
node.hasNoDefaultLib = false;
|
|
15384
15636
|
node.transformFlags |= propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
|
15637
|
+
node.locals = void 0;
|
|
15638
|
+
node.nextContainer = void 0;
|
|
15639
|
+
node.endFlowNode = void 0;
|
|
15640
|
+
node.nodeCount = 0;
|
|
15641
|
+
node.identifierCount = 0;
|
|
15642
|
+
node.symbolCount = 0;
|
|
15643
|
+
node.parseDiagnostics = void 0;
|
|
15644
|
+
node.bindDiagnostics = void 0;
|
|
15645
|
+
node.bindSuggestionDiagnostics = void 0;
|
|
15646
|
+
node.lineMap = void 0;
|
|
15647
|
+
node.externalModuleIndicator = void 0;
|
|
15648
|
+
node.setExternalModuleIndicator = void 0;
|
|
15649
|
+
node.pragmas = void 0;
|
|
15650
|
+
node.checkJsDirective = void 0;
|
|
15651
|
+
node.referencedFiles = void 0;
|
|
15652
|
+
node.typeReferenceDirectives = void 0;
|
|
15653
|
+
node.libReferenceDirectives = void 0;
|
|
15654
|
+
node.amdDependencies = void 0;
|
|
15655
|
+
node.commentDirectives = void 0;
|
|
15656
|
+
node.identifiers = void 0;
|
|
15657
|
+
node.packageJsonLocations = void 0;
|
|
15658
|
+
node.packageJsonScope = void 0;
|
|
15659
|
+
node.imports = void 0;
|
|
15660
|
+
node.moduleAugmentations = void 0;
|
|
15661
|
+
node.ambientModuleNames = void 0;
|
|
15662
|
+
node.resolvedModules = void 0;
|
|
15663
|
+
node.classifiableNames = void 0;
|
|
15664
|
+
node.impliedNodeFormat = void 0;
|
|
15385
15665
|
return node;
|
|
15386
15666
|
}
|
|
15387
|
-
function
|
|
15388
|
-
const node =
|
|
15667
|
+
function createRedirectedSourceFile(redirectInfo) {
|
|
15668
|
+
const node = Object.create(redirectInfo.redirectTarget);
|
|
15669
|
+
Object.defineProperties(node, {
|
|
15670
|
+
id: {
|
|
15671
|
+
get() {
|
|
15672
|
+
return this.redirectInfo.redirectTarget.id;
|
|
15673
|
+
},
|
|
15674
|
+
set(value) {
|
|
15675
|
+
this.redirectInfo.redirectTarget.id = value;
|
|
15676
|
+
}
|
|
15677
|
+
},
|
|
15678
|
+
symbol: {
|
|
15679
|
+
get() {
|
|
15680
|
+
return this.redirectInfo.redirectTarget.symbol;
|
|
15681
|
+
},
|
|
15682
|
+
set(value) {
|
|
15683
|
+
this.redirectInfo.redirectTarget.symbol = value;
|
|
15684
|
+
}
|
|
15685
|
+
}
|
|
15686
|
+
});
|
|
15687
|
+
node.redirectInfo = redirectInfo;
|
|
15688
|
+
return node;
|
|
15689
|
+
}
|
|
15690
|
+
function cloneRedirectedSourceFile(source) {
|
|
15691
|
+
const node = createRedirectedSourceFile(source.redirectInfo);
|
|
15692
|
+
node.flags |= source.flags & ~8 /* Synthesized */;
|
|
15693
|
+
node.fileName = source.fileName;
|
|
15694
|
+
node.path = source.path;
|
|
15695
|
+
node.resolvedPath = source.resolvedPath;
|
|
15696
|
+
node.originalFileName = source.originalFileName;
|
|
15697
|
+
node.packageJsonLocations = source.packageJsonLocations;
|
|
15698
|
+
node.packageJsonScope = source.packageJsonScope;
|
|
15699
|
+
node.emitNode = void 0;
|
|
15700
|
+
return node;
|
|
15701
|
+
}
|
|
15702
|
+
function cloneSourceFileWorker(source) {
|
|
15703
|
+
const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */);
|
|
15704
|
+
node.flags |= source.flags & ~8 /* Synthesized */;
|
|
15389
15705
|
for (const p in source) {
|
|
15390
|
-
if (
|
|
15706
|
+
if (hasProperty(node, p) || !hasProperty(source, p)) {
|
|
15707
|
+
continue;
|
|
15708
|
+
}
|
|
15709
|
+
if (p === "emitNode") {
|
|
15710
|
+
node.emitNode = void 0;
|
|
15391
15711
|
continue;
|
|
15712
|
+
}
|
|
15392
15713
|
node[p] = source[p];
|
|
15393
15714
|
}
|
|
15394
|
-
node
|
|
15715
|
+
return node;
|
|
15716
|
+
}
|
|
15717
|
+
function cloneSourceFile(source) {
|
|
15718
|
+
const node = source.redirectInfo ? cloneRedirectedSourceFile(source) : cloneSourceFileWorker(source);
|
|
15719
|
+
setOriginalNode(node, source);
|
|
15720
|
+
return node;
|
|
15721
|
+
}
|
|
15722
|
+
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
15723
|
+
const node = cloneSourceFile(source);
|
|
15395
15724
|
node.statements = createNodeArray(statements);
|
|
15396
|
-
node.endOfFileToken = source.endOfFileToken;
|
|
15397
15725
|
node.isDeclarationFile = isDeclarationFile;
|
|
15398
15726
|
node.referencedFiles = referencedFiles;
|
|
15399
15727
|
node.typeReferenceDirectives = typeReferences;
|
|
15400
15728
|
node.hasNoDefaultLib = hasNoDefaultLib;
|
|
15401
15729
|
node.libReferenceDirectives = libReferences;
|
|
15402
15730
|
node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
|
15403
|
-
node.impliedNodeFormat = source.impliedNodeFormat;
|
|
15404
15731
|
return node;
|
|
15405
15732
|
}
|
|
15406
15733
|
function updateSourceFile(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) {
|
|
@@ -15410,6 +15737,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15410
15737
|
const node = createBaseNode(309 /* Bundle */);
|
|
15411
15738
|
node.prepends = prepends;
|
|
15412
15739
|
node.sourceFiles = sourceFiles;
|
|
15740
|
+
node.syntheticFileReferences = void 0;
|
|
15741
|
+
node.syntheticTypeReferences = void 0;
|
|
15742
|
+
node.syntheticLibReferences = void 0;
|
|
15743
|
+
node.hasNoDefaultLib = void 0;
|
|
15413
15744
|
return node;
|
|
15414
15745
|
}
|
|
15415
15746
|
function updateBundle(node, sourceFiles, prepends = emptyArray) {
|
|
@@ -15463,18 +15794,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15463
15794
|
return node;
|
|
15464
15795
|
}
|
|
15465
15796
|
function createSyntaxList(children) {
|
|
15466
|
-
const node = createBaseNode(
|
|
15797
|
+
const node = createBaseNode(351 /* SyntaxList */);
|
|
15467
15798
|
node._children = children;
|
|
15468
15799
|
return node;
|
|
15469
15800
|
}
|
|
15470
15801
|
function createNotEmittedStatement(original) {
|
|
15471
|
-
const node = createBaseNode(
|
|
15802
|
+
const node = createBaseNode(352 /* NotEmittedStatement */);
|
|
15472
15803
|
node.original = original;
|
|
15473
15804
|
setTextRange(node, original);
|
|
15474
15805
|
return node;
|
|
15475
15806
|
}
|
|
15476
15807
|
function createPartiallyEmittedExpression(expression, original) {
|
|
15477
|
-
const node = createBaseNode(
|
|
15808
|
+
const node = createBaseNode(353 /* PartiallyEmittedExpression */);
|
|
15478
15809
|
node.expression = expression;
|
|
15479
15810
|
node.original = original;
|
|
15480
15811
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -15496,7 +15827,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15496
15827
|
return node;
|
|
15497
15828
|
}
|
|
15498
15829
|
function createCommaListExpression(elements) {
|
|
15499
|
-
const node = createBaseNode(
|
|
15830
|
+
const node = createBaseNode(354 /* CommaListExpression */);
|
|
15500
15831
|
node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
|
|
15501
15832
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
15502
15833
|
return node;
|
|
@@ -15505,19 +15836,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15505
15836
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
15506
15837
|
}
|
|
15507
15838
|
function createEndOfDeclarationMarker(original) {
|
|
15508
|
-
const node = createBaseNode(
|
|
15839
|
+
const node = createBaseNode(356 /* EndOfDeclarationMarker */);
|
|
15509
15840
|
node.emitNode = {};
|
|
15510
15841
|
node.original = original;
|
|
15511
15842
|
return node;
|
|
15512
15843
|
}
|
|
15513
15844
|
function createMergeDeclarationMarker(original) {
|
|
15514
|
-
const node = createBaseNode(
|
|
15845
|
+
const node = createBaseNode(355 /* MergeDeclarationMarker */);
|
|
15515
15846
|
node.emitNode = {};
|
|
15516
15847
|
node.original = original;
|
|
15517
15848
|
return node;
|
|
15518
15849
|
}
|
|
15519
15850
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
15520
|
-
const node = createBaseNode(
|
|
15851
|
+
const node = createBaseNode(357 /* SyntheticReferenceExpression */);
|
|
15521
15852
|
node.expression = expression;
|
|
15522
15853
|
node.thisArg = thisArg;
|
|
15523
15854
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -15526,11 +15857,68 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15526
15857
|
function updateSyntheticReferenceExpression(node, expression, thisArg) {
|
|
15527
15858
|
return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node;
|
|
15528
15859
|
}
|
|
15860
|
+
function cloneGeneratedIdentifier(node) {
|
|
15861
|
+
const clone2 = createBaseIdentifier(node.escapedText, void 0);
|
|
15862
|
+
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15863
|
+
clone2.autoGenerateFlags = node.autoGenerateFlags;
|
|
15864
|
+
clone2.autoGenerateId = node.autoGenerateId;
|
|
15865
|
+
clone2.autoGeneratePrefix = node.autoGeneratePrefix;
|
|
15866
|
+
clone2.autoGenerateSuffix = node.autoGenerateSuffix;
|
|
15867
|
+
clone2.transformFlags = node.transformFlags;
|
|
15868
|
+
setOriginalNode(clone2, node);
|
|
15869
|
+
return clone2;
|
|
15870
|
+
}
|
|
15871
|
+
function cloneIdentifier(node) {
|
|
15872
|
+
const clone2 = createBaseIdentifier(node.escapedText, node.originalKeywordKind);
|
|
15873
|
+
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15874
|
+
clone2.typeArguments = node.typeArguments;
|
|
15875
|
+
clone2.hasExtendedUnicodeEscape = node.hasExtendedUnicodeEscape;
|
|
15876
|
+
clone2.jsDoc = node.jsDoc;
|
|
15877
|
+
clone2.jsDocCache = node.jsDocCache;
|
|
15878
|
+
clone2.flowNode = node.flowNode;
|
|
15879
|
+
clone2.symbol = node.symbol;
|
|
15880
|
+
clone2.transformFlags = node.transformFlags;
|
|
15881
|
+
setOriginalNode(clone2, node);
|
|
15882
|
+
return clone2;
|
|
15883
|
+
}
|
|
15884
|
+
function cloneGeneratedPrivateIdentifier(node) {
|
|
15885
|
+
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15886
|
+
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15887
|
+
clone2.autoGenerateFlags = node.autoGenerateFlags;
|
|
15888
|
+
clone2.autoGenerateId = node.autoGenerateId;
|
|
15889
|
+
clone2.autoGeneratePrefix = node.autoGeneratePrefix;
|
|
15890
|
+
clone2.autoGenerateSuffix = node.autoGenerateSuffix;
|
|
15891
|
+
clone2.transformFlags = node.transformFlags;
|
|
15892
|
+
setOriginalNode(clone2, node);
|
|
15893
|
+
return clone2;
|
|
15894
|
+
}
|
|
15895
|
+
function clonePrivateIdentifier(node) {
|
|
15896
|
+
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15897
|
+
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15898
|
+
clone2.transformFlags = node.transformFlags;
|
|
15899
|
+
setOriginalNode(clone2, node);
|
|
15900
|
+
return clone2;
|
|
15901
|
+
}
|
|
15529
15902
|
function cloneNode(node) {
|
|
15530
15903
|
if (node === void 0) {
|
|
15531
15904
|
return node;
|
|
15532
15905
|
}
|
|
15533
|
-
|
|
15906
|
+
if (isSourceFile(node)) {
|
|
15907
|
+
return cloneSourceFile(node);
|
|
15908
|
+
}
|
|
15909
|
+
if (isGeneratedIdentifier(node)) {
|
|
15910
|
+
return cloneGeneratedIdentifier(node);
|
|
15911
|
+
}
|
|
15912
|
+
if (isIdentifier(node)) {
|
|
15913
|
+
return cloneIdentifier(node);
|
|
15914
|
+
}
|
|
15915
|
+
if (isGeneratedPrivateIdentifier(node)) {
|
|
15916
|
+
return cloneGeneratedPrivateIdentifier(node);
|
|
15917
|
+
}
|
|
15918
|
+
if (isPrivateIdentifier(node)) {
|
|
15919
|
+
return clonePrivateIdentifier(node);
|
|
15920
|
+
}
|
|
15921
|
+
const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind);
|
|
15534
15922
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
15535
15923
|
clone2.transformFlags = node.transformFlags;
|
|
15536
15924
|
setOriginalNode(clone2, node);
|
|
@@ -15665,7 +16053,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15665
16053
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
15666
16054
|
case 232 /* NonNullExpression */:
|
|
15667
16055
|
return updateNonNullExpression(outerExpression, expression);
|
|
15668
|
-
case
|
|
16056
|
+
case 353 /* PartiallyEmittedExpression */:
|
|
15669
16057
|
return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
15670
16058
|
}
|
|
15671
16059
|
}
|
|
@@ -15969,12 +16357,26 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15969
16357
|
function asExpression(value) {
|
|
15970
16358
|
return typeof value === "string" ? createStringLiteral(value) : typeof value === "number" ? createNumericLiteral(value) : typeof value === "boolean" ? value ? createTrue() : createFalse() : value;
|
|
15971
16359
|
}
|
|
16360
|
+
function asInitializer(node) {
|
|
16361
|
+
return node && parenthesizerRules().parenthesizeExpressionForDisallowedComma(node);
|
|
16362
|
+
}
|
|
15972
16363
|
function asToken(value) {
|
|
15973
16364
|
return typeof value === "number" ? createToken(value) : value;
|
|
15974
16365
|
}
|
|
15975
16366
|
function asEmbeddedStatement(statement) {
|
|
15976
16367
|
return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginalNode(createEmptyStatement(), statement), statement) : statement;
|
|
15977
16368
|
}
|
|
16369
|
+
function asVariableDeclaration(variableDeclaration) {
|
|
16370
|
+
if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) {
|
|
16371
|
+
return createVariableDeclaration(
|
|
16372
|
+
variableDeclaration,
|
|
16373
|
+
void 0,
|
|
16374
|
+
void 0,
|
|
16375
|
+
void 0
|
|
16376
|
+
);
|
|
16377
|
+
}
|
|
16378
|
+
return variableDeclaration;
|
|
16379
|
+
}
|
|
15978
16380
|
}
|
|
15979
16381
|
function updateWithoutOriginal(updated, original) {
|
|
15980
16382
|
if (updated !== original) {
|
|
@@ -16075,6 +16477,9 @@ function getCookedText(kind, rawText) {
|
|
|
16075
16477
|
rawTextScanner.setText(void 0);
|
|
16076
16478
|
return tokenValue;
|
|
16077
16479
|
}
|
|
16480
|
+
function propagateNameFlags(node) {
|
|
16481
|
+
return node && isIdentifier(node) ? propagateIdentifierNameFlags(node) : propagateChildFlags(node);
|
|
16482
|
+
}
|
|
16078
16483
|
function propagateIdentifierNameFlags(node) {
|
|
16079
16484
|
return propagateChildFlags(node) & ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
16080
16485
|
}
|
|
@@ -16156,7 +16561,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
|
|
|
16156
16561
|
case 213 /* TypeAssertionExpression */:
|
|
16157
16562
|
case 235 /* SatisfiesExpression */:
|
|
16158
16563
|
case 231 /* AsExpression */:
|
|
16159
|
-
case
|
|
16564
|
+
case 353 /* PartiallyEmittedExpression */:
|
|
16160
16565
|
case 214 /* ParenthesizedExpression */:
|
|
16161
16566
|
case 106 /* SuperKeyword */:
|
|
16162
16567
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -16569,7 +16974,7 @@ function isMetaProperty(node) {
|
|
|
16569
16974
|
return node.kind === 233 /* MetaProperty */;
|
|
16570
16975
|
}
|
|
16571
16976
|
function isCommaListExpression(node) {
|
|
16572
|
-
return node.kind ===
|
|
16977
|
+
return node.kind === 354 /* CommaListExpression */;
|
|
16573
16978
|
}
|
|
16574
16979
|
function isTemplateSpan(node) {
|
|
16575
16980
|
return node.kind === 236 /* TemplateSpan */;
|
|
@@ -16650,7 +17055,7 @@ function isExportSpecifier(node) {
|
|
|
16650
17055
|
return node.kind === 278 /* ExportSpecifier */;
|
|
16651
17056
|
}
|
|
16652
17057
|
function isNotEmittedStatement(node) {
|
|
16653
|
-
return node.kind ===
|
|
17058
|
+
return node.kind === 352 /* NotEmittedStatement */;
|
|
16654
17059
|
}
|
|
16655
17060
|
function isExternalModuleReference(node) {
|
|
16656
17061
|
return node.kind === 280 /* ExternalModuleReference */;
|
|
@@ -16736,9 +17141,6 @@ function isJSDocTypeTag(node) {
|
|
|
16736
17141
|
function isJSDocTemplateTag(node) {
|
|
16737
17142
|
return node.kind === 347 /* JSDocTemplateTag */;
|
|
16738
17143
|
}
|
|
16739
|
-
function isJSDocSatisfiesTag(node) {
|
|
16740
|
-
return node.kind === 351 /* JSDocSatisfiesTag */;
|
|
16741
|
-
}
|
|
16742
17144
|
|
|
16743
17145
|
// src/compiler/factory/utilities.ts
|
|
16744
17146
|
function isLocalName(node) {
|
|
@@ -16760,7 +17162,7 @@ function findUseStrictPrologue(statements) {
|
|
|
16760
17162
|
return void 0;
|
|
16761
17163
|
}
|
|
16762
17164
|
function isCommaSequence(node) {
|
|
16763
|
-
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind ===
|
|
17165
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 354 /* CommaListExpression */;
|
|
16764
17166
|
}
|
|
16765
17167
|
function isJSDocTypeAssertion(node) {
|
|
16766
17168
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -16778,7 +17180,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
16778
17180
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
16779
17181
|
case 232 /* NonNullExpression */:
|
|
16780
17182
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
16781
|
-
case
|
|
17183
|
+
case 353 /* PartiallyEmittedExpression */:
|
|
16782
17184
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
16783
17185
|
}
|
|
16784
17186
|
return false;
|
|
@@ -17426,7 +17828,7 @@ var forEachChildTable = {
|
|
|
17426
17828
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
17427
17829
|
return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
|
|
17428
17830
|
},
|
|
17429
|
-
[
|
|
17831
|
+
[354 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
17430
17832
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
17431
17833
|
},
|
|
17432
17834
|
[281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -17494,11 +17896,10 @@ var forEachChildTable = {
|
|
|
17494
17896
|
[341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) {
|
|
17495
17897
|
return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
17496
17898
|
},
|
|
17497
|
-
[344 /* JSDocReturnTag */]:
|
|
17498
|
-
[346 /* JSDocTypeTag */]:
|
|
17499
|
-
[345 /* JSDocThisTag */]:
|
|
17500
|
-
[342 /* JSDocEnumTag */]:
|
|
17501
|
-
[351 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
|
|
17899
|
+
[344 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag,
|
|
17900
|
+
[346 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag,
|
|
17901
|
+
[345 /* JSDocThisTag */]: forEachChildInJSDocReturnTag,
|
|
17902
|
+
[342 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag,
|
|
17502
17903
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
17503
17904
|
return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);
|
|
17504
17905
|
},
|
|
@@ -17516,7 +17917,7 @@ var forEachChildTable = {
|
|
|
17516
17917
|
[339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
17517
17918
|
[334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
17518
17919
|
[340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
17519
|
-
[
|
|
17920
|
+
[353 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
17520
17921
|
};
|
|
17521
17922
|
function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
|
|
17522
17923
|
return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -17557,7 +17958,7 @@ function forEachChildInOptionalRestOrJSDocParameterModifier(node, cbNode, _cbNod
|
|
|
17557
17958
|
function forEachChildInJSDocParameterOrPropertyTag(node, cbNode, cbNodes) {
|
|
17558
17959
|
return visitNode2(cbNode, node.tagName) || (node.isNameFirst ? visitNode2(cbNode, node.name) || visitNode2(cbNode, node.typeExpression) : visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.name)) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
17559
17960
|
}
|
|
17560
|
-
function
|
|
17961
|
+
function forEachChildInJSDocReturnTag(node, cbNode, cbNodes) {
|
|
17561
17962
|
return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
17562
17963
|
}
|
|
17563
17964
|
function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {
|
|
@@ -18736,7 +19137,7 @@ var Parser;
|
|
|
18736
19137
|
if (!canReuseNode(node, parsingContext2)) {
|
|
18737
19138
|
return void 0;
|
|
18738
19139
|
}
|
|
18739
|
-
if (node.jsDocCache) {
|
|
19140
|
+
if (canHaveJSDoc(node) && node.jsDocCache) {
|
|
18740
19141
|
node.jsDocCache = void 0;
|
|
18741
19142
|
}
|
|
18742
19143
|
return node;
|
|
@@ -22808,9 +23209,6 @@ var Parser;
|
|
|
22808
23209
|
case "callback":
|
|
22809
23210
|
tag = parseCallbackTag(start2, tagName, margin, indentText);
|
|
22810
23211
|
break;
|
|
22811
|
-
case "satisfies":
|
|
22812
|
-
tag = parseSatisfiesTag(start2, tagName, margin, indentText);
|
|
22813
|
-
break;
|
|
22814
23212
|
case "see":
|
|
22815
23213
|
tag = parseSeeTag(start2, tagName, margin, indentText);
|
|
22816
23214
|
break;
|
|
@@ -23104,14 +23502,6 @@ var Parser;
|
|
|
23104
23502
|
const className = parseExpressionWithTypeArgumentsForAugments();
|
|
23105
23503
|
return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
|
|
23106
23504
|
}
|
|
23107
|
-
function parseSatisfiesTag(start2, tagName, margin, indentText) {
|
|
23108
|
-
if (some(tags, isJSDocSatisfiesTag)) {
|
|
23109
|
-
parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText);
|
|
23110
|
-
}
|
|
23111
|
-
const typeExpression = parseJSDocTypeExpression(true);
|
|
23112
|
-
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
23113
|
-
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
|
|
23114
|
-
}
|
|
23115
23505
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
23116
23506
|
const usedBrace = parseOptional(18 /* OpenBraceToken */);
|
|
23117
23507
|
const pos = getNodePos();
|
|
@@ -25897,8 +26287,7 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
25897
26287
|
}
|
|
25898
26288
|
}
|
|
25899
26289
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
25900
|
-
|
|
25901
|
-
let result = perFolderCache && perFolderCache.get(moduleName, resolutionMode);
|
|
26290
|
+
let result = cache == null ? void 0 : cache.getFromDirectoryCache(moduleName, resolutionMode, containingDirectory, redirectedReference);
|
|
25902
26291
|
if (result) {
|
|
25903
26292
|
if (traceEnabled) {
|
|
25904
26293
|
trace(host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);
|
|
@@ -25948,11 +26337,9 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
25948
26337
|
if (result && result.resolvedModule)
|
|
25949
26338
|
perfLogger.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`);
|
|
25950
26339
|
perfLogger.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
|
|
25954
|
-
cache.getOrCreateCacheForModuleName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
25955
|
-
}
|
|
26340
|
+
cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result);
|
|
26341
|
+
if (!isExternalModuleNameRelative(moduleName)) {
|
|
26342
|
+
cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
|
|
25956
26343
|
}
|
|
25957
26344
|
}
|
|
25958
26345
|
if (traceEnabled) {
|
|
@@ -26835,7 +27222,7 @@ function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directo
|
|
|
26835
27222
|
return loadModuleFromNearestNodeModulesDirectoryWorker(4 /* Declaration */, moduleName, directory, state, true, void 0, void 0);
|
|
26836
27223
|
}
|
|
26837
27224
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
26838
|
-
const
|
|
27225
|
+
const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
26839
27226
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
26840
27227
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
26841
27228
|
if (priorityExtensions) {
|
|
@@ -26849,7 +27236,7 @@ function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName,
|
|
|
26849
27236
|
function lookup(extensions2) {
|
|
26850
27237
|
return forEachAncestorDirectory(normalizeSlashes(directory), (ancestorDirectory) => {
|
|
26851
27238
|
if (getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
26852
|
-
const resolutionFromCache = tryFindNonRelativeModuleNameInCache(
|
|
27239
|
+
const resolutionFromCache = tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, ancestorDirectory, redirectedReference, state);
|
|
26853
27240
|
if (resolutionFromCache) {
|
|
26854
27241
|
return resolutionFromCache;
|
|
26855
27242
|
}
|
|
@@ -26982,8 +27369,8 @@ function mangleScopedPackageName(packageName) {
|
|
|
26982
27369
|
}
|
|
26983
27370
|
return packageName;
|
|
26984
27371
|
}
|
|
26985
|
-
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, state) {
|
|
26986
|
-
const result = cache && cache.
|
|
27372
|
+
function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) {
|
|
27373
|
+
const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference);
|
|
26987
27374
|
if (result) {
|
|
26988
27375
|
if (state.traceEnabled) {
|
|
26989
27376
|
trace(state.host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);
|
|
@@ -27026,9 +27413,8 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host,
|
|
|
27026
27413
|
return { value: resolvedUsingSettings };
|
|
27027
27414
|
}
|
|
27028
27415
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
27029
|
-
const perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName, void 0, redirectedReference);
|
|
27030
27416
|
const resolved2 = forEachAncestorDirectory(containingDirectory, (directory) => {
|
|
27031
|
-
const resolutionFromCache = tryFindNonRelativeModuleNameInCache(
|
|
27417
|
+
const resolutionFromCache = tryFindNonRelativeModuleNameInCache(cache, moduleName, void 0, directory, redirectedReference, state);
|
|
27032
27418
|
if (resolutionFromCache) {
|
|
27033
27419
|
return resolutionFromCache;
|
|
27034
27420
|
}
|
|
@@ -27417,13 +27803,14 @@ function createBinder() {
|
|
|
27417
27803
|
if (node.kind === 278 /* ExportSpecifier */ || node.kind === 268 /* ImportEqualsDeclaration */ && hasExportModifier) {
|
|
27418
27804
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
27419
27805
|
} else {
|
|
27806
|
+
Debug.assertNode(container, canHaveLocals);
|
|
27420
27807
|
return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes);
|
|
27421
27808
|
}
|
|
27422
27809
|
} else {
|
|
27423
27810
|
if (isJSDocTypeAlias(node))
|
|
27424
27811
|
Debug.assert(isInJSFile(node));
|
|
27425
27812
|
if (!isAmbientModule(node) && (hasExportModifier || container.flags & 64 /* ExportContext */)) {
|
|
27426
|
-
if (!container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) {
|
|
27813
|
+
if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) {
|
|
27427
27814
|
return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
|
|
27428
27815
|
}
|
|
27429
27816
|
const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0;
|
|
@@ -27432,6 +27819,7 @@ function createBinder() {
|
|
|
27432
27819
|
node.localSymbol = local;
|
|
27433
27820
|
return local;
|
|
27434
27821
|
} else {
|
|
27822
|
+
Debug.assertNode(container, canHaveLocals);
|
|
27435
27823
|
return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes);
|
|
27436
27824
|
}
|
|
27437
27825
|
}
|
|
@@ -27464,11 +27852,13 @@ function createBinder() {
|
|
|
27464
27852
|
container = blockScopeContainer = node;
|
|
27465
27853
|
if (containerFlags & 32 /* HasLocals */) {
|
|
27466
27854
|
container.locals = createSymbolTable();
|
|
27855
|
+
addToContainerChain(container);
|
|
27467
27856
|
}
|
|
27468
|
-
addToContainerChain(container);
|
|
27469
27857
|
} else if (containerFlags & 2 /* IsBlockScopedContainer */) {
|
|
27470
27858
|
blockScopeContainer = node;
|
|
27471
|
-
|
|
27859
|
+
if (containerFlags & 32 /* HasLocals */) {
|
|
27860
|
+
blockScopeContainer.locals = void 0;
|
|
27861
|
+
}
|
|
27472
27862
|
}
|
|
27473
27863
|
if (containerFlags & 4 /* IsControlFlowContainer */) {
|
|
27474
27864
|
const saveCurrentFlow = currentFlow;
|
|
@@ -28433,60 +28823,6 @@ function createBinder() {
|
|
|
28433
28823
|
}
|
|
28434
28824
|
}
|
|
28435
28825
|
}
|
|
28436
|
-
function getContainerFlags(node) {
|
|
28437
|
-
switch (node.kind) {
|
|
28438
|
-
case 228 /* ClassExpression */:
|
|
28439
|
-
case 260 /* ClassDeclaration */:
|
|
28440
|
-
case 263 /* EnumDeclaration */:
|
|
28441
|
-
case 207 /* ObjectLiteralExpression */:
|
|
28442
|
-
case 184 /* TypeLiteral */:
|
|
28443
|
-
case 325 /* JSDocTypeLiteral */:
|
|
28444
|
-
case 289 /* JsxAttributes */:
|
|
28445
|
-
return 1 /* IsContainer */;
|
|
28446
|
-
case 261 /* InterfaceDeclaration */:
|
|
28447
|
-
return 1 /* IsContainer */ | 64 /* IsInterface */;
|
|
28448
|
-
case 264 /* ModuleDeclaration */:
|
|
28449
|
-
case 262 /* TypeAliasDeclaration */:
|
|
28450
|
-
case 197 /* MappedType */:
|
|
28451
|
-
case 178 /* IndexSignature */:
|
|
28452
|
-
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
28453
|
-
case 308 /* SourceFile */:
|
|
28454
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
|
|
28455
|
-
case 174 /* GetAccessor */:
|
|
28456
|
-
case 175 /* SetAccessor */:
|
|
28457
|
-
case 171 /* MethodDeclaration */:
|
|
28458
|
-
if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {
|
|
28459
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */;
|
|
28460
|
-
}
|
|
28461
|
-
case 173 /* Constructor */:
|
|
28462
|
-
case 259 /* FunctionDeclaration */:
|
|
28463
|
-
case 170 /* MethodSignature */:
|
|
28464
|
-
case 176 /* CallSignature */:
|
|
28465
|
-
case 326 /* JSDocSignature */:
|
|
28466
|
-
case 320 /* JSDocFunctionType */:
|
|
28467
|
-
case 181 /* FunctionType */:
|
|
28468
|
-
case 177 /* ConstructSignature */:
|
|
28469
|
-
case 182 /* ConstructorType */:
|
|
28470
|
-
case 172 /* ClassStaticBlockDeclaration */:
|
|
28471
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
28472
|
-
case 215 /* FunctionExpression */:
|
|
28473
|
-
case 216 /* ArrowFunction */:
|
|
28474
|
-
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
28475
|
-
case 265 /* ModuleBlock */:
|
|
28476
|
-
return 4 /* IsControlFlowContainer */;
|
|
28477
|
-
case 169 /* PropertyDeclaration */:
|
|
28478
|
-
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
|
|
28479
|
-
case 295 /* CatchClause */:
|
|
28480
|
-
case 245 /* ForStatement */:
|
|
28481
|
-
case 246 /* ForInStatement */:
|
|
28482
|
-
case 247 /* ForOfStatement */:
|
|
28483
|
-
case 266 /* CaseBlock */:
|
|
28484
|
-
return 2 /* IsBlockScopedContainer */;
|
|
28485
|
-
case 238 /* Block */:
|
|
28486
|
-
return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */;
|
|
28487
|
-
}
|
|
28488
|
-
return 0 /* None */;
|
|
28489
|
-
}
|
|
28490
28826
|
function addToContainerChain(next) {
|
|
28491
28827
|
if (lastContainer) {
|
|
28492
28828
|
lastContainer.nextContainer = next;
|
|
@@ -28525,11 +28861,11 @@ function createBinder() {
|
|
|
28525
28861
|
case 215 /* FunctionExpression */:
|
|
28526
28862
|
case 216 /* ArrowFunction */:
|
|
28527
28863
|
case 320 /* JSDocFunctionType */:
|
|
28528
|
-
case 348 /* JSDocTypedefTag */:
|
|
28529
|
-
case 341 /* JSDocCallbackTag */:
|
|
28530
28864
|
case 172 /* ClassStaticBlockDeclaration */:
|
|
28531
28865
|
case 262 /* TypeAliasDeclaration */:
|
|
28532
28866
|
case 197 /* MappedType */:
|
|
28867
|
+
if (container.locals)
|
|
28868
|
+
Debug.assertNode(container, canHaveLocals);
|
|
28533
28869
|
return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes);
|
|
28534
28870
|
}
|
|
28535
28871
|
}
|
|
@@ -28624,6 +28960,7 @@ function createBinder() {
|
|
|
28624
28960
|
break;
|
|
28625
28961
|
}
|
|
28626
28962
|
default:
|
|
28963
|
+
Debug.assertNode(blockScopeContainer, canHaveLocals);
|
|
28627
28964
|
if (!blockScopeContainer.locals) {
|
|
28628
28965
|
blockScopeContainer.locals = createSymbolTable();
|
|
28629
28966
|
addToContainerChain(blockScopeContainer);
|
|
@@ -29280,7 +29617,7 @@ function createBinder() {
|
|
|
29280
29617
|
if (hasPrivateIdentifier) {
|
|
29281
29618
|
return;
|
|
29282
29619
|
}
|
|
29283
|
-
const thisContainer = getThisContainer(node, false);
|
|
29620
|
+
const thisContainer = getThisContainer(node, false, false);
|
|
29284
29621
|
switch (thisContainer.kind) {
|
|
29285
29622
|
case 259 /* FunctionDeclaration */:
|
|
29286
29623
|
case 215 /* FunctionExpression */:
|
|
@@ -29613,12 +29950,12 @@ function createBinder() {
|
|
|
29613
29950
|
return extendsType && extendsType.parent;
|
|
29614
29951
|
}
|
|
29615
29952
|
function bindTypeParameter(node) {
|
|
29953
|
+
var _a2, _b;
|
|
29616
29954
|
if (isJSDocTemplateTag(node.parent)) {
|
|
29617
29955
|
const container2 = getEffectiveContainerForJSDocTemplateTag(node.parent);
|
|
29618
29956
|
if (container2) {
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
}
|
|
29957
|
+
Debug.assertNode(container2, canHaveLocals);
|
|
29958
|
+
(_a2 = container2.locals) != null ? _a2 : container2.locals = createSymbolTable();
|
|
29622
29959
|
declareSymbol(container2.locals, void 0, node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);
|
|
29623
29960
|
} else {
|
|
29624
29961
|
declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);
|
|
@@ -29626,9 +29963,8 @@ function createBinder() {
|
|
|
29626
29963
|
} else if (node.parent.kind === 192 /* InferType */) {
|
|
29627
29964
|
const container2 = getInferTypeContainer(node.parent);
|
|
29628
29965
|
if (container2) {
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
}
|
|
29966
|
+
Debug.assertNode(container2, canHaveLocals);
|
|
29967
|
+
(_b = container2.locals) != null ? _b : container2.locals = createSymbolTable();
|
|
29632
29968
|
declareSymbol(container2.locals, void 0, node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */);
|
|
29633
29969
|
} else {
|
|
29634
29970
|
bindAnonymousDeclaration(node, 262144 /* TypeParameter */, getDeclarationName(node));
|
|
@@ -29706,15 +30042,72 @@ function isExportsOrModuleExportsOrAlias(sourceFile, node) {
|
|
|
29706
30042
|
}
|
|
29707
30043
|
return false;
|
|
29708
30044
|
}
|
|
30045
|
+
function getContainerFlags(node) {
|
|
30046
|
+
switch (node.kind) {
|
|
30047
|
+
case 228 /* ClassExpression */:
|
|
30048
|
+
case 260 /* ClassDeclaration */:
|
|
30049
|
+
case 263 /* EnumDeclaration */:
|
|
30050
|
+
case 207 /* ObjectLiteralExpression */:
|
|
30051
|
+
case 184 /* TypeLiteral */:
|
|
30052
|
+
case 325 /* JSDocTypeLiteral */:
|
|
30053
|
+
case 289 /* JsxAttributes */:
|
|
30054
|
+
return 1 /* IsContainer */;
|
|
30055
|
+
case 261 /* InterfaceDeclaration */:
|
|
30056
|
+
return 1 /* IsContainer */ | 64 /* IsInterface */;
|
|
30057
|
+
case 264 /* ModuleDeclaration */:
|
|
30058
|
+
case 262 /* TypeAliasDeclaration */:
|
|
30059
|
+
case 197 /* MappedType */:
|
|
30060
|
+
case 178 /* IndexSignature */:
|
|
30061
|
+
return 1 /* IsContainer */ | 32 /* HasLocals */;
|
|
30062
|
+
case 308 /* SourceFile */:
|
|
30063
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
|
|
30064
|
+
case 174 /* GetAccessor */:
|
|
30065
|
+
case 175 /* SetAccessor */:
|
|
30066
|
+
case 171 /* MethodDeclaration */:
|
|
30067
|
+
if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {
|
|
30068
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */;
|
|
30069
|
+
}
|
|
30070
|
+
case 173 /* Constructor */:
|
|
30071
|
+
case 259 /* FunctionDeclaration */:
|
|
30072
|
+
case 170 /* MethodSignature */:
|
|
30073
|
+
case 176 /* CallSignature */:
|
|
30074
|
+
case 326 /* JSDocSignature */:
|
|
30075
|
+
case 320 /* JSDocFunctionType */:
|
|
30076
|
+
case 181 /* FunctionType */:
|
|
30077
|
+
case 177 /* ConstructSignature */:
|
|
30078
|
+
case 182 /* ConstructorType */:
|
|
30079
|
+
case 172 /* ClassStaticBlockDeclaration */:
|
|
30080
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
|
|
30081
|
+
case 215 /* FunctionExpression */:
|
|
30082
|
+
case 216 /* ArrowFunction */:
|
|
30083
|
+
return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
|
|
30084
|
+
case 265 /* ModuleBlock */:
|
|
30085
|
+
return 4 /* IsControlFlowContainer */;
|
|
30086
|
+
case 169 /* PropertyDeclaration */:
|
|
30087
|
+
return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
|
|
30088
|
+
case 295 /* CatchClause */:
|
|
30089
|
+
case 245 /* ForStatement */:
|
|
30090
|
+
case 246 /* ForInStatement */:
|
|
30091
|
+
case 247 /* ForOfStatement */:
|
|
30092
|
+
case 266 /* CaseBlock */:
|
|
30093
|
+
return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;
|
|
30094
|
+
case 238 /* Block */:
|
|
30095
|
+
return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */;
|
|
30096
|
+
}
|
|
30097
|
+
return 0 /* None */;
|
|
30098
|
+
}
|
|
29709
30099
|
function lookupSymbolForName(container, name) {
|
|
29710
|
-
|
|
30100
|
+
var _a2, _b, _c, _d, _e;
|
|
30101
|
+
const local = (_b = (_a2 = tryCast(container, canHaveLocals)) == null ? void 0 : _a2.locals) == null ? void 0 : _b.get(name);
|
|
29711
30102
|
if (local) {
|
|
29712
|
-
return local.exportSymbol
|
|
30103
|
+
return (_c = local.exportSymbol) != null ? _c : local;
|
|
29713
30104
|
}
|
|
29714
30105
|
if (isSourceFile(container) && container.jsGlobalAugmentations && container.jsGlobalAugmentations.has(name)) {
|
|
29715
30106
|
return container.jsGlobalAugmentations.get(name);
|
|
29716
30107
|
}
|
|
29717
|
-
|
|
30108
|
+
if (canHaveSymbol(container)) {
|
|
30109
|
+
return (_e = (_d = container.symbol) == null ? void 0 : _d.exports) == null ? void 0 : _e.get(name);
|
|
30110
|
+
}
|
|
29718
30111
|
}
|
|
29719
30112
|
|
|
29720
30113
|
// src/compiler/checker.ts
|
|
@@ -31091,13 +31484,13 @@ var visitEachChildTable = {
|
|
|
31091
31484
|
visitLexicalEnvironment(node.statements, visitor, context)
|
|
31092
31485
|
);
|
|
31093
31486
|
},
|
|
31094
|
-
[
|
|
31487
|
+
[353 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
31095
31488
|
return context.factory.updatePartiallyEmittedExpression(
|
|
31096
31489
|
node,
|
|
31097
31490
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
31098
31491
|
);
|
|
31099
31492
|
},
|
|
31100
|
-
[
|
|
31493
|
+
[354 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
31101
31494
|
return context.factory.updateCommaListExpression(
|
|
31102
31495
|
node,
|
|
31103
31496
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -31751,14 +32144,13 @@ var BuilderState;
|
|
|
31751
32144
|
const referencedMap = options.module !== 0 /* None */ && !isOutFile ? createManyToManyPathMap() : void 0;
|
|
31752
32145
|
const exportedModulesMap = referencedMap ? createManyToManyPathMap() : void 0;
|
|
31753
32146
|
const useOldState = canReuseOldState(referencedMap, oldState);
|
|
31754
|
-
const getCanonicalFileName = createGetCanonicalFileName(newProgram.useCaseSensitiveFileNames());
|
|
31755
32147
|
newProgram.getTypeChecker();
|
|
31756
32148
|
for (const sourceFile of newProgram.getSourceFiles()) {
|
|
31757
32149
|
const version2 = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
31758
32150
|
const oldUncommittedSignature = useOldState ? (_a2 = oldState.oldSignatures) == null ? void 0 : _a2.get(sourceFile.resolvedPath) : void 0;
|
|
31759
32151
|
const signature = oldUncommittedSignature === void 0 ? useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) == null ? void 0 : _b.signature : void 0 : oldUncommittedSignature || void 0;
|
|
31760
32152
|
if (referencedMap) {
|
|
31761
|
-
const newReferences = getReferencedFiles(newProgram, sourceFile, getCanonicalFileName);
|
|
32153
|
+
const newReferences = getReferencedFiles(newProgram, sourceFile, newProgram.getCanonicalFileName);
|
|
31762
32154
|
if (newReferences) {
|
|
31763
32155
|
referencedMap.set(sourceFile.resolvedPath, newReferences);
|
|
31764
32156
|
}
|
|
@@ -31820,6 +32212,26 @@ var BuilderState;
|
|
|
31820
32212
|
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path2);
|
|
31821
32213
|
}
|
|
31822
32214
|
BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
|
|
32215
|
+
function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {
|
|
32216
|
+
programOfThisState.emit(
|
|
32217
|
+
sourceFile,
|
|
32218
|
+
(fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {
|
|
32219
|
+
Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`);
|
|
32220
|
+
onNewSignature(computeSignatureWithDiagnostics(
|
|
32221
|
+
programOfThisState,
|
|
32222
|
+
sourceFile,
|
|
32223
|
+
text,
|
|
32224
|
+
host,
|
|
32225
|
+
data
|
|
32226
|
+
), sourceFiles);
|
|
32227
|
+
},
|
|
32228
|
+
cancellationToken,
|
|
32229
|
+
true,
|
|
32230
|
+
void 0,
|
|
32231
|
+
true
|
|
32232
|
+
);
|
|
32233
|
+
}
|
|
32234
|
+
BuilderState2.computeDtsSignature = computeDtsSignature;
|
|
31823
32235
|
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host, useFileVersionAsSignature = state.useFileVersionAsSignature) {
|
|
31824
32236
|
var _a2;
|
|
31825
32237
|
if ((_a2 = state.hasCalledUpdateShapeSignature) == null ? void 0 : _a2.has(sourceFile.resolvedPath))
|
|
@@ -31828,26 +32240,12 @@ var BuilderState;
|
|
|
31828
32240
|
const prevSignature = info.signature;
|
|
31829
32241
|
let latestSignature;
|
|
31830
32242
|
if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
|
|
31831
|
-
programOfThisState
|
|
31832
|
-
|
|
31833
|
-
(
|
|
31834
|
-
|
|
31835
|
-
|
|
31836
|
-
|
|
31837
|
-
sourceFile,
|
|
31838
|
-
text,
|
|
31839
|
-
host,
|
|
31840
|
-
data
|
|
31841
|
-
);
|
|
31842
|
-
if (latestSignature !== prevSignature) {
|
|
31843
|
-
updateExportedModules(state, sourceFile, sourceFiles[0].exportedModulesFromDeclarationEmit);
|
|
31844
|
-
}
|
|
31845
|
-
},
|
|
31846
|
-
cancellationToken,
|
|
31847
|
-
true,
|
|
31848
|
-
void 0,
|
|
31849
|
-
true
|
|
31850
|
-
);
|
|
32243
|
+
computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, (signature, sourceFiles) => {
|
|
32244
|
+
latestSignature = signature;
|
|
32245
|
+
if (latestSignature !== prevSignature) {
|
|
32246
|
+
updateExportedModules(state, sourceFile, sourceFiles[0].exportedModulesFromDeclarationEmit);
|
|
32247
|
+
}
|
|
32248
|
+
});
|
|
31851
32249
|
}
|
|
31852
32250
|
if (latestSignature === void 0) {
|
|
31853
32251
|
latestSignature = sourceFile.version;
|
|
@@ -31871,27 +32269,24 @@ var BuilderState;
|
|
|
31871
32269
|
if (!state.exportedModulesMap)
|
|
31872
32270
|
return;
|
|
31873
32271
|
(state.oldExportedModulesMap || (state.oldExportedModulesMap = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false);
|
|
31874
|
-
|
|
31875
|
-
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
31876
|
-
return;
|
|
31877
|
-
}
|
|
31878
|
-
let exportedModules;
|
|
31879
|
-
exportedModulesFromDeclarationEmit.forEach((symbol) => addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)));
|
|
32272
|
+
const exportedModules = getExportedModules(exportedModulesFromDeclarationEmit);
|
|
31880
32273
|
if (exportedModules) {
|
|
31881
32274
|
state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
|
|
31882
32275
|
} else {
|
|
31883
32276
|
state.exportedModulesMap.deleteKey(sourceFile.resolvedPath);
|
|
31884
32277
|
}
|
|
31885
|
-
function addExportedModule(exportedModulePaths) {
|
|
31886
|
-
if (exportedModulePaths == null ? void 0 : exportedModulePaths.length) {
|
|
31887
|
-
if (!exportedModules) {
|
|
31888
|
-
exportedModules = /* @__PURE__ */ new Set();
|
|
31889
|
-
}
|
|
31890
|
-
exportedModulePaths.forEach((path2) => exportedModules.add(path2));
|
|
31891
|
-
}
|
|
31892
|
-
}
|
|
31893
32278
|
}
|
|
31894
32279
|
BuilderState2.updateExportedModules = updateExportedModules;
|
|
32280
|
+
function getExportedModules(exportedModulesFromDeclarationEmit) {
|
|
32281
|
+
let exportedModules;
|
|
32282
|
+
exportedModulesFromDeclarationEmit == null ? void 0 : exportedModulesFromDeclarationEmit.forEach(
|
|
32283
|
+
(symbol) => getReferencedFilesFromImportedModuleSymbol(symbol).forEach(
|
|
32284
|
+
(path2) => (exportedModules != null ? exportedModules : exportedModules = /* @__PURE__ */ new Set()).add(path2)
|
|
32285
|
+
)
|
|
32286
|
+
);
|
|
32287
|
+
return exportedModules;
|
|
32288
|
+
}
|
|
32289
|
+
BuilderState2.getExportedModules = getExportedModules;
|
|
31895
32290
|
function getAllDependencies(state, programOfThisState, sourceFile) {
|
|
31896
32291
|
const compilerOptions = programOfThisState.getCompilerOptions();
|
|
31897
32292
|
if (outFile(compilerOptions)) {
|
|
@@ -32006,7 +32401,6 @@ function getTextHandlingSourceMapForSignature(text, data) {
|
|
|
32006
32401
|
}
|
|
32007
32402
|
function computeSignatureWithDiagnostics(program, sourceFile, text, host, data) {
|
|
32008
32403
|
var _a2, _b;
|
|
32009
|
-
let getCanonicalFileName;
|
|
32010
32404
|
text = getTextHandlingSourceMapForSignature(text, data);
|
|
32011
32405
|
let sourceFileDirectory;
|
|
32012
32406
|
if ((_a2 = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a2.length) {
|
|
@@ -32026,7 +32420,7 @@ function computeSignatureWithDiagnostics(program, sourceFile, text, host, data)
|
|
|
32026
32420
|
return `${ensurePathIsNonModuleName(getRelativePathFromDirectory(
|
|
32027
32421
|
sourceFileDirectory,
|
|
32028
32422
|
diagnostic.file.resolvedPath,
|
|
32029
|
-
|
|
32423
|
+
program.getCanonicalFileName
|
|
32030
32424
|
))}(${diagnostic.start},${diagnostic.length})`;
|
|
32031
32425
|
}
|
|
32032
32426
|
}
|