@typescript-deploys/pr-build 5.4.0-pr-57230-11 → 5.4.0-pr-57207-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/lib.esnext.collection.d.ts +0 -46
- package/lib/tsc.js +143 -58
- package/lib/tsserver.js +182 -81
- package/lib/typescript.d.ts +19 -9
- package/lib/typescript.js +181 -81
- package/lib/typingsInstaller.js +71 -28
- package/package.json +2 -2
|
@@ -27,49 +27,3 @@ interface MapConstructor {
|
|
|
27
27
|
keySelector: (item: T, index: number) => K,
|
|
28
28
|
): Map<K, T[]>;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
interface SetLike<T> {
|
|
32
|
-
/**
|
|
33
|
-
* Despite its name, returns an iterable of the values in the set-like.
|
|
34
|
-
*/
|
|
35
|
-
keys(): Iterable<T>;
|
|
36
|
-
/**
|
|
37
|
-
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
|
|
38
|
-
*/
|
|
39
|
-
has(value: T): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* @returns the number of (unique) elements in the set-like.
|
|
42
|
-
*/
|
|
43
|
-
readonly size: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
interface Set<T> {
|
|
47
|
-
/**
|
|
48
|
-
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
49
|
-
*/
|
|
50
|
-
union(other: SetLike<T>): Set<T>;
|
|
51
|
-
/**
|
|
52
|
-
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
53
|
-
*/
|
|
54
|
-
intersection(other: SetLike<T>): Set<T>;
|
|
55
|
-
/**
|
|
56
|
-
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
57
|
-
*/
|
|
58
|
-
difference(other: SetLike<T>): Set<T>;
|
|
59
|
-
/**
|
|
60
|
-
* @returns a new Set containing all the elements in this Set which are in this or in the argument, but not in both.
|
|
61
|
-
*/
|
|
62
|
-
symmetricDifference(other: SetLike<T>): Set<T>;
|
|
63
|
-
/**
|
|
64
|
-
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
65
|
-
*/
|
|
66
|
-
isSubsetOf(other: SetLike<T>): Set<T>;
|
|
67
|
-
/**
|
|
68
|
-
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
69
|
-
*/
|
|
70
|
-
isSupersetOf(other: SetLike<T>): Set<T>;
|
|
71
|
-
/**
|
|
72
|
-
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
73
|
-
*/
|
|
74
|
-
isDisjointFrom(other: SetLike<T>): Set<T>;
|
|
75
|
-
}
|
package/lib/tsc.js
CHANGED
|
@@ -3356,12 +3356,13 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
3356
3356
|
SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 355] = "JSDocPropertyTag";
|
|
3357
3357
|
SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 356] = "JSDocThrowsTag";
|
|
3358
3358
|
SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag";
|
|
3359
|
-
SyntaxKind4[SyntaxKind4["
|
|
3360
|
-
SyntaxKind4[SyntaxKind4["
|
|
3361
|
-
SyntaxKind4[SyntaxKind4["
|
|
3362
|
-
SyntaxKind4[SyntaxKind4["
|
|
3363
|
-
SyntaxKind4[SyntaxKind4["
|
|
3364
|
-
SyntaxKind4[SyntaxKind4["
|
|
3359
|
+
SyntaxKind4[SyntaxKind4["JSDocImportTypeTag"] = 358] = "JSDocImportTypeTag";
|
|
3360
|
+
SyntaxKind4[SyntaxKind4["SyntaxList"] = 359] = "SyntaxList";
|
|
3361
|
+
SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 360] = "NotEmittedStatement";
|
|
3362
|
+
SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 361] = "PartiallyEmittedExpression";
|
|
3363
|
+
SyntaxKind4[SyntaxKind4["CommaListExpression"] = 362] = "CommaListExpression";
|
|
3364
|
+
SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression";
|
|
3365
|
+
SyntaxKind4[SyntaxKind4["Count"] = 364] = "Count";
|
|
3365
3366
|
SyntaxKind4[SyntaxKind4["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment";
|
|
3366
3367
|
SyntaxKind4[SyntaxKind4["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment";
|
|
3367
3368
|
SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment";
|
|
@@ -3390,9 +3391,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
3390
3391
|
SyntaxKind4[SyntaxKind4["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement";
|
|
3391
3392
|
SyntaxKind4[SyntaxKind4["FirstNode"] = 166 /* QualifiedName */] = "FirstNode";
|
|
3392
3393
|
SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode";
|
|
3393
|
-
SyntaxKind4[SyntaxKind4["LastJSDocNode"] =
|
|
3394
|
+
SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 358 /* JSDocImportTypeTag */] = "LastJSDocNode";
|
|
3394
3395
|
SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode";
|
|
3395
|
-
SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] =
|
|
3396
|
+
SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 358 /* JSDocImportTypeTag */] = "LastJSDocTagNode";
|
|
3396
3397
|
SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword";
|
|
3397
3398
|
SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword";
|
|
3398
3399
|
return SyntaxKind4;
|
|
@@ -11075,8 +11076,8 @@ function isExpressionKind(kind) {
|
|
|
11075
11076
|
case 230 /* SpreadElement */:
|
|
11076
11077
|
case 234 /* AsExpression */:
|
|
11077
11078
|
case 232 /* OmittedExpression */:
|
|
11078
|
-
case
|
|
11079
|
-
case
|
|
11079
|
+
case 362 /* CommaListExpression */:
|
|
11080
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
11080
11081
|
case 238 /* SatisfiesExpression */:
|
|
11081
11082
|
return true;
|
|
11082
11083
|
default:
|
|
@@ -11247,7 +11248,7 @@ function isDeclarationStatementKind(kind) {
|
|
|
11247
11248
|
return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */;
|
|
11248
11249
|
}
|
|
11249
11250
|
function isStatementKindButNotDeclarationKind(kind) {
|
|
11250
|
-
return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind ===
|
|
11251
|
+
return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 360 /* NotEmittedStatement */;
|
|
11251
11252
|
}
|
|
11252
11253
|
function isDeclaration(node) {
|
|
11253
11254
|
if (node.kind === 168 /* TypeParameter */) {
|
|
@@ -11308,10 +11309,10 @@ function isCaseOrDefaultClause(node) {
|
|
|
11308
11309
|
return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */;
|
|
11309
11310
|
}
|
|
11310
11311
|
function isJSDocNode(node) {
|
|
11311
|
-
return node.kind >= 316 /* FirstJSDocNode */ && node.kind <=
|
|
11312
|
+
return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 358 /* LastJSDocNode */;
|
|
11312
11313
|
}
|
|
11313
11314
|
function isJSDocTag(node) {
|
|
11314
|
-
return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <=
|
|
11315
|
+
return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 358 /* LastJSDocTagNode */;
|
|
11315
11316
|
}
|
|
11316
11317
|
function isSetAccessor(node) {
|
|
11317
11318
|
return node.kind === 178 /* SetAccessor */;
|
|
@@ -11752,7 +11753,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
11752
11753
|
if (includeJsDoc && hasJSDocNodes(node)) {
|
|
11753
11754
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
11754
11755
|
}
|
|
11755
|
-
if (node.kind ===
|
|
11756
|
+
if (node.kind === 359 /* SyntaxList */ && node._children.length > 0) {
|
|
11756
11757
|
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
|
|
11757
11758
|
}
|
|
11758
11759
|
return skipTrivia(
|
|
@@ -13706,6 +13707,7 @@ function tryGetModuleSpecifierFromDeclaration(node) {
|
|
|
13706
13707
|
))) == null ? void 0 : _a.arguments[0];
|
|
13707
13708
|
case 272 /* ImportDeclaration */:
|
|
13708
13709
|
case 278 /* ExportDeclaration */:
|
|
13710
|
+
case 358 /* JSDocImportTypeTag */:
|
|
13709
13711
|
return tryCast(node.moduleSpecifier, isStringLiteralLike);
|
|
13710
13712
|
case 271 /* ImportEqualsDeclaration */:
|
|
13711
13713
|
return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);
|
|
@@ -13727,6 +13729,7 @@ function getExternalModuleName(node) {
|
|
|
13727
13729
|
switch (node.kind) {
|
|
13728
13730
|
case 272 /* ImportDeclaration */:
|
|
13729
13731
|
case 278 /* ExportDeclaration */:
|
|
13732
|
+
case 358 /* JSDocImportTypeTag */:
|
|
13730
13733
|
return node.moduleSpecifier;
|
|
13731
13734
|
case 271 /* ImportEqualsDeclaration */:
|
|
13732
13735
|
return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0;
|
|
@@ -14538,7 +14541,7 @@ function getOperator(expression) {
|
|
|
14538
14541
|
}
|
|
14539
14542
|
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
|
|
14540
14543
|
switch (nodeKind) {
|
|
14541
|
-
case
|
|
14544
|
+
case 362 /* CommaListExpression */:
|
|
14542
14545
|
return 0 /* Comma */;
|
|
14543
14546
|
case 230 /* SpreadElement */:
|
|
14544
14547
|
return 1 /* Spread */;
|
|
@@ -16103,7 +16106,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
|
|
|
16103
16106
|
case 212 /* ElementAccessExpression */:
|
|
16104
16107
|
case 211 /* PropertyAccessExpression */:
|
|
16105
16108
|
case 235 /* NonNullExpression */:
|
|
16106
|
-
case
|
|
16109
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
16107
16110
|
case 238 /* SatisfiesExpression */:
|
|
16108
16111
|
node = node.expression;
|
|
16109
16112
|
continue;
|
|
@@ -17493,7 +17496,7 @@ function getContainingNodeArray(node) {
|
|
|
17493
17496
|
return parent.types;
|
|
17494
17497
|
case 189 /* TupleType */:
|
|
17495
17498
|
case 209 /* ArrayLiteralExpression */:
|
|
17496
|
-
case
|
|
17499
|
+
case 362 /* CommaListExpression */:
|
|
17497
17500
|
case 275 /* NamedImports */:
|
|
17498
17501
|
case 279 /* NamedExports */:
|
|
17499
17502
|
return parent.elements;
|
|
@@ -18678,6 +18681,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18678
18681
|
updateJSDocImplementsTag,
|
|
18679
18682
|
createJSDocSeeTag,
|
|
18680
18683
|
updateJSDocSeeTag,
|
|
18684
|
+
createJSDocImportTypeTag,
|
|
18685
|
+
updateJSDocImportTypeTag,
|
|
18681
18686
|
createJSDocNameReference,
|
|
18682
18687
|
updateJSDocNameReference,
|
|
18683
18688
|
createJSDocMemberName,
|
|
@@ -21456,6 +21461,16 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
21456
21461
|
function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {
|
|
21457
21462
|
return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node;
|
|
21458
21463
|
}
|
|
21464
|
+
function createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment) {
|
|
21465
|
+
const node = createBaseJSDocTag(358 /* JSDocImportTypeTag */, tagName ?? createIdentifier("importType"), comment);
|
|
21466
|
+
node.importClause = importClause;
|
|
21467
|
+
node.moduleSpecifier = moduleSpecifier;
|
|
21468
|
+
node.comment = comment;
|
|
21469
|
+
return node;
|
|
21470
|
+
}
|
|
21471
|
+
function updateJSDocImportTypeTag(node, tagName, importClause, moduleSpecifier, comment) {
|
|
21472
|
+
return node.tagName !== tagName || node.comment !== comment || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier ? update(createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment), node) : node;
|
|
21473
|
+
}
|
|
21459
21474
|
function createJSDocText(text) {
|
|
21460
21475
|
const node = createBaseNode(328 /* JSDocText */);
|
|
21461
21476
|
node.text = text;
|
|
@@ -21894,18 +21909,18 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
21894
21909
|
return node;
|
|
21895
21910
|
}
|
|
21896
21911
|
function createSyntaxList(children) {
|
|
21897
|
-
const node = createBaseNode(
|
|
21912
|
+
const node = createBaseNode(359 /* SyntaxList */);
|
|
21898
21913
|
node._children = children;
|
|
21899
21914
|
return node;
|
|
21900
21915
|
}
|
|
21901
21916
|
function createNotEmittedStatement(original) {
|
|
21902
|
-
const node = createBaseNode(
|
|
21917
|
+
const node = createBaseNode(360 /* NotEmittedStatement */);
|
|
21903
21918
|
node.original = original;
|
|
21904
21919
|
setTextRange(node, original);
|
|
21905
21920
|
return node;
|
|
21906
21921
|
}
|
|
21907
21922
|
function createPartiallyEmittedExpression(expression, original) {
|
|
21908
|
-
const node = createBaseNode(
|
|
21923
|
+
const node = createBaseNode(361 /* PartiallyEmittedExpression */);
|
|
21909
21924
|
node.expression = expression;
|
|
21910
21925
|
node.original = original;
|
|
21911
21926
|
node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
|
|
@@ -21927,7 +21942,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
21927
21942
|
return node;
|
|
21928
21943
|
}
|
|
21929
21944
|
function createCommaListExpression(elements) {
|
|
21930
|
-
const node = createBaseNode(
|
|
21945
|
+
const node = createBaseNode(362 /* CommaListExpression */);
|
|
21931
21946
|
node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
|
|
21932
21947
|
node.transformFlags |= propagateChildrenFlags(node.elements);
|
|
21933
21948
|
return node;
|
|
@@ -21936,7 +21951,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
21936
21951
|
return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
|
|
21937
21952
|
}
|
|
21938
21953
|
function createSyntheticReferenceExpression(expression, thisArg) {
|
|
21939
|
-
const node = createBaseNode(
|
|
21954
|
+
const node = createBaseNode(363 /* SyntheticReferenceExpression */);
|
|
21940
21955
|
node.expression = expression;
|
|
21941
21956
|
node.thisArg = thisArg;
|
|
21942
21957
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
|
|
@@ -22182,7 +22197,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
22182
22197
|
return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
|
|
22183
22198
|
case 235 /* NonNullExpression */:
|
|
22184
22199
|
return updateNonNullExpression(outerExpression, expression);
|
|
22185
|
-
case
|
|
22200
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
22186
22201
|
return updatePartiallyEmittedExpression(outerExpression, expression);
|
|
22187
22202
|
}
|
|
22188
22203
|
}
|
|
@@ -22592,6 +22607,8 @@ function getDefaultTagNameForKind(kind) {
|
|
|
22592
22607
|
return "augments";
|
|
22593
22608
|
case 336 /* JSDocImplementsTag */:
|
|
22594
22609
|
return "implements";
|
|
22610
|
+
case 358 /* JSDocImportTypeTag */:
|
|
22611
|
+
return "importType";
|
|
22595
22612
|
default:
|
|
22596
22613
|
return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`);
|
|
22597
22614
|
}
|
|
@@ -22732,7 +22749,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
|
|
|
22732
22749
|
case 216 /* TypeAssertionExpression */:
|
|
22733
22750
|
case 238 /* SatisfiesExpression */:
|
|
22734
22751
|
case 234 /* AsExpression */:
|
|
22735
|
-
case
|
|
22752
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
22736
22753
|
case 217 /* ParenthesizedExpression */:
|
|
22737
22754
|
case 108 /* SuperKeyword */:
|
|
22738
22755
|
return -2147483648 /* OuterExpressionExcludes */;
|
|
@@ -24636,10 +24653,10 @@ function isMetaProperty(node) {
|
|
|
24636
24653
|
return node.kind === 236 /* MetaProperty */;
|
|
24637
24654
|
}
|
|
24638
24655
|
function isPartiallyEmittedExpression(node) {
|
|
24639
|
-
return node.kind ===
|
|
24656
|
+
return node.kind === 361 /* PartiallyEmittedExpression */;
|
|
24640
24657
|
}
|
|
24641
24658
|
function isCommaListExpression(node) {
|
|
24642
|
-
return node.kind ===
|
|
24659
|
+
return node.kind === 362 /* CommaListExpression */;
|
|
24643
24660
|
}
|
|
24644
24661
|
function isTemplateSpan(node) {
|
|
24645
24662
|
return node.kind === 239 /* TemplateSpan */;
|
|
@@ -24762,10 +24779,10 @@ function isExportSpecifier(node) {
|
|
|
24762
24779
|
return node.kind === 281 /* ExportSpecifier */;
|
|
24763
24780
|
}
|
|
24764
24781
|
function isNotEmittedStatement(node) {
|
|
24765
|
-
return node.kind ===
|
|
24782
|
+
return node.kind === 360 /* NotEmittedStatement */;
|
|
24766
24783
|
}
|
|
24767
24784
|
function isSyntheticReference(node) {
|
|
24768
|
-
return node.kind ===
|
|
24785
|
+
return node.kind === 363 /* SyntheticReferenceExpression */;
|
|
24769
24786
|
}
|
|
24770
24787
|
function isExternalModuleReference(node) {
|
|
24771
24788
|
return node.kind === 283 /* ExternalModuleReference */;
|
|
@@ -24938,6 +24955,9 @@ function isJSDocImplementsTag(node) {
|
|
|
24938
24955
|
function isJSDocSatisfiesTag(node) {
|
|
24939
24956
|
return node.kind === 357 /* JSDocSatisfiesTag */;
|
|
24940
24957
|
}
|
|
24958
|
+
function isJSDocImportTypeTag(node) {
|
|
24959
|
+
return node.kind === 358 /* JSDocImportTypeTag */;
|
|
24960
|
+
}
|
|
24941
24961
|
|
|
24942
24962
|
// src/compiler/factory/utilities.ts
|
|
24943
24963
|
function createEmptyExports(factory2) {
|
|
@@ -25320,7 +25340,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
|
|
|
25320
25340
|
return (kinds & 2 /* TypeAssertions */) !== 0;
|
|
25321
25341
|
case 235 /* NonNullExpression */:
|
|
25322
25342
|
return (kinds & 4 /* NonNullAssertions */) !== 0;
|
|
25323
|
-
case
|
|
25343
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
25324
25344
|
return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
|
|
25325
25345
|
}
|
|
25326
25346
|
return false;
|
|
@@ -26396,7 +26416,7 @@ var forEachChildTable = {
|
|
|
26396
26416
|
[282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
|
|
26397
26417
|
return visitNodes(cbNode, cbNodes, node.modifiers);
|
|
26398
26418
|
},
|
|
26399
|
-
[
|
|
26419
|
+
[362 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
|
|
26400
26420
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
26401
26421
|
},
|
|
26402
26422
|
[284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
|
|
@@ -26491,7 +26511,8 @@ var forEachChildTable = {
|
|
|
26491
26511
|
[343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
|
|
26492
26512
|
[338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
|
|
26493
26513
|
[344 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
|
|
26494
|
-
[
|
|
26514
|
+
[358 /* JSDocImportTypeTag */]: forEachChildInJSDocImportTypeTag,
|
|
26515
|
+
[361 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
26495
26516
|
};
|
|
26496
26517
|
function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
|
|
26497
26518
|
return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
|
|
@@ -26542,6 +26563,9 @@ function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {
|
|
|
26542
26563
|
function forEachChildInJSDocTag(node, cbNode, cbNodes) {
|
|
26543
26564
|
return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
26544
26565
|
}
|
|
26566
|
+
function forEachChildInJSDocImportTypeTag(node, cbNode, cbNodes) {
|
|
26567
|
+
return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
|
|
26568
|
+
}
|
|
26545
26569
|
function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) {
|
|
26546
26570
|
return visitNode2(cbNode, node.expression);
|
|
26547
26571
|
}
|
|
@@ -32777,6 +32801,9 @@ var Parser;
|
|
|
32777
32801
|
case "throws":
|
|
32778
32802
|
tag = parseThrowsTag(start2, tagName, margin, indentText);
|
|
32779
32803
|
break;
|
|
32804
|
+
case "importType":
|
|
32805
|
+
tag = parseImportTypeTag(start2, tagName, margin, indentText);
|
|
32806
|
+
break;
|
|
32780
32807
|
default:
|
|
32781
32808
|
tag = parseUnknownTag(start2, tagName, margin, indentText);
|
|
32782
32809
|
break;
|
|
@@ -33096,6 +33123,27 @@ var Parser;
|
|
|
33096
33123
|
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
33097
33124
|
return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
|
|
33098
33125
|
}
|
|
33126
|
+
function parseImportTypeTag(start2, tagName, margin, indentText) {
|
|
33127
|
+
const afterImportTypeTagPos = scanner.getTokenFullStart();
|
|
33128
|
+
let identifier;
|
|
33129
|
+
if (isIdentifier2()) {
|
|
33130
|
+
identifier = parseIdentifier();
|
|
33131
|
+
}
|
|
33132
|
+
let importClause;
|
|
33133
|
+
if (identifier || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */) {
|
|
33134
|
+
importClause = parseImportClause(
|
|
33135
|
+
identifier,
|
|
33136
|
+
afterImportTypeTagPos,
|
|
33137
|
+
/*isTypeOnly*/
|
|
33138
|
+
true
|
|
33139
|
+
);
|
|
33140
|
+
parseExpected(161 /* FromKeyword */);
|
|
33141
|
+
}
|
|
33142
|
+
Debug.assert(importClause);
|
|
33143
|
+
const moduleSpecifier = parseModuleSpecifier();
|
|
33144
|
+
const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
|
|
33145
|
+
return finishNode(factory2.createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comments2), start2);
|
|
33146
|
+
}
|
|
33099
33147
|
function parseExpressionWithTypeArgumentsForAugments() {
|
|
33100
33148
|
const usedBrace = parseOptional(19 /* OpenBraceToken */);
|
|
33101
33149
|
const pos = getNodePos();
|
|
@@ -46921,7 +46969,7 @@ function createTypeChecker(host) {
|
|
|
46921
46969
|
return ambientModule;
|
|
46922
46970
|
}
|
|
46923
46971
|
const currentSourceFile = getSourceFileOfNode(location);
|
|
46924
|
-
const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isVariableDeclaration(location) && location.initializer && isRequireCall(
|
|
46972
|
+
const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isInJSFile(location) && isJSDocImportTypeTag(location) ? location.moduleSpecifier : void 0) || (isVariableDeclaration(location) && location.initializer && isRequireCall(
|
|
46925
46973
|
location.initializer,
|
|
46926
46974
|
/*requireStringLiteralLikeArgument*/
|
|
46927
46975
|
true
|
|
@@ -51222,6 +51270,7 @@ function createTypeChecker(host) {
|
|
|
51222
51270
|
case 273 /* ImportClause */: {
|
|
51223
51271
|
const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
51224
51272
|
const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier;
|
|
51273
|
+
const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;
|
|
51225
51274
|
addResult(
|
|
51226
51275
|
factory.createImportDeclaration(
|
|
51227
51276
|
/*modifiers*/
|
|
@@ -51234,7 +51283,7 @@ function createTypeChecker(host) {
|
|
|
51234
51283
|
void 0
|
|
51235
51284
|
),
|
|
51236
51285
|
specifier2,
|
|
51237
|
-
|
|
51286
|
+
attributes
|
|
51238
51287
|
),
|
|
51239
51288
|
0 /* None */
|
|
51240
51289
|
);
|
|
@@ -51243,6 +51292,7 @@ function createTypeChecker(host) {
|
|
|
51243
51292
|
case 274 /* NamespaceImport */: {
|
|
51244
51293
|
const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
51245
51294
|
const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier;
|
|
51295
|
+
const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;
|
|
51246
51296
|
addResult(
|
|
51247
51297
|
factory.createImportDeclaration(
|
|
51248
51298
|
/*modifiers*/
|
|
@@ -51255,7 +51305,7 @@ function createTypeChecker(host) {
|
|
|
51255
51305
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
51256
51306
|
),
|
|
51257
51307
|
specifier2,
|
|
51258
|
-
|
|
51308
|
+
attributes
|
|
51259
51309
|
),
|
|
51260
51310
|
0 /* None */
|
|
51261
51311
|
);
|
|
@@ -51277,6 +51327,7 @@ function createTypeChecker(host) {
|
|
|
51277
51327
|
case 276 /* ImportSpecifier */: {
|
|
51278
51328
|
const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
|
|
51279
51329
|
const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier;
|
|
51330
|
+
const attributes = isImportDeclaration(node.parent.parent.parent) ? node.parent.parent.parent.attributes : void 0;
|
|
51280
51331
|
addResult(
|
|
51281
51332
|
factory.createImportDeclaration(
|
|
51282
51333
|
/*modifiers*/
|
|
@@ -51296,7 +51347,7 @@ function createTypeChecker(host) {
|
|
|
51296
51347
|
])
|
|
51297
51348
|
),
|
|
51298
51349
|
specifier2,
|
|
51299
|
-
|
|
51350
|
+
attributes
|
|
51300
51351
|
),
|
|
51301
51352
|
0 /* None */
|
|
51302
51353
|
);
|
|
@@ -82557,7 +82608,7 @@ function createTypeChecker(host) {
|
|
|
82557
82608
|
return void 0;
|
|
82558
82609
|
case 11 /* StringLiteral */:
|
|
82559
82610
|
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
82560
|
-
if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(
|
|
82611
|
+
if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || isInJSFile(node) && isJSDocImportTypeTag(node.parent) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(
|
|
82561
82612
|
node.parent,
|
|
82562
82613
|
/*requireStringLiteralLikeArgument*/
|
|
82563
82614
|
false
|
|
@@ -86792,13 +86843,13 @@ var visitEachChildTable = {
|
|
|
86792
86843
|
);
|
|
86793
86844
|
},
|
|
86794
86845
|
// Transformation nodes
|
|
86795
|
-
[
|
|
86846
|
+
[361 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
86796
86847
|
return context.factory.updatePartiallyEmittedExpression(
|
|
86797
86848
|
node,
|
|
86798
86849
|
Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
|
|
86799
86850
|
);
|
|
86800
86851
|
},
|
|
86801
|
-
[
|
|
86852
|
+
[362 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
86802
86853
|
return context.factory.updateCommaListExpression(
|
|
86803
86854
|
node,
|
|
86804
86855
|
nodesVisitor(node.elements, visitor, isExpression)
|
|
@@ -90451,7 +90502,7 @@ function transformClassFields(context) {
|
|
|
90451
90502
|
/*discarded*/
|
|
90452
90503
|
true
|
|
90453
90504
|
);
|
|
90454
|
-
case
|
|
90505
|
+
case 362 /* CommaListExpression */:
|
|
90455
90506
|
return visitCommaListExpression(
|
|
90456
90507
|
node,
|
|
90457
90508
|
/*discarded*/
|
|
@@ -93544,7 +93595,7 @@ function transformESDecorators(context) {
|
|
|
93544
93595
|
return visitForStatement(node);
|
|
93545
93596
|
case 244 /* ExpressionStatement */:
|
|
93546
93597
|
return visitExpressionStatement(node);
|
|
93547
|
-
case
|
|
93598
|
+
case 362 /* CommaListExpression */:
|
|
93548
93599
|
return visitCommaListExpression(
|
|
93549
93600
|
node,
|
|
93550
93601
|
/*discarded*/
|
|
@@ -93556,7 +93607,7 @@ function transformESDecorators(context) {
|
|
|
93556
93607
|
/*discarded*/
|
|
93557
93608
|
false
|
|
93558
93609
|
);
|
|
93559
|
-
case
|
|
93610
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
93560
93611
|
return visitPartiallyEmittedExpression(
|
|
93561
93612
|
node,
|
|
93562
93613
|
/*discarded*/
|
|
@@ -93642,7 +93693,7 @@ function transformESDecorators(context) {
|
|
|
93642
93693
|
/*discarded*/
|
|
93643
93694
|
true
|
|
93644
93695
|
);
|
|
93645
|
-
case
|
|
93696
|
+
case 362 /* CommaListExpression */:
|
|
93646
93697
|
return visitCommaListExpression(
|
|
93647
93698
|
node,
|
|
93648
93699
|
/*discarded*/
|
|
@@ -96233,7 +96284,7 @@ function transformES2018(context) {
|
|
|
96233
96284
|
return visitObjectLiteralExpression(node);
|
|
96234
96285
|
case 226 /* BinaryExpression */:
|
|
96235
96286
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
96236
|
-
case
|
|
96287
|
+
case 362 /* CommaListExpression */:
|
|
96237
96288
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
96238
96289
|
case 299 /* CatchClause */:
|
|
96239
96290
|
return visitCatchClause(node);
|
|
@@ -99456,7 +99507,7 @@ function transformES2015(context) {
|
|
|
99456
99507
|
return visitParenthesizedExpression(node, expressionResultIsUnused2);
|
|
99457
99508
|
case 226 /* BinaryExpression */:
|
|
99458
99509
|
return visitBinaryExpression(node, expressionResultIsUnused2);
|
|
99459
|
-
case
|
|
99510
|
+
case 362 /* CommaListExpression */:
|
|
99460
99511
|
return visitCommaListExpression(node, expressionResultIsUnused2);
|
|
99461
99512
|
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
99462
99513
|
case 16 /* TemplateHead */:
|
|
@@ -102822,7 +102873,7 @@ function transformGenerators(context) {
|
|
|
102822
102873
|
switch (node.kind) {
|
|
102823
102874
|
case 226 /* BinaryExpression */:
|
|
102824
102875
|
return visitBinaryExpression(node);
|
|
102825
|
-
case
|
|
102876
|
+
case 362 /* CommaListExpression */:
|
|
102826
102877
|
return visitCommaListExpression(node);
|
|
102827
102878
|
case 227 /* ConditionalExpression */:
|
|
102828
102879
|
return visitConditionalExpression(node);
|
|
@@ -105202,7 +105253,7 @@ function transformModule(context) {
|
|
|
105202
105253
|
return visitExpressionStatement(node);
|
|
105203
105254
|
case 217 /* ParenthesizedExpression */:
|
|
105204
105255
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
105205
|
-
case
|
|
105256
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
105206
105257
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
105207
105258
|
case 213 /* CallExpression */:
|
|
105208
105259
|
if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
|
|
@@ -107606,7 +107657,7 @@ function transformSystemModule(context) {
|
|
|
107606
107657
|
return visitExpressionStatement(node);
|
|
107607
107658
|
case 217 /* ParenthesizedExpression */:
|
|
107608
107659
|
return visitParenthesizedExpression(node, valueIsDiscarded);
|
|
107609
|
-
case
|
|
107660
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
107610
107661
|
return visitPartiallyEmittedExpression(node, valueIsDiscarded);
|
|
107611
107662
|
case 226 /* BinaryExpression */:
|
|
107612
107663
|
if (isDestructuringAssignment(node)) {
|
|
@@ -109722,6 +109773,8 @@ function transformDeclarations(context) {
|
|
|
109722
109773
|
}
|
|
109723
109774
|
if (isDeclaration(input) && isDeclarationAndNotVisible(input))
|
|
109724
109775
|
return;
|
|
109776
|
+
if (isJSDocImportTypeTag(input))
|
|
109777
|
+
return;
|
|
109725
109778
|
if (isFunctionLike(input) && resolver.isImplementationOfOverload(input))
|
|
109726
109779
|
return;
|
|
109727
109780
|
let previousEnclosingDeclaration;
|
|
@@ -110372,7 +110425,7 @@ function noEmitNotification(hint, node, callback) {
|
|
|
110372
110425
|
}
|
|
110373
110426
|
function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
|
|
110374
110427
|
var _a, _b;
|
|
110375
|
-
const enabledSyntaxKindFeatures = new Array(
|
|
110428
|
+
const enabledSyntaxKindFeatures = new Array(364 /* Count */);
|
|
110376
110429
|
let lexicalEnvironmentVariableDeclarations;
|
|
110377
110430
|
let lexicalEnvironmentFunctionDeclarations;
|
|
110378
110431
|
let lexicalEnvironmentStatements;
|
|
@@ -112263,7 +112316,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112263
112316
|
return emitJSDocTypedefTag(node);
|
|
112264
112317
|
case 354 /* JSDocSeeTag */:
|
|
112265
112318
|
return emitJSDocSeeTag(node);
|
|
112266
|
-
case
|
|
112319
|
+
case 358 /* JSDocImportTypeTag */:
|
|
112320
|
+
return emitJSDocImportTypeTag(node);
|
|
112321
|
+
case 360 /* NotEmittedStatement */:
|
|
112267
112322
|
return;
|
|
112268
112323
|
}
|
|
112269
112324
|
if (isExpression(node)) {
|
|
@@ -112364,15 +112419,15 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112364
112419
|
return emitJsxSelfClosingElement(node);
|
|
112365
112420
|
case 288 /* JsxFragment */:
|
|
112366
112421
|
return emitJsxFragment(node);
|
|
112367
|
-
case
|
|
112422
|
+
case 359 /* SyntaxList */:
|
|
112368
112423
|
return Debug.fail("SyntaxList should not be printed");
|
|
112369
|
-
case
|
|
112424
|
+
case 360 /* NotEmittedStatement */:
|
|
112370
112425
|
return;
|
|
112371
|
-
case
|
|
112426
|
+
case 361 /* PartiallyEmittedExpression */:
|
|
112372
112427
|
return emitPartiallyEmittedExpression(node);
|
|
112373
|
-
case
|
|
112428
|
+
case 362 /* CommaListExpression */:
|
|
112374
112429
|
return emitCommaList(node);
|
|
112375
|
-
case
|
|
112430
|
+
case 363 /* SyntheticReferenceExpression */:
|
|
112376
112431
|
return Debug.fail("SyntheticReferenceExpression should not be printed");
|
|
112377
112432
|
}
|
|
112378
112433
|
}
|
|
@@ -114270,6 +114325,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
114270
114325
|
emit(tag.name);
|
|
114271
114326
|
emitJSDocComment(tag.comment);
|
|
114272
114327
|
}
|
|
114328
|
+
function emitJSDocImportTypeTag(tag) {
|
|
114329
|
+
emitJSDocTagName(tag.tagName);
|
|
114330
|
+
writeSpace();
|
|
114331
|
+
emit(tag.importClause);
|
|
114332
|
+
writeSpace();
|
|
114333
|
+
emitTokenWithComment(161 /* FromKeyword */, tag.importClause.end, writeKeyword, tag);
|
|
114334
|
+
writeSpace();
|
|
114335
|
+
emitExpression(tag.moduleSpecifier);
|
|
114336
|
+
emitJSDocComment(tag.comment);
|
|
114337
|
+
}
|
|
114273
114338
|
function emitJSDocNameReference(node) {
|
|
114274
114339
|
writeSpace();
|
|
114275
114340
|
writePunctuation("{");
|
|
@@ -115769,7 +115834,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
115769
115834
|
emitLeadingComments(
|
|
115770
115835
|
pos,
|
|
115771
115836
|
/*isEmittedNode*/
|
|
115772
|
-
node.kind !==
|
|
115837
|
+
node.kind !== 360 /* NotEmittedStatement */
|
|
115773
115838
|
);
|
|
115774
115839
|
}
|
|
115775
115840
|
if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
|
|
@@ -115793,7 +115858,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
115793
115858
|
containerPos = savedContainerPos;
|
|
115794
115859
|
containerEnd = savedContainerEnd;
|
|
115795
115860
|
declarationListContainerEnd = savedDeclarationListContainerEnd;
|
|
115796
|
-
if (!skipTrailingComments && node.kind !==
|
|
115861
|
+
if (!skipTrailingComments && node.kind !== 360 /* NotEmittedStatement */) {
|
|
115797
115862
|
emitTrailingComments(end);
|
|
115798
115863
|
}
|
|
115799
115864
|
}
|
|
@@ -116065,7 +116130,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
116065
116130
|
}
|
|
116066
116131
|
} else {
|
|
116067
116132
|
const source = sourceMapRange.source || sourceMapSource;
|
|
116068
|
-
if (node.kind !==
|
|
116133
|
+
if (node.kind !== 360 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
|
|
116069
116134
|
emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
|
|
116070
116135
|
}
|
|
116071
116136
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
@@ -116080,7 +116145,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
116080
116145
|
if (emitFlags & 128 /* NoNestedSourceMaps */) {
|
|
116081
116146
|
sourceMapsDisabled = false;
|
|
116082
116147
|
}
|
|
116083
|
-
if (node.kind !==
|
|
116148
|
+
if (node.kind !== 360 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
|
|
116084
116149
|
emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
116085
116150
|
}
|
|
116086
116151
|
}
|
|
@@ -118981,6 +119046,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
118981
119046
|
if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || isJavaScriptFile) {
|
|
118982
119047
|
collectDynamicImportOrRequireCalls(file);
|
|
118983
119048
|
}
|
|
119049
|
+
if (isJavaScriptFile) {
|
|
119050
|
+
collectJsDocImportTypeReferences(file);
|
|
119051
|
+
}
|
|
118984
119052
|
file.imports = imports || emptyArray;
|
|
118985
119053
|
file.moduleAugmentations = moduleAugmentations || emptyArray;
|
|
118986
119054
|
file.ambientModuleNames = ambientModules || emptyArray;
|
|
@@ -119055,6 +119123,23 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
119055
119123
|
}
|
|
119056
119124
|
}
|
|
119057
119125
|
}
|
|
119126
|
+
function collectJsDocImportTypeReferences(file2) {
|
|
119127
|
+
const r = /@importType/g;
|
|
119128
|
+
while (r.exec(file2.text) !== null) {
|
|
119129
|
+
const node = getNodeAtPosition(file2, r.lastIndex);
|
|
119130
|
+
if (isJSDocImportTypeTag(node)) {
|
|
119131
|
+
const moduleNameExpr = getExternalModuleName(node);
|
|
119132
|
+
if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) {
|
|
119133
|
+
setParentRecursive(
|
|
119134
|
+
node,
|
|
119135
|
+
/*incremental*/
|
|
119136
|
+
false
|
|
119137
|
+
);
|
|
119138
|
+
imports = append(imports, moduleNameExpr);
|
|
119139
|
+
}
|
|
119140
|
+
}
|
|
119141
|
+
}
|
|
119142
|
+
}
|
|
119058
119143
|
function getNodeAtPosition(sourceFile, position) {
|
|
119059
119144
|
let current = sourceFile;
|
|
119060
119145
|
const getContainingChild = (child) => {
|