@typescript-deploys/pr-build 5.4.0-pr-57207-3 → 5.4.0-pr-56594-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/tsserver.js CHANGED
@@ -1475,7 +1475,6 @@ __export(server_exports, {
1475
1475
  isJSDocEnumTag: () => isJSDocEnumTag,
1476
1476
  isJSDocFunctionType: () => isJSDocFunctionType,
1477
1477
  isJSDocImplementsTag: () => isJSDocImplementsTag,
1478
- isJSDocImportTypeTag: () => isJSDocImportTypeTag,
1479
1478
  isJSDocIndexSignature: () => isJSDocIndexSignature,
1480
1479
  isJSDocLikeText: () => isJSDocLikeText,
1481
1480
  isJSDocLink: () => isJSDocLink,
@@ -2341,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
2341
2340
 
2342
2341
  // src/compiler/corePublic.ts
2343
2342
  var versionMajorMinor = "5.4";
2344
- var version = `${versionMajorMinor}.0-insiders.20240131`;
2343
+ var version = `${versionMajorMinor}.0-insiders.20240205`;
2345
2344
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2346
2345
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2347
2346
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6111,13 +6110,12 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6111
6110
  SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 355] = "JSDocPropertyTag";
6112
6111
  SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 356] = "JSDocThrowsTag";
6113
6112
  SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag";
6114
- SyntaxKind5[SyntaxKind5["JSDocImportTypeTag"] = 358] = "JSDocImportTypeTag";
6115
- SyntaxKind5[SyntaxKind5["SyntaxList"] = 359] = "SyntaxList";
6116
- SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 360] = "NotEmittedStatement";
6117
- SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 361] = "PartiallyEmittedExpression";
6118
- SyntaxKind5[SyntaxKind5["CommaListExpression"] = 362] = "CommaListExpression";
6119
- SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression";
6120
- SyntaxKind5[SyntaxKind5["Count"] = 364] = "Count";
6113
+ SyntaxKind5[SyntaxKind5["SyntaxList"] = 358] = "SyntaxList";
6114
+ SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 359] = "NotEmittedStatement";
6115
+ SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression";
6116
+ SyntaxKind5[SyntaxKind5["CommaListExpression"] = 361] = "CommaListExpression";
6117
+ SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression";
6118
+ SyntaxKind5[SyntaxKind5["Count"] = 363] = "Count";
6121
6119
  SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment";
6122
6120
  SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment";
6123
6121
  SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -6146,9 +6144,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6146
6144
  SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement";
6147
6145
  SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode";
6148
6146
  SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode";
6149
- SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 358 /* JSDocImportTypeTag */] = "LastJSDocNode";
6147
+ SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode";
6150
6148
  SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode";
6151
- SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 358 /* JSDocImportTypeTag */] = "LastJSDocTagNode";
6149
+ SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
6152
6150
  SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword";
6153
6151
  SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword";
6154
6152
  return SyntaxKind5;
