@typescript-deploys/pr-build 5.0.0-pr-51771-7 → 5.0.0-pr-51753-3
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 +132 -108
- package/lib/tsserver.js +153028 -150759
- package/lib/tsserverlibrary.d.ts +17 -8
- package/lib/tsserverlibrary.js +165 -131
- package/lib/typescript.d.ts +17 -8
- package/lib/typescript.js +161 -131
- package/lib/typingsInstaller.js +65 -59
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
26
|
+
var version = `${versionMajorMinor}.0-insiders.20221206`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -1695,22 +1695,8 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
1695
1695
|
function enableDebugInfo() {
|
|
1696
1696
|
if (isDebugInfoEnabled)
|
|
1697
1697
|
return;
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
function getWeakTypeTextMap() {
|
|
1701
|
-
if (weakTypeTextMap === void 0) {
|
|
1702
|
-
if (typeof WeakMap === "function")
|
|
1703
|
-
weakTypeTextMap = /* @__PURE__ */ new WeakMap();
|
|
1704
|
-
}
|
|
1705
|
-
return weakTypeTextMap;
|
|
1706
|
-
}
|
|
1707
|
-
function getWeakNodeTextMap() {
|
|
1708
|
-
if (weakNodeTextMap === void 0) {
|
|
1709
|
-
if (typeof WeakMap === "function")
|
|
1710
|
-
weakNodeTextMap = /* @__PURE__ */ new WeakMap();
|
|
1711
|
-
}
|
|
1712
|
-
return weakNodeTextMap;
|
|
1713
|
-
}
|
|
1698
|
+
const weakTypeTextMap = /* @__PURE__ */ new WeakMap();
|
|
1699
|
+
const weakNodeTextMap = /* @__PURE__ */ new WeakMap();
|
|
1714
1700
|
Object.defineProperties(objectAllocator.getSymbolConstructor().prototype, {
|
|
1715
1701
|
__tsDebuggerDisplay: {
|
|
1716
1702
|
value() {
|
|
@@ -1739,11 +1725,10 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
1739
1725
|
} },
|
|
1740
1726
|
__debugTypeToString: {
|
|
1741
1727
|
value() {
|
|
1742
|
-
|
|
1743
|
-
let text = map2 == null ? void 0 : map2.get(this);
|
|
1728
|
+
let text = weakTypeTextMap.get(this);
|
|
1744
1729
|
if (text === void 0) {
|
|
1745
1730
|
text = this.checker.typeToString(this);
|
|
1746
|
-
|
|
1731
|
+
weakTypeTextMap.set(this, text);
|
|
1747
1732
|
}
|
|
1748
1733
|
return text;
|
|
1749
1734
|
}
|
|
@@ -1795,13 +1780,12 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
1795
1780
|
value(includeTrivia) {
|
|
1796
1781
|
if (nodeIsSynthesized(this))
|
|
1797
1782
|
return "";
|
|
1798
|
-
|
|
1799
|
-
let text = map2 == null ? void 0 : map2.get(this);
|
|
1783
|
+
let text = weakNodeTextMap.get(this);
|
|
1800
1784
|
if (text === void 0) {
|
|
1801
1785
|
const parseNode = getParseTreeNode(this);
|
|
1802
1786
|
const sourceFile = parseNode && getSourceFileOfNode(parseNode);
|
|
1803
1787
|
text = sourceFile ? getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
|
|
1804
|
-
|
|
1788
|
+
weakNodeTextMap.set(this, text);
|
|
1805
1789
|
}
|
|
1806
1790
|
return text;
|
|
1807
1791
|
}
|
|
@@ -3356,14 +3340,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
3356
3340
|
SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 348] = "JSDocTypedefTag";
|
|
3357
3341
|
SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 349] = "JSDocSeeTag";
|
|
3358
3342
|
SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 350] = "JSDocPropertyTag";
|
|
3359
|
-
SyntaxKind4[SyntaxKind4["
|
|
3360
|
-
SyntaxKind4[SyntaxKind4["
|
|
3361
|
-
SyntaxKind4[SyntaxKind4["
|
|
3362
|
-
SyntaxKind4[SyntaxKind4["
|
|
3363
|
-
SyntaxKind4[SyntaxKind4["
|
|
3364
|
-
SyntaxKind4[SyntaxKind4["
|
|
3365
|
-
SyntaxKind4[SyntaxKind4["
|
|
3366
|
-
SyntaxKind4[SyntaxKind4["
|
|
3343
|
+
SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 351] = "JSDocSatisfiesTag";
|
|
3344
|
+
SyntaxKind4[SyntaxKind4["SyntaxList"] = 352] = "SyntaxList";
|
|
3345
|
+
SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 353] = "NotEmittedStatement";
|
|
3346
|
+
SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 354] = "PartiallyEmittedExpression";
|
|
3347
|
+
SyntaxKind4[SyntaxKind4["CommaListExpression"] = 355] = "CommaListExpression";
|
|
3348
|
+
SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 356] = "MergeDeclarationMarker";
|
|
3349
|
+
SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 357] = "EndOfDeclarationMarker";
|
|
3350
|
+
SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 358] = "SyntheticReferenceExpression";
|
|
3351
|
+
SyntaxKind4[SyntaxKind4["Count"] = 359] = "Count";
|
|
3367
3352
|
SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
|
|
3368
3353
|
SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
|
|
3369
3354
|
SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -9891,6 +9876,9 @@ function getJSDocThisTag(node) {
|
|
|
9891
9876
|
function getJSDocReturnTag(node) {
|
|
9892
9877
|
return getFirstJSDocTag(node, isJSDocReturnTag);
|
|
9893
9878
|
}
|
|
9879
|
+
function getJSDocSatisfiesTag(node) {
|
|
9880
|
+
return getFirstJSDocTag(node, isJSDocSatisfiesTag);
|
|
9881
|
+
}
|
|
9894
9882
|
function getJSDocTypeTag(node) {
|
|
9895
9883
|
const tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
9896
9884
|
if (tag && tag.typeExpression && tag.typeExpression.type) {
|
|
@@ -10381,8 +10369,8 @@ function isExpressionKind(kind) {
|
|
|
10381
10369
|
case 227 /* SpreadElement */:
|
|
10382
10370
|
case 231 /* AsExpression */:
|
|
10383
10371
|
case 229 /* OmittedExpression */:
|
|
10384
|
-
case
|
|
10385
|
-
case
|
|
10372
|
+
case 355 /* CommaListExpression */:
|
|
10373
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
10386
10374
|
case 235 /* SatisfiesExpression */:
|
|
10387
10375
|
return true;
|
|
10388
10376
|
default:
|
|
@@ -10445,7 +10433,7 @@ function isDeclarationStatementKind(kind) {
|
|
|
10445
10433
|
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 */;
|
|
10446
10434
|
}
|
|
10447
10435
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
10448
|
-
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 ===
|
|
10436
|
+
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 === 353 /* NotEmittedStatement */ || kind === 357 /* EndOfDeclarationMarker */ || kind === 356 /* MergeDeclarationMarker */;
|
|
10449
10437
|
}
|
|
10450
10438
|
function isDeclaration(node) {
|
|
10451
10439
|
if (node.kind === 165 /* TypeParameter */) {
|
|
@@ -10891,7 +10879,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
10891
10879
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
10892
10880
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
10893
10881
|
}
|
|
10894
|
-
if (node.kind ===
|
|
10882
|
+
if (node.kind === 352 /* SyntaxList */ && node._children.length > 0) {
|
|
10895
10883
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
10896
10884
|
}
|
|
10897
10885
|
return skipTrivia(
|
|
@@ -12952,7 +12940,7 @@ function getOperator(expression) {
|
|
|
12952
12940
|
}
|
|
12953
12941
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
12954
12942
|
switch (nodeKind) {
|
|
12955
|
-
case
|
|
12943
|
+
case 355 /* CommaListExpression */:
|
|
12956
12944
|
return 0 /* Comma */;
|
|
12957
12945
|
case 227 /* SpreadElement */:
|
|
12958
12946
|
return 1 /* Spread */;
|
|
@@ -14374,7 +14362,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
|
|
|
14374
14362
|
case 209 /* ElementAccessExpression */:
|
|
14375
14363
|
case 208 /* PropertyAccessExpression */:
|
|
14376
14364
|
case 232 /* NonNullExpression */:
|
|
14377
|
-
case
|
|
14365
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
14378
14366
|
case 235 /* SatisfiesExpression */:
|
|
14379
14367
|
node = node.expression;
|
|
14380
14368
|
continue;
|
|
@@ -15499,7 +15487,7 @@ function getContainingNodeArray(node) {
|
|
|
15499
15487
|
return parent.types;
|
|
15500
15488
|
case 186 /* TupleType */:
|
|
15501
15489
|
case 206 /* ArrayLiteralExpression */:
|
|
15502
|
-
case
|
|
15490
|
+
case 355 /* CommaListExpression */:
|
|
15503
15491
|
case 272 /* NamedImports */:
|
|
15504
15492
|
case 276 /* NamedExports */:
|
|
15505
15493
|
return parent.elements;
|
|
@@ -15651,6 +15639,15 @@ function canUsePropertyAccess(name, languageVersion) {
|
|
|
15651
15639
|
const firstChar = name.charCodeAt(0);
|
|
15652
15640
|
return firstChar === 35 /* hash */ ? name.length > 1 && isIdentifierStart(name.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion);
|
|
15653
15641
|
}
|
|
15642
|
+
function isJSDocSatisfiesExpression(node) {
|
|
15643
|
+
return isInJSFile(node) && isParenthesizedExpression(node) && !!getJSDocSatisfiesTag(node);
|
|
15644
|
+
}
|
|
15645
|
+
function getJSDocSatisfiesExpressionType(node) {
|
|
15646
|
+
const tag = getJSDocSatisfiesTag(node);
|
|
15647
|
+
const type = tag && tag.typeExpression && tag.typeExpression.type;
|
|
15648
|
+
Debug.assertIsDefined(type);
|
|
15649
|
+
return type;
|
|
15650
|
+
}
|
|
15654
15651
|
|
|
15655
15652
|
// src/compiler/factory/baseNodeFactory.ts
|
|
15656
15653
|
function createBaseNodeFactory() {
|
|
@@ -16595,6 +16592,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16595
16592
|
get updateJSDocDeprecatedTag() {
|
|
16596
16593
|
return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */);
|
|
16597
16594
|
},
|
|
16595
|
+
get createJSDocSatisfiesTag() {
|
|
16596
|
+
return getJSDocTypeLikeTagCreateFunction(351 /* JSDocSatisfiesTag */);
|
|
16597
|
+
},
|
|
16598
|
+
get updateJSDocSatisfiesTag() {
|
|
16599
|
+
return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocSatisfiesTag */);
|
|
16600
|
+
},
|
|
16598
16601
|
createJSDocUnknownTag,
|
|
16599
16602
|
updateJSDocUnknownTag,
|
|
16600
16603
|
createJSDocText,
|
|
@@ -19544,18 +19547,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19544
19547
|
return node;
|
|
19545
19548
|
}
|
|
19546
19549
|
function createSyntaxList(children) {
|
|
19547
|
-
const node = createBaseNode(
|
|
19550
|
+
const node = createBaseNode(352 /* SyntaxList */);
|
|
19548
19551
|
node._children = children;
|
|
19549
19552
|
return node;
|
|
19550
19553
|
}
|
|
19551
19554
|
function createNotEmittedStatement(original) {
|
|
19552
|
-
const node = createBaseNode(
|
|
19555
|
+
const node = createBaseNode(353 /* NotEmittedStatement */);
|
|
19553
19556
|
node.original = original;
|
|
19554
19557
|
setTextRange(node, original);
|
|
19555
19558
|
return node;
|
|
19556
19559
|
}
|
|
19557
19560
|
function createPartiallyEmittedExpression(expression, original) {
|
|
19558
|
-
const node = createBaseNode(
|
|
19561
|
+
const node = createBaseNode(354 /* PartiallyEmittedExpression */);
|
|
19559
19562
|
node.expression = expression;
|
|
19560
19563
|
node.original = original;
|
|
19561
19564
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -19577,7 +19580,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19577
19580
|
return node;
|
|
19578
19581
|
}
|
|
19579
19582
|
function createCommaListExpression(elements) {
|
|
19580
|
-
const node = createBaseNode(
|
|
19583
|
+
const node = createBaseNode(355 /* CommaListExpression */);
|
|
19581
19584
|
node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
|
|
19582
19585
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
19583
19586
|
return node;
|
|
@@ -19586,19 +19589,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19586
19589
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
19587
19590
|
}
|
|
19588
19591
|
function createEndOfDeclarationMarker(original) {
|
|
19589
|
-
const node = createBaseNode(
|
|
19592
|
+
const node = createBaseNode(357 /* EndOfDeclarationMarker */);
|
|
19590
19593
|
node.emitNode = {};
|
|
19591
19594
|
node.original = original;
|
|
19592
19595
|
return node;
|
|
19593
19596
|
}
|
|
19594
19597
|
function createMergeDeclarationMarker(original) {
|
|
19595
|
-
const node = createBaseNode(
|
|
19598
|
+
const node = createBaseNode(356 /* MergeDeclarationMarker */);
|
|
19596
19599
|
node.emitNode = {};
|
|
19597
19600
|
node.original = original;
|
|
19598
19601
|
return node;
|
|
19599
19602
|
}
|
|
19600
19603
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
19601
|
-
const node = createBaseNode(
|
|
19604
|
+
const node = createBaseNode(358 /* SyntheticReferenceExpression */);
|
|
19602
19605
|
node.expression = expression;
|
|
19603
19606
|
node.thisArg = thisArg;
|
|
19604
19607
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -19746,7 +19749,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19746
19749
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
19747
19750
|
case 232 /* NonNullExpression */:
|
|
19748
19751
|
return updateNonNullExpression(outerExpression, expression);
|
|
19749
|
-
case
|
|
19752
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
19750
19753
|
return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
19751
19754
|
}
|
|
19752
19755
|
}
|
|
@@ -20237,7 +20240,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
|
|
|
20237
20240
|
case 213 /* TypeAssertionExpression */:
|
|
20238
20241
|
case 235 /* SatisfiesExpression */:
|
|
20239
20242
|
case 231 /* AsExpression */:
|
|
20240
|
-
case
|
|
20243
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
20241
20244
|
case 214 /* ParenthesizedExpression */:
|
|
20242
20245
|
case 106 /* SuperKeyword */:
|
|
20243
20246
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -21689,10 +21692,10 @@ function isMetaProperty(node) {
|
|
|
21689
21692
|
return node.kind === 233 /* MetaProperty */;
|
|
21690
21693
|
}
|
|
21691
21694
|
function isPartiallyEmittedExpression(node) {
|
|
21692
|
-
return node.kind ===
|
|
21695
|
+
return node.kind === 354 /* PartiallyEmittedExpression */;
|
|
21693
21696
|
}
|
|
21694
21697
|
function isCommaListExpression(node) {
|
|
21695
|
-
return node.kind ===
|
|
21698
|
+
return node.kind === 355 /* CommaListExpression */;
|
|
21696
21699
|
}
|
|
21697
21700
|
function isTemplateSpan(node) {
|
|
21698
21701
|
return node.kind === 236 /* TemplateSpan */;
|
|
@@ -21815,10 +21818,10 @@ function isExportSpecifier(node) {
|
|
|
21815
21818
|
return node.kind === 278 /* ExportSpecifier */;
|
|
21816
21819
|
}
|
|
21817
21820
|
function isNotEmittedStatement(node) {
|
|
21818
|
-
return node.kind ===
|
|
21821
|
+
return node.kind === 353 /* NotEmittedStatement */;
|
|
21819
21822
|
}
|
|
21820
21823
|
function isSyntheticReference(node) {
|
|
21821
|
-
return node.kind ===
|
|
21824
|
+
return node.kind === 358 /* SyntheticReferenceExpression */;
|
|
21822
21825
|
}
|
|
21823
21826
|
function isExternalModuleReference(node) {
|
|
21824
21827
|
return node.kind === 280 /* ExternalModuleReference */;
|
|
@@ -21979,6 +21982,9 @@ function isJSDocTypedefTag(node) {
|
|
|
21979
21982
|
function isJSDocImplementsTag(node) {
|
|
21980
21983
|
return node.kind === 332 /* JSDocImplementsTag */;
|
|
21981
21984
|
}
|
|
21985
|
+
function isJSDocSatisfiesTag(node) {
|
|
21986
|
+
return node.kind === 351 /* JSDocSatisfiesTag */;
|
|
21987
|
+
}
|
|
21982
21988
|
|
|
21983
21989
|
// src/compiler/factory/utilities.ts
|
|
21984
21990
|
function createEmptyExports(factory2) {
|
|
@@ -22274,7 +22280,7 @@ function startsWithUseStrict(statements) {
|
|
|
22274
22280
|
return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
|
|
22275
22281
|
}
|
|
22276
22282
|
function isCommaSequence(node) {
|
|
22277
|
-
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind ===
|
|
22283
|
+
return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 355 /* CommaListExpression */;
|
|
22278
22284
|
}
|
|
22279
22285
|
function isJSDocTypeAssertion(node) {
|
|
22280
22286
|
return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
|
|
@@ -22297,7 +22303,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
22297
22303
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
22298
22304
|
case 232 /* NonNullExpression */:
|
|
22299
22305
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
22300
|
-
case
|
|
22306
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
22301
22307
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
22302
22308
|
}
|
|
22303
22309
|
return false;
|
|
@@ -23224,7 +23230,7 @@ var forEachChildTable = {
|
|
|
23224
23230
|
[279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
23225
23231
|
return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
|
|
23226
23232
|
},
|
|
23227
|
-
[
|
|
23233
|
+
[355 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
23228
23234
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
23229
23235
|
},
|
|
23230
23236
|
[281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -23292,10 +23298,11 @@ var forEachChildTable = {
|
|
|
23292
23298
|
[341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) {
|
|
23293
23299
|
return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
23294
23300
|
},
|
|
23295
|
-
[344 /* JSDocReturnTag */]:
|
|
23296
|
-
[346 /* JSDocTypeTag */]:
|
|
23297
|
-
[345 /* JSDocThisTag */]:
|
|
23298
|
-
[342 /* JSDocEnumTag */]:
|
|
23301
|
+
[344 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag,
|
|
23302
|
+
[346 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
|
|
23303
|
+
[345 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
|
|
23304
|
+
[342 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
|
|
23305
|
+
[351 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag,
|
|
23299
23306
|
[326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
|
|
23300
23307
|
return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);
|
|
23301
23308
|
},
|
|
@@ -23313,7 +23320,7 @@ var forEachChildTable = {
|
|
|
23313
23320
|
[339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
23314
23321
|
[334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
23315
23322
|
[340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
23316
|
-
[
|
|
23323
|
+
[354 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
23317
23324
|
};
|
|
23318
23325
|
function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
|
|
23319
23326
|
return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -23354,7 +23361,7 @@ function forEachChildInOptionalRestOrJSDocParameterModifier(node, cbNode, _cbNod
|
|
|
23354
23361
|
function forEachChildInJSDocParameterOrPropertyTag(node, cbNode, cbNodes) {
|
|
23355
23362
|
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));
|
|
23356
23363
|
}
|
|
23357
|
-
function
|
|
23364
|
+
function forEachChildInJSDocTypeLikeTag(node, cbNode, cbNodes) {
|
|
23358
23365
|
return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
23359
23366
|
}
|
|
23360
23367
|
function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {
|
|
@@ -28634,6 +28641,9 @@ var Parser;
|
|
|
28634
28641
|
case "callback":
|
|
28635
28642
|
tag = parseCallbackTag(start2, tagName, margin, indentText);
|
|
28636
28643
|
break;
|
|
28644
|
+
case "satisfies":
|
|
28645
|
+
tag = parseSatisfiesTag(start2, tagName, margin, indentText);
|
|
28646
|
+
break;
|
|
28637
28647
|
case "see":
|
|
28638
28648
|
tag = parseSeeTag(start2, tagName, margin, indentText);
|
|
28639
28649
|
break;
|
|
@@ -28927,6 +28937,14 @@ var Parser;
|
|
|
28927
28937
|
const className = parseExpressionWithTypeArgumentsForAugments();
|
|
28928
28938
|
return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
|
|
28929
28939
|
}
|
|
28940
|
+
function parseSatisfiesTag(start2, tagName, margin, indentText) {
|
|
28941
|
+
if (some(tags, isJSDocSatisfiesTag)) {
|
|
28942
|
+
parseErrorAt(tagName.pos, scanner.getTokenPos(), Diagnostics._0_tag_already_specified, tagName.escapedText);
|
|
28943
|
+
}
|
|
28944
|
+
const typeExpression = parseJSDocTypeExpression(true);
|
|
28945
|
+
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
28946
|
+
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
|
|
28947
|
+
}
|
|
28930
28948
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
28931
28949
|
const usedBrace = parseOptional(18 /* OpenBraceToken */);
|
|
28932
28950
|
const pos = getNodePos();
|
|
@@ -37839,7 +37857,7 @@ function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory,
|
|
|
37839
37857
|
if (!shortest) {
|
|
37840
37858
|
return void 0;
|
|
37841
37859
|
}
|
|
37842
|
-
return getEmitModuleResolutionKind(compilerOptions) ===
|
|
37860
|
+
return getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */ ? removeFileExtension(shortest) : removeExtensionAndIndexPostFix(shortest, ending, compilerOptions);
|
|
37843
37861
|
}
|
|
37844
37862
|
function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileName, sourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
37845
37863
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -55363,11 +55381,7 @@ function createTypeChecker(host) {
|
|
|
55363
55381
|
}
|
|
55364
55382
|
if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) {
|
|
55365
55383
|
if (source.aliasTypeArguments) {
|
|
55366
|
-
|
|
55367
|
-
const minParams = getMinTypeArgumentCount(params);
|
|
55368
|
-
const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, minParams, false);
|
|
55369
|
-
const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, minParams, false);
|
|
55370
|
-
inferFromTypeArguments(sourceTypes, targetTypes, getAliasVariances(source.aliasSymbol));
|
|
55384
|
+
inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments, getAliasVariances(source.aliasSymbol));
|
|
55371
55385
|
}
|
|
55372
55386
|
return;
|
|
55373
55387
|
}
|
|
@@ -59000,6 +59014,9 @@ function createTypeChecker(host) {
|
|
|
59000
59014
|
Debug.assert(parent.parent.kind === 225 /* TemplateExpression */);
|
|
59001
59015
|
return getContextualTypeForSubstitutionExpression(parent.parent, node);
|
|
59002
59016
|
case 214 /* ParenthesizedExpression */: {
|
|
59017
|
+
if (isJSDocSatisfiesExpression(parent)) {
|
|
59018
|
+
return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent));
|
|
59019
|
+
}
|
|
59003
59020
|
const tag = isInJSFile(parent) ? getJSDocTypeTag(parent) : void 0;
|
|
59004
59021
|
return !tag ? getContextualType(parent, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(tag.typeExpression.type);
|
|
59005
59022
|
}
|
|
@@ -62719,12 +62736,15 @@ function createTypeChecker(host) {
|
|
|
62719
62736
|
}
|
|
62720
62737
|
function checkSatisfiesExpression(node) {
|
|
62721
62738
|
checkSourceElement(node.type);
|
|
62722
|
-
|
|
62723
|
-
|
|
62739
|
+
return checkSatisfiesExpressionWorker(node.expression, node.type);
|
|
62740
|
+
}
|
|
62741
|
+
function checkSatisfiesExpressionWorker(expression, target, checkMode) {
|
|
62742
|
+
const exprType = checkExpression(expression, checkMode);
|
|
62743
|
+
const targetType = getTypeFromTypeNode(target);
|
|
62724
62744
|
if (isErrorType(targetType)) {
|
|
62725
62745
|
return targetType;
|
|
62726
62746
|
}
|
|
62727
|
-
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType,
|
|
62747
|
+
checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, target, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1);
|
|
62728
62748
|
return exprType;
|
|
62729
62749
|
}
|
|
62730
62750
|
function checkMetaProperty(node) {
|
|
@@ -64838,9 +64858,14 @@ function createTypeChecker(host) {
|
|
|
64838
64858
|
}
|
|
64839
64859
|
}
|
|
64840
64860
|
function checkParenthesizedExpression(node, checkMode) {
|
|
64841
|
-
if (hasJSDocNodes(node)
|
|
64842
|
-
|
|
64843
|
-
|
|
64861
|
+
if (hasJSDocNodes(node)) {
|
|
64862
|
+
if (isJSDocSatisfiesExpression(node)) {
|
|
64863
|
+
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
64864
|
+
}
|
|
64865
|
+
if (isJSDocTypeAssertion(node)) {
|
|
64866
|
+
const type = getJSDocTypeAssertionType(node);
|
|
64867
|
+
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
64868
|
+
}
|
|
64844
64869
|
}
|
|
64845
64870
|
return checkExpression(node.expression, checkMode);
|
|
64846
64871
|
}
|
|
@@ -66468,6 +66493,9 @@ function createTypeChecker(host) {
|
|
|
66468
66493
|
function checkJSDocTypeTag(node) {
|
|
66469
66494
|
checkSourceElement(node.typeExpression);
|
|
66470
66495
|
}
|
|
66496
|
+
function checkJSDocSatisfiesTag(node) {
|
|
66497
|
+
checkSourceElement(node.typeExpression);
|
|
66498
|
+
}
|
|
66471
66499
|
function checkJSDocLinkLikeTag(node) {
|
|
66472
66500
|
if (node.name) {
|
|
66473
66501
|
resolveJSDocMemberName(node.name, true);
|
|
@@ -67985,7 +68013,6 @@ function createTypeChecker(host) {
|
|
|
67985
68013
|
let firstDefaultClause;
|
|
67986
68014
|
let hasDuplicateDefaultClause = false;
|
|
67987
68015
|
const expressionType = checkExpression(node.expression);
|
|
67988
|
-
const expressionIsLiteral = isLiteralType(expressionType);
|
|
67989
68016
|
forEach(node.caseBlock.clauses, (clause) => {
|
|
67990
68017
|
if (clause.kind === 293 /* DefaultClause */ && !hasDuplicateDefaultClause) {
|
|
67991
68018
|
if (firstDefaultClause === void 0) {
|
|
@@ -68004,15 +68031,9 @@ function createTypeChecker(host) {
|
|
|
68004
68031
|
}
|
|
68005
68032
|
function createLazyCaseClauseDiagnostics(clause2) {
|
|
68006
68033
|
return () => {
|
|
68007
|
-
|
|
68008
|
-
|
|
68009
|
-
|
|
68010
|
-
if (!caseIsLiteral || !expressionIsLiteral) {
|
|
68011
|
-
caseType = caseIsLiteral ? getBaseTypeOfLiteralType(caseType) : caseType;
|
|
68012
|
-
comparedExpressionType = getBaseTypeOfLiteralType(expressionType);
|
|
68013
|
-
}
|
|
68014
|
-
if (!isTypeEqualityComparableTo(comparedExpressionType, caseType)) {
|
|
68015
|
-
checkTypeComparableTo(caseType, comparedExpressionType, clause2.expression, void 0);
|
|
68034
|
+
const caseType = checkExpression(clause2.expression);
|
|
68035
|
+
if (!isTypeEqualityComparableTo(expressionType, caseType)) {
|
|
68036
|
+
checkTypeComparableTo(caseType, expressionType, clause2.expression, void 0);
|
|
68016
68037
|
}
|
|
68017
68038
|
};
|
|
68018
68039
|
}
|
|
@@ -69810,6 +69831,8 @@ function createTypeChecker(host) {
|
|
|
69810
69831
|
case 338 /* JSDocProtectedTag */:
|
|
69811
69832
|
case 337 /* JSDocPrivateTag */:
|
|
69812
69833
|
return checkJSDocAccessibilityModifiers(node);
|
|
69834
|
+
case 351 /* JSDocSatisfiesTag */:
|
|
69835
|
+
return checkJSDocSatisfiesTag(node);
|
|
69813
69836
|
case 196 /* IndexedAccessType */:
|
|
69814
69837
|
return checkIndexedAccessType(node);
|
|
69815
69838
|
case 197 /* MappedType */:
|
|
@@ -74213,13 +74236,13 @@ var visitEachChildTable = {
|
|
|
74213
74236
|
visitLexicalEnvironment(node.statements, visitor, context)
|
|
74214
74237
|
);
|
|
74215
74238
|
},
|
|
74216
|
-
[
|
|
74239
|
+
[354 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
74217
74240
|
return context.factory.updatePartiallyEmittedExpression(
|
|
74218
74241
|
node,
|
|
74219
74242
|
nodeVisitor(node.expression, visitor, isExpression)
|
|
74220
74243
|
);
|
|
74221
74244
|
},
|
|
74222
|
-
[
|
|
74245
|
+
[355 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
74223
74246
|
return context.factory.updateCommaListExpression(
|
|
74224
74247
|
node,
|
|
74225
74248
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -80118,7 +80141,7 @@ function transformES2018(context) {
|
|
|
80118
80141
|
return visitObjectLiteralExpression(node);
|
|
80119
80142
|
case 223 /* BinaryExpression */:
|
|
80120
80143
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
80121
|
-
case
|
|
80144
|
+
case 355 /* CommaListExpression */:
|
|
80122
80145
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
80123
80146
|
case 295 /* CatchClause */:
|
|
80124
80147
|
return visitCatchClause(node);
|
|
@@ -82314,7 +82337,7 @@ function transformES2015(context) {
|
|
|
82314
82337
|
return visitParenthesizedExpression(node, expressionResultIsUnused2);
|
|
82315
82338
|
case 223 /* BinaryExpression */:
|
|
82316
82339
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
82317
|
-
case
|
|
82340
|
+
case 355 /* CommaListExpression */:
|
|
82318
82341
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
82319
82342
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
82320
82343
|
case 15 /* TemplateHead */:
|
|
@@ -85009,7 +85032,7 @@ function transformGenerators(context) {
|
|
|
85009
85032
|
switch (node.kind) {
|
|
85010
85033
|
case 223 /* BinaryExpression */:
|
|
85011
85034
|
return visitBinaryExpression(node);
|
|
85012
|
-
case
|
|
85035
|
+
case 355 /* CommaListExpression */:
|
|
85013
85036
|
return visitCommaListExpression(node);
|
|
85014
85037
|
case 224 /* ConditionalExpression */:
|
|
85015
85038
|
return visitConditionalExpression(node);
|
|
@@ -87094,9 +87117,9 @@ function transformModule(context) {
|
|
|
87094
87117
|
return visitFunctionDeclaration(node);
|
|
87095
87118
|
case 260 /* ClassDeclaration */:
|
|
87096
87119
|
return visitClassDeclaration(node);
|
|
87097
|
-
case
|
|
87120
|
+
case 356 /* MergeDeclarationMarker */:
|
|
87098
87121
|
return visitMergeDeclarationMarker(node);
|
|
87099
|
-
case
|
|
87122
|
+
case 357 /* EndOfDeclarationMarker */:
|
|
87100
87123
|
return visitEndOfDeclarationMarker(node);
|
|
87101
87124
|
default:
|
|
87102
87125
|
return visitor(node);
|
|
@@ -87113,7 +87136,7 @@ function transformModule(context) {
|
|
|
87113
87136
|
return visitExpressionStatement(node);
|
|
87114
87137
|
case 214 /* ParenthesizedExpression */:
|
|
87115
87138
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
87116
|
-
case
|
|
87139
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
87117
87140
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
87118
87141
|
case 210 /* CallExpression */:
|
|
87119
87142
|
if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
|
|
@@ -88888,9 +88911,9 @@ function transformSystemModule(context) {
|
|
|
88888
88911
|
return visitCatchClause(node);
|
|
88889
88912
|
case 238 /* Block */:
|
|
88890
88913
|
return visitBlock(node);
|
|
88891
|
-
case
|
|
88914
|
+
case 356 /* MergeDeclarationMarker */:
|
|
88892
88915
|
return visitMergeDeclarationMarker(node);
|
|
88893
|
-
case
|
|
88916
|
+
case 357 /* EndOfDeclarationMarker */:
|
|
88894
88917
|
return visitEndOfDeclarationMarker(node);
|
|
88895
88918
|
default:
|
|
88896
88919
|
return visitor(node);
|
|
@@ -89038,7 +89061,7 @@ function transformSystemModule(context) {
|
|
|
89038
89061
|
return visitExpressionStatement(node);
|
|
89039
89062
|
case 214 /* ParenthesizedExpression */:
|
|
89040
89063
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
89041
|
-
case
|
|
89064
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
89042
89065
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
89043
89066
|
case 223 /* BinaryExpression */:
|
|
89044
89067
|
if (isDestructuringAssignment(node)) {
|
|
@@ -91439,7 +91462,7 @@ function noEmitNotification(hint, node, callback) {
|
|
|
91439
91462
|
}
|
|
91440
91463
|
function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
91441
91464
|
var _a2, _b;
|
|
91442
|
-
const enabledSyntaxKindFeatures = new Array(
|
|
91465
|
+
const enabledSyntaxKindFeatures = new Array(359 /* Count */);
|
|
91443
91466
|
let lexicalEnvironmentVariableDeclarations;
|
|
91444
91467
|
let lexicalEnvironmentFunctionDeclarations;
|
|
91445
91468
|
let lexicalEnvironmentStatements;
|
|
@@ -93146,6 +93169,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
93146
93169
|
case 344 /* JSDocReturnTag */:
|
|
93147
93170
|
case 345 /* JSDocThisTag */:
|
|
93148
93171
|
case 346 /* JSDocTypeTag */:
|
|
93172
|
+
case 351 /* JSDocSatisfiesTag */:
|
|
93149
93173
|
return emitJSDocSimpleTypedTag(node);
|
|
93150
93174
|
case 347 /* JSDocTemplateTag */:
|
|
93151
93175
|
return emitJSDocTemplateTag(node);
|
|
@@ -93153,9 +93177,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
93153
93177
|
return emitJSDocTypedefTag(node);
|
|
93154
93178
|
case 349 /* JSDocSeeTag */:
|
|
93155
93179
|
return emitJSDocSeeTag(node);
|
|
93156
|
-
case
|
|
93157
|
-
case
|
|
93158
|
-
case
|
|
93180
|
+
case 353 /* NotEmittedStatement */:
|
|
93181
|
+
case 357 /* EndOfDeclarationMarker */:
|
|
93182
|
+
case 356 /* MergeDeclarationMarker */:
|
|
93159
93183
|
return;
|
|
93160
93184
|
}
|
|
93161
93185
|
if (isExpression(node)) {
|
|
@@ -93250,18 +93274,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
93250
93274
|
return emitJsxSelfClosingElement(node);
|
|
93251
93275
|
case 285 /* JsxFragment */:
|
|
93252
93276
|
return emitJsxFragment(node);
|
|
93253
|
-
case
|
|
93277
|
+
case 352 /* SyntaxList */:
|
|
93254
93278
|
return Debug.fail("SyntaxList should not be printed");
|
|
93255
|
-
case
|
|
93279
|
+
case 353 /* NotEmittedStatement */:
|
|
93256
93280
|
return;
|
|
93257
|
-
case
|
|
93281
|
+
case 354 /* PartiallyEmittedExpression */:
|
|
93258
93282
|
return emitPartiallyEmittedExpression(node);
|
|
93259
|
-
case
|
|
93283
|
+
case 355 /* CommaListExpression */:
|
|
93260
93284
|
return emitCommaList(node);
|
|
93261
|
-
case
|
|
93262
|
-
case
|
|
93285
|
+
case 356 /* MergeDeclarationMarker */:
|
|
93286
|
+
case 357 /* EndOfDeclarationMarker */:
|
|
93263
93287
|
return;
|
|
93264
|
-
case
|
|
93288
|
+
case 358 /* SyntheticReferenceExpression */:
|
|
93265
93289
|
return Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
93266
93290
|
}
|
|
93267
93291
|
}
|
|
@@ -96176,7 +96200,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
96176
96200
|
const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */;
|
|
96177
96201
|
if ((pos > 0 || end > 0) && pos !== end) {
|
|
96178
96202
|
if (!skipLeadingComments) {
|
|
96179
|
-
emitLeadingComments(pos, node.kind !==
|
|
96203
|
+
emitLeadingComments(pos, node.kind !== 353 /* NotEmittedStatement */);
|
|
96180
96204
|
}
|
|
96181
96205
|
if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
|
|
96182
96206
|
containerPos = pos;
|
|
@@ -96199,7 +96223,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
96199
96223
|
containerPos = savedContainerPos;
|
|
96200
96224
|
containerEnd = savedContainerEnd;
|
|
96201
96225
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
96202
|
-
if (!skipTrailingComments && node.kind !==
|
|
96226
|
+
if (!skipTrailingComments && node.kind !== 353 /* NotEmittedStatement */) {
|
|
96203
96227
|
emitTrailingComments(end);
|
|
96204
96228
|
}
|
|
96205
96229
|
}
|
|
@@ -96451,7 +96475,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
96451
96475
|
}
|
|
96452
96476
|
} else {
|
|
96453
96477
|
const source = sourceMapRange.source || sourceMapSource;
|
|
96454
|
-
if (node.kind !==
|
|
96478
|
+
if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
|
|
96455
96479
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
96456
96480
|
}
|
|
96457
96481
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
@@ -96466,7 +96490,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
96466
96490
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
96467
96491
|
sourceMapsDisabled = false;
|
|
96468
96492
|
}
|
|
96469
|
-
if (node.kind !==
|
|
96493
|
+
if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
|
|
96470
96494
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
96471
96495
|
}
|
|
96472
96496
|
}
|