@@ -10492,7 +10490,6 @@ var Diagnostics = {
10492
10490
  Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* Message */, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
10493
10491
  Specify_library_files_to_be_included_in_the_compilation: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
10494
10492
  Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
10495
- File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* Message */, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
10496
10493
  Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, 1 /* Error */, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
10497
10494
  Base_directory_to_resolve_non_absolute_module_names: diag(6083, 3 /* Message */, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
10498
10495
  Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, 3 /* Message */, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),
@@ -14815,8 +14812,8 @@ function isExpressionKind(kind) {
14815
14812
  case 230 /* SpreadElement */:
14816
14813
  case 234 /* AsExpression */:
14817
14814
  case 232 /* OmittedExpression */:
14818
- case 362 /* CommaListExpression */:
14819
- case 361 /* PartiallyEmittedExpression */:
14815
+ case 361 /* CommaListExpression */:
14816
+ case 360 /* PartiallyEmittedExpression */:
14820
14817
  case 238 /* SatisfiesExpression */:
14821
14818
  return true;
14822
14819
  default:
@@ -15001,7 +14998,7 @@ function isDeclarationStatementKind(kind) {
15001
14998
  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 */;
15002
14999
  }
15003
15000
  function isStatementKindButNotDeclarationKind(kind) {
15004
- 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 */;
15001
+ 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 === 359 /* NotEmittedStatement */;
15005
15002
  }
15006
15003
  function isDeclaration(node) {
15007
15004
  if (node.kind === 168 /* TypeParameter */) {
@@ -15062,13 +15059,13 @@ function isCaseOrDefaultClause(node) {
15062
15059
  return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */;
15063
15060
  }
15064
15061
  function isJSDocNode(node) {
15065
- return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 358 /* LastJSDocNode */;
15062
+ return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */;
15066
15063
  }
15067
15064
  function isJSDocCommentContainingNode(node) {
15068
15065
  return node.kind === 327 /* JSDoc */ || node.kind === 326 /* JSDocNamepathType */ || node.kind === 328 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
15069
15066
  }
15070
15067
  function isJSDocTag(node) {
15071
- return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 358 /* LastJSDocTagNode */;
15068
+ return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */;
15072
15069
  }
15073
15070
  function isSetAccessor(node) {
15074
15071
  return node.kind === 178 /* SetAccessor */;
@@ -15566,7 +15563,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
15566
15563
  if (includeJsDoc && hasJSDocNodes(node)) {
15567
15564
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
15568
15565
  }
15569
- if (node.kind === 359 /* SyntaxList */ && node._children.length > 0) {
15566
+ if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) {
15570
15567
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
15571
15568
  }
15572
15569
  return skipTrivia(
@@ -17602,7 +17599,6 @@ function tryGetModuleSpecifierFromDeclaration(node) {
17602
17599
  ))) == null ? void 0 : _a.arguments[0];
17603
17600
  case 272 /* ImportDeclaration */:
17604
17601
  case 278 /* ExportDeclaration */:
17605
- case 358 /* JSDocImportTypeTag */:
17606
17602
  return tryCast(node.moduleSpecifier, isStringLiteralLike);
17607
17603
  case 271 /* ImportEqualsDeclaration */:
17608
17604
  return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);
@@ -17627,7 +17623,6 @@ function tryGetImportFromModuleSpecifier(node) {
17627
17623
  switch (node.parent.kind) {
17628
17624
  case 272 /* ImportDeclaration */:
17629
17625
  case 278 /* ExportDeclaration */:
17630
- case 358 /* JSDocImportTypeTag */:
17631
17626
  return node.parent;
17632
17627
  case 283 /* ExternalModuleReference */:
17633
17628
  return node.parent.parent;
@@ -17648,7 +17643,6 @@ function getExternalModuleName(node) {
17648
17643
  switch (node.kind) {
17649
17644
  case 272 /* ImportDeclaration */:
17650
17645
  case 278 /* ExportDeclaration */:
17651
- case 358 /* JSDocImportTypeTag */:
17652
17646
  return node.moduleSpecifier;
17653
17647
  case 271 /* ImportEqualsDeclaration */:
17654
17648
  return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0;
@@ -18565,7 +18559,7 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => {
18565
18559
  })(OperatorPrecedence || {});
18566
18560
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
18567
18561
  switch (nodeKind) {
18568
- case 362 /* CommaListExpression */:
18562
+ case 361 /* CommaListExpression */:
18569
18563
  return 0 /* Comma */;
18570
18564
  case 230 /* SpreadElement */:
18571
18565
  return 1 /* Spread */;
@@ -20278,7 +20272,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
20278
20272
  case 212 /* ElementAccessExpression */:
20279
20273
  case 211 /* PropertyAccessExpression */:
20280
20274
  case 235 /* NonNullExpression */:
20281
- case 361 /* PartiallyEmittedExpression */:
20275
+ case 360 /* PartiallyEmittedExpression */:
20282
20276
  case 238 /* SatisfiesExpression */:
20283
20277
  node = node.expression;
20284
20278
  continue;
@@ -21718,7 +21712,7 @@ function getContainingNodeArray(node) {
21718
21712
  return parent2.types;
21719
21713
  case 189 /* TupleType */:
21720
21714
  case 209 /* ArrayLiteralExpression */:
21721
- case 362 /* CommaListExpression */:
21715
+ case 361 /* CommaListExpression */:
21722
21716
  case 275 /* NamedImports */:
21723
21717
  case 279 /* NamedExports */:
21724
21718
  return parent2.elements;
@@ -22925,8 +22919,6 @@ function createNodeFactory(flags, baseFactory2) {
22925
22919
  updateJSDocImplementsTag,
22926
22920
  createJSDocSeeTag,
22927
22921
  updateJSDocSeeTag,
22928
- createJSDocImportTypeTag,
22929
- updateJSDocImportTypeTag,
22930
22922
  createJSDocNameReference,
22931
22923
  updateJSDocNameReference,
22932
22924
  createJSDocMemberName,
@@ -25705,16 +25697,6 @@ function createNodeFactory(flags, baseFactory2) {
25705
25697
  function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {
25706
25698
  return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node;
25707
25699
  }
25708
- function createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment) {
25709
- const node = createBaseJSDocTag(358 /* JSDocImportTypeTag */, tagName ?? createIdentifier("importType"), comment);
25710
- node.importClause = importClause;
25711
- node.moduleSpecifier = moduleSpecifier;
25712
- node.comment = comment;
25713
- return node;
25714
- }
25715
- function updateJSDocImportTypeTag(node, tagName, importClause, moduleSpecifier, comment) {
25716
- return node.tagName !== tagName || node.comment !== comment || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier ? update(createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment), node) : node;
25717
- }
25718
25700
  function createJSDocText(text) {
25719
25701
  const node = createBaseNode(328 /* JSDocText */);
25720
25702
  node.text = text;
@@ -26153,18 +26135,18 @@ function createNodeFactory(flags, baseFactory2) {
26153
26135
  return node;
26154
26136
  }
26155
26137
  function createSyntaxList3(children) {
26156
- const node = createBaseNode(359 /* SyntaxList */);
26138
+ const node = createBaseNode(358 /* SyntaxList */);
26157
26139
  node._children = children;
26158
26140
  return node;
26159
26141
  }
26160
26142
  function createNotEmittedStatement(original) {
26161
- const node = createBaseNode(360 /* NotEmittedStatement */);
26143
+ const node = createBaseNode(359 /* NotEmittedStatement */);
26162
26144
  node.original = original;
26163
26145
  setTextRange(node, original);
26164
26146
  return node;
26165
26147
  }
26166
26148
  function createPartiallyEmittedExpression(expression, original) {
26167
- const node = createBaseNode(361 /* PartiallyEmittedExpression */);
26149
+ const node = createBaseNode(360 /* PartiallyEmittedExpression */);
26168
26150
  node.expression = expression;
26169
26151
  node.original = original;
26170
26152
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -26186,7 +26168,7 @@ function createNodeFactory(flags, baseFactory2) {
26186
26168
  return node;
26187
26169
  }
26188
26170
  function createCommaListExpression(elements) {
26189
- const node = createBaseNode(362 /* CommaListExpression */);
26171
+ const node = createBaseNode(361 /* CommaListExpression */);
26190
26172
  node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
26191
26173
  node.transformFlags |= propagateChildrenFlags(node.elements);
26192
26174
  return node;
@@ -26195,7 +26177,7 @@ function createNodeFactory(flags, baseFactory2) {
26195
26177
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
26196
26178
  }
26197
26179
  function createSyntheticReferenceExpression(expression, thisArg) {
26198
- const node = createBaseNode(363 /* SyntheticReferenceExpression */);
26180
+ const node = createBaseNode(362 /* SyntheticReferenceExpression */);
26199
26181
  node.expression = expression;
26200
26182
  node.thisArg = thisArg;
26201
26183
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -26441,7 +26423,7 @@ function createNodeFactory(flags, baseFactory2) {
26441
26423
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
26442
26424
  case 235 /* NonNullExpression */:
26443
26425
  return updateNonNullExpression(outerExpression, expression);
26444
- case 361 /* PartiallyEmittedExpression */:
26426
+ case 360 /* PartiallyEmittedExpression */:
26445
26427
  return updatePartiallyEmittedExpression(outerExpression, expression);
26446
26428
  }
26447
26429
  }
@@ -26851,8 +26833,6 @@ function getDefaultTagNameForKind(kind) {
26851
26833
  return "augments";
26852
26834
  case 336 /* JSDocImplementsTag */:
26853
26835
  return "implements";
26854
- case 358 /* JSDocImportTypeTag */:
26855
- return "importType";
26856
26836
  default:
26857
26837
  return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`);
26858
26838
  }
@@ -26993,7 +26973,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
26993
26973
  case 216 /* TypeAssertionExpression */:
26994
26974
  case 238 /* SatisfiesExpression */:
26995
26975
  case 234 /* AsExpression */:
26996
- case 361 /* PartiallyEmittedExpression */:
26976
+ case 360 /* PartiallyEmittedExpression */:
26997
26977
  case 217 /* ParenthesizedExpression */:
26998
26978
  case 108 /* SuperKeyword */:
26999
26979
  return -2147483648 /* OuterExpressionExcludes */;
@@ -28992,10 +28972,10 @@ function isSyntheticExpression(node) {
28992
28972
  return node.kind === 237 /* SyntheticExpression */;
28993
28973
  }
28994
28974
  function isPartiallyEmittedExpression(node) {
28995
- return node.kind === 361 /* PartiallyEmittedExpression */;
28975
+ return node.kind === 360 /* PartiallyEmittedExpression */;
28996
28976
  }
28997
28977
  function isCommaListExpression(node) {
28998
- return node.kind === 362 /* CommaListExpression */;
28978
+ return node.kind === 361 /* CommaListExpression */;
28999
28979
  }
29000
28980
  function isTemplateSpan(node) {
29001
28981
  return node.kind === 239 /* TemplateSpan */;
@@ -29145,10 +29125,10 @@ function isMissingDeclaration(node) {
29145
29125
  return node.kind === 282 /* MissingDeclaration */;
29146
29126
  }
29147
29127
  function isNotEmittedStatement(node) {
29148
- return node.kind === 360 /* NotEmittedStatement */;
29128
+ return node.kind === 359 /* NotEmittedStatement */;
29149
29129
  }
29150
29130
  function isSyntheticReference(node) {
29151
- return node.kind === 363 /* SyntheticReferenceExpression */;
29131
+ return node.kind === 362 /* SyntheticReferenceExpression */;
29152
29132
  }
29153
29133
  function isExternalModuleReference(node) {
29154
29134
  return node.kind === 283 /* ExternalModuleReference */;
@@ -29348,11 +29328,8 @@ function isJSDocSatisfiesTag(node) {
29348
29328
  function isJSDocThrowsTag(node) {
29349
29329
  return node.kind === 356 /* JSDocThrowsTag */;
29350
29330
  }
29351
- function isJSDocImportTypeTag(node) {
29352
- return node.kind === 358 /* JSDocImportTypeTag */;
29353
- }
29354
29331
  function isSyntaxList(n) {
29355
- return n.kind === 359 /* SyntaxList */;
29332
+ return n.kind === 358 /* SyntaxList */;
29356
29333
  }
29357
29334
 
29358
29335
  // src/compiler/factory/utilities.ts
@@ -29747,7 +29724,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
29747
29724
  return (kinds & 2 /* TypeAssertions */) !== 0;
29748
29725
  case 235 /* NonNullExpression */:
29749
29726
  return (kinds & 4 /* NonNullAssertions */) !== 0;
29750
- case 361 /* PartiallyEmittedExpression */:
29727
+ case 360 /* PartiallyEmittedExpression */:
29751
29728
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
29752
29729
  }
29753
29730
  return false;
@@ -30838,7 +30815,7 @@ var forEachChildTable = {
30838
30815
  [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
30839
30816
  return visitNodes(cbNode, cbNodes, node.modifiers);
30840
30817
  },
30841
- [362 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
30818
+ [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
30842
30819
  return visitNodes(cbNode, cbNodes, node.elements);
30843
30820
  },
30844
30821
  [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -30933,8 +30910,7 @@ var forEachChildTable = {
30933
30910
  [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
30934
30911
  [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
30935
30912
  [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
30936
- [358 /* JSDocImportTypeTag */]: forEachChildInJSDocImportTypeTag,
30937
- [361 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
30913
+ [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
30938
30914
  };
30939
30915
  function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
30940
30916
  return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
@@ -30985,9 +30961,6 @@ function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {
30985
30961
  function forEachChildInJSDocTag(node, cbNode, cbNodes) {
30986
30962
  return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
30987
30963
  }
30988
- function forEachChildInJSDocImportTypeTag(node, cbNode, cbNodes) {
30989
- return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
30990
- }
30991
30964
  function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) {
30992
30965
  return visitNode2(cbNode, node.expression);
30993
30966
  }
@@ -37238,9 +37211,6 @@ var Parser;
37238
37211
  case "throws":
37239
37212
  tag = parseThrowsTag(start3, tagName, margin, indentText);
37240
37213
  break;
37241
- case "importType":
37242
- tag = parseImportTypeTag(start3, tagName, margin, indentText);
37243
- break;
37244
37214
  default:
37245
37215
  tag = parseUnknownTag(start3, tagName, margin, indentText);
37246
37216
  break;
@@ -37560,27 +37530,6 @@ var Parser;
37560
37530
  const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), margin, indentText) : void 0;
37561
37531
  return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start3);
37562
37532
  }
37563
- function parseImportTypeTag(start3, tagName, margin, indentText) {
37564
- const afterImportTypeTagPos = scanner2.getTokenFullStart();
37565
- let identifier;
37566
- if (isIdentifier2()) {
37567
- identifier = parseIdentifier();
37568
- }
37569
- let importClause;
37570
- if (identifier || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */) {
37571
- importClause = parseImportClause(
37572
- identifier,
37573
- afterImportTypeTagPos,
37574
- /*isTypeOnly*/
37575
- true
37576
- );
37577
- parseExpected(161 /* FromKeyword */);
37578
- }
37579
- Debug.assert(importClause);
37580
- const moduleSpecifier = parseModuleSpecifier();
37581
- const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), margin, indentText) : void 0;
37582
- return finishNode(factory2.createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comments2), start3);
37583
- }
37584
37533
  function parseExpressionWithTypeArgumentsForAugments() {
37585
37534
  const usedBrace = parseOptional(19 /* OpenBraceToken */);
37586
37535
  const pos = getNodePos();
@@ -43443,15 +43392,9 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
43443
43392
  }
43444
43393
  }
43445
43394
  const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
43446
- const fromFile = tryFile(candidate2, onlyRecordFailures2, state2);
43395
+ const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
43447
43396
  if (fromFile) {
43448
- const resolved = resolvedIfExtensionMatches(extensions2, fromFile);
43449
- if (resolved) {
43450
- return noPackageId(resolved);
43451
- }
43452
- if (state2.traceEnabled) {
43453
- trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
43454
- }
43397
+ return noPackageId(fromFile);
43455
43398
  }
43456
43399
  const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
43457
43400
  const features = state2.features;
@@ -43507,10 +43450,6 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
43507
43450
  return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
43508
43451
  }
43509
43452
  }
43510
- function resolvedIfExtensionMatches(extensions, path, resolvedUsingTsExtension) {
43511
- const ext = tryGetExtensionFromPath2(path);
43512
- return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext, resolvedUsingTsExtension } : void 0;
43513
- }
43514
43453
  function extensionIsOk(extensions, extension) {
43515
43454
  return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
43516
43455
  }
@@ -51706,7 +51645,7 @@ function createTypeChecker(host) {
51706
51645
  return ambientModule;
51707
51646
  }
51708
51647
  const currentSourceFile = getSourceFileOfNode(location);
51709
- 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(
51648
+ 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(
51710
51649
  location.initializer,
51711
51650
  /*requireStringLiteralLikeArgument*/
51712
51651
  true
@@ -56007,7 +55946,6 @@ function createTypeChecker(host) {
56007
55946
  case 273 /* ImportClause */: {
56008
55947
  const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
56009
55948
  const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier;
56010
- const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;
56011
55949
  addResult(
56012
55950
  factory.createImportDeclaration(
56013
55951
  /*modifiers*/
@@ -56020,7 +55958,7 @@ function createTypeChecker(host) {
56020
55958
  void 0
56021
55959
  ),
56022
55960
  specifier2,
56023
- attributes
55961
+ node.parent.attributes
56024
55962
  ),
56025
55963
  0 /* None */
56026
55964
  );
@@ -56029,7 +55967,6 @@ function createTypeChecker(host) {
56029
55967
  case 274 /* NamespaceImport */: {
56030
55968
  const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
56031
55969
  const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier;
56032
- const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;
56033
55970
  addResult(
56034
55971
  factory.createImportDeclaration(
56035
55972
  /*modifiers*/
@@ -56042,7 +55979,7 @@ function createTypeChecker(host) {
56042
55979
  factory.createNamespaceImport(factory.createIdentifier(localName))
56043
55980
  ),
56044
55981
  specifier2,
56045
- attributes
55982
+ node.parent.attributes
56046
55983
  ),
56047
55984
  0 /* None */
56048
55985
  );
@@ -56064,7 +56001,6 @@ function createTypeChecker(host) {
56064
56001
  case 276 /* ImportSpecifier */: {
56065
56002
  const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
56066
56003
  const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier;
56067
- const attributes = isImportDeclaration(node.parent.parent.parent) ? node.parent.parent.parent.attributes : void 0;
56068
56004
  addResult(
56069
56005
  factory.createImportDeclaration(
56070
56006
  /*modifiers*/
@@ -56084,7 +56020,7 @@ function createTypeChecker(host) {
56084
56020
  ])
56085
56021
  ),
56086
56022
  specifier2,
56087
- attributes
56023
+ node.parent.parent.parent.attributes
56088
56024
  ),
56089
56025
  0 /* None */
56090
56026
  );
@@ -87345,7 +87281,7 @@ function createTypeChecker(host) {
87345
87281
  return void 0;
87346
87282
  case 11 /* StringLiteral */:
87347
87283
  case 15 /* NoSubstitutionTemplateLiteral */:
87348
- 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(
87284
+ 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(
87349
87285
  node.parent,
87350
87286
  /*requireStringLiteralLikeArgument*/
87351
87287
  false
@@ -87895,7 +87831,7 @@ function createTypeChecker(host) {
87895
87831
  true,
87896
87832
  location
87897
87833
  );
87898
- const resolvedSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
87834
+ const resolvedValueSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
87899
87835
  isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */)));
87900
87836
  const typeSymbol = resolveEntityName(
87901
87837
  typeName,
@@ -87903,26 +87839,30 @@ function createTypeChecker(host) {
87903
87839
  /*ignoreErrors*/
87904
87840
  true,
87905
87841
  /*dontResolveAlias*/
87906
- false,
87842
+ true,
87907
87843
  location
87908
87844
  );
87909
- if (resolvedSymbol && resolvedSymbol === typeSymbol) {
87845
+ const resolvedTypeSymbol = typeSymbol && typeSymbol.flags & 2097152 /* Alias */ ? resolveAlias(typeSymbol) : typeSymbol;
87846
+ if (!valueSymbol) {
87847
+ isTypeOnly || (isTypeOnly = !!(typeSymbol && getTypeOnlyAliasDeclaration(typeSymbol, 788968 /* Type */)));
87848
+ }
87849
+ if (resolvedValueSymbol && resolvedValueSymbol === resolvedTypeSymbol) {
87910
87850
  const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(
87911
87851
  /*reportErrors*/
87912
87852
  false
87913
87853
  );
87914
- if (globalPromiseSymbol && resolvedSymbol === globalPromiseSymbol) {
87854
+ if (globalPromiseSymbol && resolvedValueSymbol === globalPromiseSymbol) {
87915
87855
  return 9 /* Promise */;
87916
87856
  }
87917
- const constructorType = getTypeOfSymbol(resolvedSymbol);
87857
+ const constructorType = getTypeOfSymbol(resolvedValueSymbol);
87918
87858
  if (constructorType && isConstructorType(constructorType)) {
87919
87859
  return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */;
87920
87860
  }
87921
87861
  }
87922
- if (!typeSymbol) {
87862
+ if (!resolvedTypeSymbol) {
87923
87863
  return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
87924
87864
  }
87925
- const type = getDeclaredTypeOfSymbol(typeSymbol);
87865
+ const type = getDeclaredTypeOfSymbol(resolvedTypeSymbol);
87926
87866
  if (isErrorType(type)) {
87927
87867
  return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
87928
87868
  } else if (type.flags & 3 /* AnyOrUnknown */) {
@@ -91580,13 +91520,13 @@ var visitEachChildTable = {
91580
91520
  );
91581
91521
  },
91582
91522
  // Transformation nodes
91583
- [361 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
91523
+ [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
91584
91524
  return context.factory.updatePartiallyEmittedExpression(
91585
91525
  node,
91586
91526
  Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
91587
91527
  );
91588
91528
  },
91589
- [362 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
91529
+ [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
91590
91530
  return context.factory.updateCommaListExpression(
91591
91531
  node,
91592
91532
  nodesVisitor(node.elements, visitor, isExpression)
@@ -93563,9 +93503,50 @@ function transformTypeScript(context) {
93563
93503
  return visitorWorker(node);
93564
93504
  }
93565
93505
  }
93566
- function visitElidableStatement(node) {
93506
+ function isElisionBlocked(node) {
93567
93507
  const parsed = getParseTreeNode(node);
93568
- if (parsed !== node) {
93508
+ if (parsed === node || isExportAssignment(node)) {
93509
+ return false;
93510
+ }
93511
+ if (!parsed || parsed.kind !== node.kind) {
93512
+ return true;
93513
+ }
93514
+ switch (node.kind) {
93515
+ case 272 /* ImportDeclaration */:
93516
+ Debug.assertNode(parsed, isImportDeclaration);
93517
+ if (node.importClause !== parsed.importClause) {
93518
+ return true;
93519
+ }
93520
+ if (node.attributes !== parsed.attributes) {
93521
+ return true;
93522
+ }
93523
+ break;
93524
+ case 271 /* ImportEqualsDeclaration */:
93525
+ Debug.assertNode(parsed, isImportEqualsDeclaration);
93526
+ if (node.name !== parsed.name) {
93527
+ return true;
93528
+ }
93529
+ if (node.isTypeOnly !== parsed.isTypeOnly) {
93530
+ return true;
93531
+ }
93532
+ if (node.moduleReference !== parsed.moduleReference && (isEntityName(node.moduleReference) || isEntityName(parsed.moduleReference))) {
93533
+ return true;
93534
+ }
93535
+ break;
93536
+ case 278 /* ExportDeclaration */:
93537
+ Debug.assertNode(parsed, isExportDeclaration);
93538
+ if (node.exportClause !== parsed.exportClause) {
93539
+ return true;
93540
+ }
93541
+ if (node.attributes !== parsed.attributes) {
93542
+ return true;
93543
+ }
93544
+ break;
93545
+ }
93546
+ return false;
93547
+ }
93548
+ function visitElidableStatement(node) {
93549
+ if (isElisionBlocked(node)) {
93569
93550
  if (node.transformFlags & 1 /* ContainsTypeScript */) {
93570
93551
  return visitEachChild(node, visitor, context);
93571
93552
  }
@@ -95410,7 +95391,7 @@ function transformClassFields(context) {
95410
95391
  /*discarded*/
95411
95392
  true
95412
95393
  );
95413
- case 362 /* CommaListExpression */:
95394
+ case 361 /* CommaListExpression */:
95414
95395
  return visitCommaListExpression(
95415
95396
  node,
95416
95397
  /*discarded*/
@@ -98503,7 +98484,7 @@ function transformESDecorators(context) {
98503
98484
  return visitForStatement(node);
98504
98485
  case 244 /* ExpressionStatement */:
98505
98486
  return visitExpressionStatement(node);
98506
- case 362 /* CommaListExpression */:
98487
+ case 361 /* CommaListExpression */:
98507
98488
  return visitCommaListExpression(
98508
98489
  node,
98509
98490
  /*discarded*/
@@ -98515,7 +98496,7 @@ function transformESDecorators(context) {
98515
98496
  /*discarded*/
98516
98497
  false
98517
98498
  );
98518
- case 361 /* PartiallyEmittedExpression */:
98499
+ case 360 /* PartiallyEmittedExpression */:
98519
98500
  return visitPartiallyEmittedExpression(
98520
98501
  node,
98521
98502
  /*discarded*/
@@ -98601,7 +98582,7 @@ function transformESDecorators(context) {
98601
98582
  /*discarded*/
98602
98583
  true
98603
98584
  );
98604
- case 362 /* CommaListExpression */:
98585
+ case 361 /* CommaListExpression */:
98605
98586
  return visitCommaListExpression(
98606
98587
  node,
98607
98588
  /*discarded*/
@@ -101192,7 +101173,7 @@ function transformES2018(context) {
101192
101173
  return visitObjectLiteralExpression(node);
101193
101174
  case 226 /* BinaryExpression */:
101194
101175
  return visitBinaryExpression(node, expressionResultIsUnused2);
101195
- case 362 /* CommaListExpression */:
101176
+ case 361 /* CommaListExpression */:
101196
101177
  return visitCommaListExpression(node, expressionResultIsUnused2);
101197
101178
  case 299 /* CatchClause */:
101198
101179
  return visitCatchClause(node);
@@ -104415,7 +104396,7 @@ function transformES2015(context) {
104415
104396
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
104416
104397
  case 226 /* BinaryExpression */:
104417
104398
  return visitBinaryExpression(node, expressionResultIsUnused2);
104418
- case 362 /* CommaListExpression */:
104399
+ case 361 /* CommaListExpression */:
104419
104400
  return visitCommaListExpression(node, expressionResultIsUnused2);
104420
104401
  case 15 /* NoSubstitutionTemplateLiteral */:
104421
104402
  case 16 /* TemplateHead */:
@@ -107781,7 +107762,7 @@ function transformGenerators(context) {
107781
107762
  switch (node.kind) {
107782
107763
  case 226 /* BinaryExpression */:
107783
107764
  return visitBinaryExpression(node);
107784
- case 362 /* CommaListExpression */:
107765
+ case 361 /* CommaListExpression */:
107785
107766
  return visitCommaListExpression(node);
107786
107767
  case 227 /* ConditionalExpression */:
107787
107768
  return visitConditionalExpression(node);
@@ -110161,7 +110142,7 @@ function transformModule(context) {
110161
110142
  return visitExpressionStatement(node);
110162
110143
  case 217 /* ParenthesizedExpression */:
110163
110144
  return visitParenthesizedExpression(node, valueIsDiscarded);
110164
- case 361 /* PartiallyEmittedExpression */:
110145
+ case 360 /* PartiallyEmittedExpression */:
110165
110146
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
110166
110147
  case 213 /* CallExpression */:
110167
110148
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -112565,7 +112546,7 @@ function transformSystemModule(context) {
112565
112546
  return visitExpressionStatement(node);
112566
112547
  case 217 /* ParenthesizedExpression */:
112567
112548
  return visitParenthesizedExpression(node, valueIsDiscarded);
112568
- case 361 /* PartiallyEmittedExpression */:
112549
+ case 360 /* PartiallyEmittedExpression */:
112569
112550
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
112570
112551
  case 226 /* BinaryExpression */:
112571
112552
  if (isDestructuringAssignment(node)) {
@@ -114681,8 +114662,6 @@ function transformDeclarations(context) {
114681
114662
  }
114682
114663
  if (isDeclaration(input) && isDeclarationAndNotVisible(input))
114683
114664
  return;
114684
- if (isJSDocImportTypeTag(input))
114685
- return;
114686
114665
  if (isFunctionLike(input) && resolver.isImplementationOfOverload(input))
114687
114666
  return;
114688
114667
  let previousEnclosingDeclaration;
@@ -115333,7 +115312,7 @@ function noEmitNotification(hint, node, callback) {
115333
115312
  }
115334
115313
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
115335
115314
  var _a, _b;
115336
- const enabledSyntaxKindFeatures = new Array(364 /* Count */);
115315
+ const enabledSyntaxKindFeatures = new Array(363 /* Count */);
115337
115316
  let lexicalEnvironmentVariableDeclarations;
115338
115317
  let lexicalEnvironmentFunctionDeclarations;
115339
115318
  let lexicalEnvironmentStatements;
@@ -117235,9 +117214,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
117235
117214
  return emitJSDocTypedefTag(node);
117236
117215
  case 354 /* JSDocSeeTag */:
117237
117216
  return emitJSDocSeeTag(node);
117238
- case 358 /* JSDocImportTypeTag */:
117239
- return emitJSDocImportTypeTag(node);
117240
- case 360 /* NotEmittedStatement */:
117217
+ case 359 /* NotEmittedStatement */:
117241
117218
  return;
117242
117219
  }
117243
117220
  if (isExpression(node)) {
@@ -117338,15 +117315,15 @@ function createPrinter(printerOptions = {}, handlers = {}) {
117338
117315
  return emitJsxSelfClosingElement(node);
117339
117316
  case 288 /* JsxFragment */:
117340
117317
  return emitJsxFragment(node);
117341
- case 359 /* SyntaxList */:
117318
+ case 358 /* SyntaxList */:
117342
117319
  return Debug.fail("SyntaxList should not be printed");
117343
- case 360 /* NotEmittedStatement */:
117320
+ case 359 /* NotEmittedStatement */:
117344
117321
  return;
117345
- case 361 /* PartiallyEmittedExpression */:
117322
+ case 360 /* PartiallyEmittedExpression */:
117346
117323
  return emitPartiallyEmittedExpression(node);
117347
- case 362 /* CommaListExpression */:
117324
+ case 361 /* CommaListExpression */:
117348
117325
  return emitCommaList(node);
117349
- case 363 /* SyntheticReferenceExpression */:
117326
+ case 362 /* SyntheticReferenceExpression */:
117350
117327
  return Debug.fail("SyntheticReferenceExpression should not be printed");
117351
117328
  }
117352
117329
  }
@@ -119244,16 +119221,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119244
119221
  emit(tag.name);
119245
119222
  emitJSDocComment(tag.comment);
119246
119223
  }
119247
- function emitJSDocImportTypeTag(tag) {
119248
- emitJSDocTagName(tag.tagName);
119249
- writeSpace();
119250
- emit(tag.importClause);
119251
- writeSpace();
119252
- emitTokenWithComment(161 /* FromKeyword */, tag.importClause.end, writeKeyword, tag);
119253
- writeSpace();
119254
- emitExpression(tag.moduleSpecifier);
119255
- emitJSDocComment(tag.comment);
119256
- }
119257
119224
  function emitJSDocNameReference(node) {
119258
119225
  writeSpace();
119259
119226
  writePunctuation("{");
@@ -120753,7 +120720,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120753
120720
  emitLeadingComments(
120754
120721
  pos,
120755
120722
  /*isEmittedNode*/
120756
- node.kind !== 360 /* NotEmittedStatement */
120723
+ node.kind !== 359 /* NotEmittedStatement */
120757
120724
  );
120758
120725
  }
120759
120726
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
@@ -120777,7 +120744,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120777
120744
  containerPos = savedContainerPos;
120778
120745
  containerEnd = savedContainerEnd;
120779
120746
  declarationListContainerEnd = savedDeclarationListContainerEnd;
120780
- if (!skipTrailingComments && node.kind !== 360 /* NotEmittedStatement */) {
120747
+ if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) {
120781
120748
  emitTrailingComments(end);
120782
120749
  }
120783
120750
  }
@@ -121049,7 +121016,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121049
121016
  }
121050
121017
  } else {
121051
121018
  const source = sourceMapRange.source || sourceMapSource;
121052
- if (node.kind !== 360 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
121019
+ if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
121053
121020
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
121054
121021
  }
121055
121022
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -121064,7 +121031,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121064
121031
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
121065
121032
  sourceMapsDisabled = false;
121066
121033
  }
121067
- if (node.kind !== 360 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
121034
+ if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
121068
121035
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
121069
121036
  }
121070
121037
  }
@@ -124008,9 +123975,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124008
123975
  if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || isJavaScriptFile) {
124009
123976
  collectDynamicImportOrRequireCalls(file);
124010
123977
  }
124011
- if (isJavaScriptFile) {
124012
- collectJsDocImportTypeReferences(file);
124013
- }
124014
123978
  file.imports = imports || emptyArray;
124015
123979
  file.moduleAugmentations = moduleAugmentations || emptyArray;
124016
123980
  file.ambientModuleNames = ambientModules || emptyArray;
@@ -124085,23 +124049,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124085
124049
  }
124086
124050
  }
124087
124051
  }
124088
- function collectJsDocImportTypeReferences(file2) {
124089
- const r = /@importType/g;
124090
- while (r.exec(file2.text) !== null) {
124091
- const node = getNodeAtPosition(file2, r.lastIndex);
124092
- if (isJSDocImportTypeTag(node)) {
124093
- const moduleNameExpr = getExternalModuleName(node);
124094
- if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) {
124095
- setParentRecursive(
124096
- node,
124097
- /*incremental*/
124098
- false
124099
- );
124100
- imports = append(imports, moduleNameExpr);
124101
- }
124102
- }
124103
- }
124104
- }
124105
124052
  function getNodeAtPosition(sourceFile, position) {
124106
124053
  let current = sourceFile;
124107
124054
  const getContainingChild = (child) => {
@@ -134250,7 +134197,7 @@ function symbolEscapedNameNoDefault(symbol) {
134250
134197
  });
134251
134198
  }
134252
134199
  function isModuleSpecifierLike(node) {
134253
- return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || isJSDocImportTypeTag(node.parent) || isRequireCall(
134200
+ return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || isRequireCall(
134254
134201
  node.parent,
134255
134202
  /*requireStringLiteralLikeArgument*/
134256
134203
  false
@@ -140115,8 +140062,7 @@ function doChangeNamespaceToNamed(sourceFile, checker, changes, toConvert, allow
140115
140062
  factory.createIdentifier(name)
140116
140063
  ));
140117
140064
  });
140118
- const importDecl = tryCast(toConvert.parent.parent, isImportDeclaration);
140119
- Debug.assert(importDecl, "Unexpected declaration");
140065
+ const importDecl = toConvert.parent.parent;
140120
140066
  if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports) {
140121
140067
  changes.insertNodeAfter(sourceFile, importDecl, updateImport(
140122
140068
  importDecl,
@@ -140136,10 +140082,7 @@ function getLeftOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) {
140136
140082
  }
140137
140083
  function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConvert, shouldUseDefault = getShouldUseDefault(program, toConvert.parent)) {
140138
140084
  const checker = program.getTypeChecker();
140139
- const importDecl = tryCast(toConvert.parent.parent, isImportDeclaration);
140140
- if (importDecl === void 0) {
140141
- Debug.assert(importDecl, "Unexpected declaration");
140142
- }
140085
+ const importDecl = toConvert.parent.parent;
140143
140086
  const { moduleSpecifier } = importDecl;
140144
140087
  const toConvertSymbols = /* @__PURE__ */ new Set();
140145
140088
  toConvert.elements.forEach((namedImport) => {
@@ -145416,7 +145359,7 @@ var NodeObject = class {
145416
145359
  if (!children.length) {
145417
145360
  return void 0;
145418
145361
  }
145419
- const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 358 /* LastJSDocNode */);
145362
+ const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 357 /* LastJSDocNode */);
145420
145363
  return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
145421
145364
  }
145422
145365
  getLastToken(sourceFile) {
@@ -145483,7 +145426,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) {
145483
145426
  }
145484
145427
  }
145485
145428
  function createSyntaxList(nodes, parent2) {
145486
- const list = createNode(359 /* SyntaxList */, nodes.pos, nodes.end, parent2);
145429
+ const list = createNode(358 /* SyntaxList */, nodes.pos, nodes.end, parent2);
145487
145430
  list._children = [];
145488
145431
  let pos = nodes.pos;
145489
145432
  for (const node of nodes) {
@@ -151083,7 +151026,7 @@ registerCodeFix({
151083
151026
  const declaration = getDeclaration2(context.sourceFile, context.span.start);
151084
151027
  if (declaration) {
151085
151028
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration));
151086
- const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && isImportDeclaration(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0;
151029
+ const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0;
151087
151030
  const mainAction = createCodeFixAction(
151088
151031
  fixId13,
151089
151032
  changes,
@@ -151109,7 +151052,7 @@ registerCodeFix({
151109
151052
  if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) {
151110
151053
  doChange11(changes, diag2.file, errorDeclaration);
151111
151054
  fixedImportDeclarations.add(errorDeclaration);
151112
- } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && isImportDeclaration(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) {
151055
+ } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) {
151113
151056
  doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent);
151114
151057
  fixedImportDeclarations.add(errorDeclaration.parent.parent.parent);
151115
151058
  } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) {
@@ -158317,7 +158260,7 @@ function getInfo19(sourceFile, pos) {
158317
158260
  const { parent: parent2 } = name;
158318
158261
  if (isImportEqualsDeclaration(parent2) && isExternalModuleReference(parent2.moduleReference)) {
158319
158262
  return { importNode: parent2, name, moduleSpecifier: parent2.moduleReference.expression };
158320
- } else if (isNamespaceImport(parent2) && isImportDeclaration(parent2.parent.parent)) {
158263
+ } else if (isNamespaceImport(parent2)) {
158321
158264
  const importNode = parent2.parent.parent;
158322
158265
  return { importNode, name, moduleSpecifier: importNode.moduleSpecifier };
158323
158266
  }
@@ -160793,7 +160736,6 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
160793
160736
  const insideComment = isInComment(sourceFile, position, currentToken);
160794
160737
  log("getCompletionData: Is inside comment: " + (timestamp() - start2));
160795
160738
  let insideJsDocTagTypeExpression = false;
160796
- let insideJsDocImportTypeTag = false;
160797
160739
  let isInSnippetScope = false;
160798
160740
  if (insideComment) {
160799
160741
  if (hasDocComment(sourceFile, position)) {
@@ -160811,28 +160753,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
160811
160753
  if (tag.tagName.pos <= position && position <= tag.tagName.end) {
160812
160754
  return { kind: 1 /* JsDocTagName */ };
160813
160755
  }
160814
- if (isJSDocImportTypeTag(tag)) {
160815
- insideJsDocImportTypeTag = true;
160816
- } else {
160817
- const typeExpression = tryGetTypeExpressionFromTag(tag);
160818
- if (typeExpression) {
160819
- currentToken = getTokenAtPosition(sourceFile, position);
160820
- if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) {
160821
- insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression);
160822
- }
160823
- }
160824
- if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
160825
- return { kind: 3 /* JsDocParameterName */, tag };
160756
+ const typeExpression = tryGetTypeExpressionFromTag(tag);
160757
+ if (typeExpression) {
160758
+ currentToken = getTokenAtPosition(sourceFile, position);
160759
+ if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) {
160760
+ insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression);
160826
160761
  }
160827
160762
  }
160763
+ if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
160764
+ return { kind: 3 /* JsDocParameterName */, tag };
160765
+ }
160828
160766
  }
160829
- if (!insideJsDocTagTypeExpression && !insideJsDocImportTypeTag) {
160767
+ if (!insideJsDocTagTypeExpression) {
160830
160768
  log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
160831
160769
  return void 0;
160832
160770
  }
160833
160771
  }
160834
160772
  start2 = timestamp();
160835
- const isJsOnlyLocation = !insideJsDocTagTypeExpression && !insideJsDocImportTypeTag && isSourceFileJS(sourceFile);
160773
+ const isJsOnlyLocation = !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile);
160836
160774
  const tokens = getRelevantTokens(position, sourceFile);
160837
160775
  const previousToken = tokens.previousToken;
160838
160776
  let contextToken = tokens.contextToken;
@@ -161345,7 +161283,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
161345
161283
  }
161346
161284
  }
161347
161285
  function isTypeOnlyCompletion() {
161348
- return insideJsDocTagTypeExpression || insideJsDocImportTypeTag || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken));
161286
+ return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken));
161349
161287
  }
161350
161288
  function isContextTokenValueLocation(contextToken2) {
161351
161289
  return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */);
@@ -162367,7 +162305,7 @@ function getPropertiesForCompletion(type, checker) {
162367
162305
  }
162368
162306
  function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
162369
162307
  switch (location.kind) {
162370
- case 359 /* SyntaxList */:
162308
+ case 358 /* SyntaxList */:
162371
162309
  return tryCast(location.parent, isObjectTypeDeclaration);
162372
162310
  case 1 /* EndOfFileToken */:
162373
162311
  const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
@@ -162598,13 +162536,13 @@ function getSingleLineReplacementSpanForImportCompletionNode(node) {
162598
162536
  var _a;
162599
162537
  if (!node)
162600
162538
  return void 0;
162601
- const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration, isJSDocImportTypeTag)) ?? node;
162539
+ const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)) ?? node;
162602
162540
  const sourceFile = top.getSourceFile();
162603
162541
  if (rangeIsOnSingleLine(top, sourceFile)) {
162604
162542
  return createTextSpanFromNode(top, sourceFile);
162605
162543
  }
162606
162544
  Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */);
162607
- const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ || top.kind === 358 /* JSDocImportTypeTag */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference;
162545
+ const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference;
162608
162546
  const withoutModuleSpecifier = {
162609
162547
  pos: top.getFirstToken().getStart(),
162610
162548
  end: potentialSplitPoint.pos
@@ -162900,7 +162838,6 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program,
162900
162838
  case 272 /* ImportDeclaration */:
162901
162839
  case 278 /* ExportDeclaration */:
162902
162840
  case 283 /* ExternalModuleReference */:
162903
- case 358 /* JSDocImportTypeTag */:
162904
162841
  return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) };
162905
162842
  case 296 /* CaseClause */:
162906
162843
  const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses);
@@ -163668,7 +163605,6 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, {
163668
163605
  );
163669
163606
  break;
163670
163607
  case 272 /* ImportDeclaration */:
163671
- case 358 /* JSDocImportTypeTag */:
163672
163608
  directImports.push(direct);
163673
163609
  const namedBindings = direct.importClause && direct.importClause.namedBindings;
163674
163610
  if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) {
@@ -167402,7 +167338,6 @@ var jsDocTagNames = [
167402
167338
  "host",
167403
167339
  "ignore",
167404
167340
  "implements",
167405
- "importType",
167406
167341
  "inheritdoc",
167407
167342
  "inner",
167408
167343
  "instance",
@@ -167963,84 +167898,98 @@ function coalesceImportsWorker(importGroup, comparer, sourceFile, preferences) {
167963
167898
  if (importGroup.length === 0) {
167964
167899
  return importGroup;
167965
167900
  }
167966
- const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroup);
167967
- const coalescedImports = [];
167968
- if (importWithoutClause) {
167969
- coalescedImports.push(importWithoutClause);
167970
- }
167971
- for (const group2 of [regularImports, typeOnlyImports]) {
167972
- const isTypeOnly = group2 === typeOnlyImports;
167973
- const { defaultImports, namespaceImports, namedImports } = group2;
167974
- if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
167975
- const defaultImport = defaultImports[0];
167976
- coalescedImports.push(
167977
- updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
167978
- );
167979
- continue;
167980
- }
167981
- const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
167982
- for (const namespaceImport of sortedNamespaceImports) {
167983
- coalescedImports.push(
167984
- updateImportDeclarationAndClause(
167985
- namespaceImport,
167986
- /*name*/
167987
- void 0,
167988
- namespaceImport.importClause.namedBindings
167989
- )
167990
- );
167991
- }
167992
- const firstDefaultImport = firstOrUndefined(defaultImports);
167993
- const firstNamedImport = firstOrUndefined(namedImports);
167994
- const importDecl = firstDefaultImport ?? firstNamedImport;
167995
- if (!importDecl) {
167996
- continue;
167901
+ const importGroupsByAttributes = groupBy(importGroup, (decl) => {
167902
+ if (decl.attributes) {
167903
+ let attrs = decl.attributes.token + " ";
167904
+ for (const x of sort(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) {
167905
+ attrs += x.name.text + ":";
167906
+ attrs += isStringLiteralLike(x.value) ? `"${x.value.text}"` : x.value.getText() + " ";
167907
+ }
167908
+ return attrs;
167997
167909
  }
167998
- let newDefaultImport;
167999
- const newImportSpecifiers = [];
168000
- if (defaultImports.length === 1) {
168001
- newDefaultImport = defaultImports[0].importClause.name;
168002
- } else {
168003
- for (const defaultImport of defaultImports) {
168004
- newImportSpecifiers.push(
168005
- factory.createImportSpecifier(
168006
- /*isTypeOnly*/
168007
- false,
168008
- factory.createIdentifier("default"),
168009
- defaultImport.importClause.name
167910
+ return "";
167911
+ });
167912
+ const coalescedImports = [];
167913
+ for (const attribute in importGroupsByAttributes) {
167914
+ const importGroupSameAttrs = importGroupsByAttributes[attribute];
167915
+ const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroupSameAttrs);
167916
+ if (importWithoutClause) {
167917
+ coalescedImports.push(importWithoutClause);
167918
+ }
167919
+ for (const group2 of [regularImports, typeOnlyImports]) {
167920
+ const isTypeOnly = group2 === typeOnlyImports;
167921
+ const { defaultImports, namespaceImports, namedImports } = group2;
167922
+ if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
167923
+ const defaultImport = defaultImports[0];
167924
+ coalescedImports.push(
167925
+ updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
167926
+ );
167927
+ continue;
167928
+ }
167929
+ const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
167930
+ for (const namespaceImport of sortedNamespaceImports) {
167931
+ coalescedImports.push(
167932
+ updateImportDeclarationAndClause(
167933
+ namespaceImport,
167934
+ /*name*/
167935
+ void 0,
167936
+ namespaceImport.importClause.namedBindings
168010
167937
  )
168011
167938
  );
168012
167939
  }
168013
- }
168014
- newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
168015
- const sortedImportSpecifiers = factory.createNodeArray(
168016
- sortSpecifiers(newImportSpecifiers, comparer, preferences),
168017
- firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma
168018
- );
168019
- const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);
168020
- if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {
168021
- setEmitFlags(newNamedImports, 2 /* MultiLine */);
168022
- }
168023
- if (isTypeOnly && newDefaultImport && newNamedImports) {
168024
- coalescedImports.push(
168025
- updateImportDeclarationAndClause(
168026
- importDecl,
168027
- newDefaultImport,
168028
- /*namedBindings*/
168029
- void 0
168030
- )
168031
- );
168032
- coalescedImports.push(
168033
- updateImportDeclarationAndClause(
168034
- firstNamedImport ?? importDecl,
168035
- /*name*/
168036
- void 0,
168037
- newNamedImports
168038
- )
168039
- );
168040
- } else {
168041
- coalescedImports.push(
168042
- updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
167940
+ const firstDefaultImport = firstOrUndefined(defaultImports);
167941
+ const firstNamedImport = firstOrUndefined(namedImports);
167942
+ const importDecl = firstDefaultImport ?? firstNamedImport;
167943
+ if (!importDecl) {
167944
+ continue;
167945
+ }
167946
+ let newDefaultImport;
167947
+ const newImportSpecifiers = [];
167948
+ if (defaultImports.length === 1) {
167949
+ newDefaultImport = defaultImports[0].importClause.name;
167950
+ } else {
167951
+ for (const defaultImport of defaultImports) {
167952
+ newImportSpecifiers.push(
167953
+ factory.createImportSpecifier(
167954
+ /*isTypeOnly*/
167955
+ false,
167956
+ factory.createIdentifier("default"),
167957
+ defaultImport.importClause.name
167958
+ )
167959
+ );
167960
+ }
167961
+ }
167962
+ newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
167963
+ const sortedImportSpecifiers = factory.createNodeArray(
167964
+ sortSpecifiers(newImportSpecifiers, comparer, preferences),
167965
+ firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma
168043
167966
  );
167967
+ const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);
167968
+ if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {
167969
+ setEmitFlags(newNamedImports, 2 /* MultiLine */);
167970
+ }
167971
+ if (isTypeOnly && newDefaultImport && newNamedImports) {
167972
+ coalescedImports.push(
167973
+ updateImportDeclarationAndClause(
167974
+ importDecl,
167975
+ newDefaultImport,
167976
+ /*namedBindings*/
167977
+ void 0
167978
+ )
167979
+ );
167980
+ coalescedImports.push(
167981
+ updateImportDeclarationAndClause(
167982
+ firstNamedImport ?? importDecl,
167983
+ /*name*/
167984
+ void 0,
167985
+ newNamedImports
167986
+ )
167987
+ );
167988
+ } else {
167989
+ coalescedImports.push(
167990
+ updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
167991
+ );
167992
+ }
168044
167993
  }
168045
167994
  }
168046
167995
  return coalescedImports;
@@ -175888,7 +175837,6 @@ __export(ts_exports2, {
175888
175837
  isJSDocEnumTag: () => isJSDocEnumTag,
175889
175838
  isJSDocFunctionType: () => isJSDocFunctionType,
175890
175839
  isJSDocImplementsTag: () => isJSDocImplementsTag,
175891
- isJSDocImportTypeTag: () => isJSDocImportTypeTag,
175892
175840
  isJSDocIndexSignature: () => isJSDocIndexSignature,
175893
175841
  isJSDocLikeText: () => isJSDocLikeText,
175894
175842
  isJSDocLink: () => isJSDocLink,
@@ -178534,6 +178482,7 @@ var Project3 = class _Project {
178534
178482
  /**
178535
178483
  * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one)
178536
178484
  * This property is changed in 'updateGraph' based on the set of files in program
178485
+ * @internal
178537
178486
  */
178538
178487
  this.projectProgramVersion = 0;
178539
178488
  /**
@@ -178541,6 +178490,7 @@ var Project3 = class _Project {
178541
178490
  * - new root file was added/removed
178542
178491
  * - edit happen in some file that is currently included in the project.
178543
178492
  * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project
178493
+ * @internal
178544
178494
  */
178545
178495
  this.projectStateVersion = 0;
178546
178496
  this.isInitialLoadPending = returnFalse;
@@ -179578,7 +179528,7 @@ var Project3 = class _Project {
179578
179528
  );
179579
179529
  const elapsed = timestamp() - start2;
179580
179530
  this.sendPerformanceEvent("UpdateGraph", elapsed);
179581
- this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} Version: ${this.getProjectVersion()} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`);
179531
+ this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`);
179582
179532
  if (this.projectService.logger.isTestLogger) {
179583
179533
  if (this.program !== oldProgram) {
179584
179534
  this.print(
@@ -179741,6 +179691,7 @@ var Project3 = class _Project {
179741
179691
  }
179742
179692
  /** @internal */
179743
179693
  print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {
179694
+ var _a;
179744
179695
  this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`);
179745
179696
  this.writeLog(this.filesToStringWorker(
179746
179697
  writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */),
@@ -179758,6 +179709,14 @@ var Project3 = class _Project {
179758
179709
  false
179759
179710
  );
179760
179711
  }
179712
+ (_a = this.noDtsResolutionProject) == null ? void 0 : _a.print(
179713
+ /*writeProjectFileNames*/
179714
+ false,
179715
+ /*writeFileExplaination*/
179716
+ false,
179717
+ /*writeFileVersionAndText*/
179718
+ false
179719
+ );
179761
179720
  }
179762
179721
  setCompilerOptions(compilerOptions) {
179763
179722
  var _a;
@@ -181198,6 +181157,8 @@ var _ProjectService = class _ProjectService {
181198
181157
  /** @internal */
181199
181158
  this.extendedConfigCache = /* @__PURE__ */ new Map();
181200
181159
  /** @internal */
181160
+ this.baseline = noop;
181161
+ /** @internal */
181201
181162
  this.verifyDocumentRegistry = noop;
181202
181163
  /** @internal */
181203
181164
  this.verifyProgram = noop;
@@ -183187,6 +183148,8 @@ Dynamic files must always be opened with service's current directory or service
183187
183148
  });
183188
183149
  this.inferredProjects.forEach((project) => this.clearSemanticCache(project));
183189
183150
  this.ensureProjectForOpenFiles();
183151
+ this.logger.info("After reloading projects..");
183152
+ this.printProjects();
183190
183153
  }
183191
183154
  /**
183192
183155
  * This function goes through all the openFiles and tries to file the config file for them.
@@ -183712,7 +183675,7 @@ Dynamic files must always be opened with service's current directory or service
183712
183675
  }
183713
183676
  }
183714
183677
  }
183715
- closeExternalProject(uncheckedFileName) {
183678
+ closeExternalProject(uncheckedFileName, print) {
183716
183679
  const fileName = toNormalizedPath(uncheckedFileName);
183717
183680
  const configFiles = this.externalProjectToConfiguredProjectMap.get(fileName);
183718
183681
  if (configFiles) {
@@ -183726,6 +183689,8 @@ Dynamic files must always be opened with service's current directory or service
183726
183689
  this.removeProject(externalProject);
183727
183690
  }
183728
183691
  }
183692
+ if (print)
183693
+ this.printProjects();
183729
183694
  }
183730
183695
  openExternalProjects(projects) {
183731
183696
  const projectsToClose = arrayToMap(this.externalProjects, (p) => p.getProjectName(), (_) => true);
@@ -183733,12 +183698,21 @@ Dynamic files must always be opened with service's current directory or service
183733
183698
  projectsToClose.set(externalProjectName, true);
183734
183699
  });
183735
183700
  for (const externalProject of projects) {
183736
- this.openExternalProject(externalProject);
183701
+ this.openExternalProject(
183702
+ externalProject,
183703
+ /*print*/
183704
+ false
183705
+ );
183737
183706
  projectsToClose.delete(externalProject.projectFileName);
183738
183707
  }
183739
183708
  forEachKey(projectsToClose, (externalProjectName) => {
183740
- this.closeExternalProject(externalProjectName);
183709
+ this.closeExternalProject(
183710
+ externalProjectName,
183711
+ /*print*/
183712
+ false
183713
+ );
183741
183714
  });
183715
+ this.printProjects();
183742
183716
  }
183743
183717
  static escapeFilenameForRegex(filename) {
183744
183718
  return filename.replace(this.filenameEscapeRegexp, "\\$&");
@@ -183831,7 +183805,7 @@ Dynamic files must always be opened with service's current directory or service
183831
183805
  proj.rootFiles = filesToKeep;
183832
183806
  return excludedFiles;
183833
183807
  }
183834
- openExternalProject(proj) {
183808
+ openExternalProject(proj, print) {
183835
183809
  proj.typeAcquisition = proj.typeAcquisition || {};
183836
183810
  proj.typeAcquisition.include = proj.typeAcquisition.include || [];
183837
183811
  proj.typeAcquisition.exclude = proj.typeAcquisition.exclude || [];
@@ -183870,12 +183844,22 @@ Dynamic files must always be opened with service's current directory or service
183870
183844
  externalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);
183871
183845
  this.updateRootAndOptionsOfNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions);
183872
183846
  externalProject.updateGraph();
183847
+ if (print)
183848
+ this.printProjects();
183873
183849
  return;
183874
183850
  }
183875
- this.closeExternalProject(proj.projectFileName);
183851
+ this.closeExternalProject(
183852
+ proj.projectFileName,
183853
+ /*print*/
183854
+ false
183855
+ );
183876
183856
  } else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) {
183877
183857
  if (!tsConfigFiles) {
183878
- this.closeExternalProject(proj.projectFileName);
183858
+ this.closeExternalProject(
183859
+ proj.projectFileName,
183860
+ /*print*/
183861
+ false
183862
+ );
183879
183863
  } else {
183880
183864
  const oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
183881
183865
  let iNew = 0;
@@ -183915,6 +183899,8 @@ Dynamic files must always be opened with service's current directory or service
183915
183899
  const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition, excludedFiles);
183916
183900
  project.updateGraph();
183917
183901
  }
183902
+ if (print)
183903
+ this.printProjects();
183918
183904
  }
183919
183905
  hasDeferredExtension() {
183920
183906
  for (const extension of this.hostConfiguration.extraFileExtensions) {
@@ -184841,7 +184827,11 @@ var Session3 = class _Session {
184841
184827
  return this.requiredResponse(response);
184842
184828
  },
184843
184829
  ["openExternalProject" /* OpenExternalProject */]: (request) => {
184844
- this.projectService.openExternalProject(request.arguments);
184830
+ this.projectService.openExternalProject(
184831
+ request.arguments,
184832
+ /*print*/
184833
+ true
184834
+ );
184845
184835
  return this.requiredResponse(
184846
184836
  /*response*/
184847
184837
  true
@@ -184855,7 +184845,11 @@ var Session3 = class _Session {
184855
184845
  );
184856
184846
  },
184857
184847
  ["closeExternalProject" /* CloseExternalProject */]: (request) => {
184858
- this.projectService.closeExternalProject(request.arguments.projectFileName);
184848
+ this.projectService.closeExternalProject(
184849
+ request.arguments.projectFileName,
184850
+ /*print*/
184851
+ true
184852
+ );
184859
184853
  return this.requiredResponse(
184860
184854
  /*response*/
184861
184855
  true
@@ -190696,7 +190690,6 @@ start(initializeNodeSystem(), require("os").platform());
190696
190690
  isJSDocEnumTag,
190697
190691
  isJSDocFunctionType,
190698
190692
  isJSDocImplementsTag,
190699
- isJSDocImportTypeTag,
190700
190693
  isJSDocIndexSignature,
190701
190694
  isJSDocLikeText,
190702
190695
  isJSDocLink,