@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/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.4";
38
- version = `${versionMajorMinor}.0-insiders.20240131`;
38
+ version = `${versionMajorMinor}.0-insiders.20240205`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3863,13 +3863,12 @@ ${lanes.join("\n")}
3863
3863
  SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 355] = "JSDocPropertyTag";
3864
3864
  SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 356] = "JSDocThrowsTag";
3865
3865
  SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag";
3866
- SyntaxKind5[SyntaxKind5["JSDocImportTypeTag"] = 358] = "JSDocImportTypeTag";
3867
- SyntaxKind5[SyntaxKind5["SyntaxList"] = 359] = "SyntaxList";
3868
- SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 360] = "NotEmittedStatement";
3869
- SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 361] = "PartiallyEmittedExpression";
3870
- SyntaxKind5[SyntaxKind5["CommaListExpression"] = 362] = "CommaListExpression";
3871
- SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression";
3872
- SyntaxKind5[SyntaxKind5["Count"] = 364] = "Count";
3866
+ SyntaxKind5[SyntaxKind5["SyntaxList"] = 358] = "SyntaxList";
3867
+ SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 359] = "NotEmittedStatement";
3868
+ SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression";
3869
+ SyntaxKind5[SyntaxKind5["CommaListExpression"] = 361] = "CommaListExpression";
3870
+ SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression";
3871
+ SyntaxKind5[SyntaxKind5["Count"] = 363] = "Count";
3873
3872
  SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment";
3874
3873
  SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment";
3875
3874
  SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -3898,9 +3897,9 @@ ${lanes.join("\n")}
3898
3897
  SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement";
3899
3898
  SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode";
3900
3899
  SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode";
3901
- SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 358 /* JSDocImportTypeTag */] = "LastJSDocNode";
3900
+ SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode";
3902
3901
  SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode";
3903
- SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 358 /* JSDocImportTypeTag */] = "LastJSDocTagNode";
3902
+ SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode";
3904
3903
  SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword";
3905
3904
  SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword";
3906
3905
  return SyntaxKind5;
@@ -8261,7 +8260,6 @@ ${lanes.join("\n")}
8261
8260
  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."),
8262
8261
  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."),
8263
8262
  Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
8264
- 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."),
8265
8263
  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}."),
8266
8264
  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."),
8267
8265
  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"),
@@ -12591,8 +12589,8 @@ ${lanes.join("\n")}
12591
12589
  case 230 /* SpreadElement */:
12592
12590
  case 234 /* AsExpression */:
12593
12591
  case 232 /* OmittedExpression */:
12594
- case 362 /* CommaListExpression */:
12595
- case 361 /* PartiallyEmittedExpression */:
12592
+ case 361 /* CommaListExpression */:
12593
+ case 360 /* PartiallyEmittedExpression */:
12596
12594
  case 238 /* SatisfiesExpression */:
12597
12595
  return true;
12598
12596
  default:
@@ -12777,7 +12775,7 @@ ${lanes.join("\n")}
12777
12775
  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 */;
12778
12776
  }
12779
12777
  function isStatementKindButNotDeclarationKind(kind) {
12780
- 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 */;
12778
+ 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 */;
12781
12779
  }
12782
12780
  function isDeclaration(node) {
12783
12781
  if (node.kind === 168 /* TypeParameter */) {
@@ -12838,13 +12836,13 @@ ${lanes.join("\n")}
12838
12836
  return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */;
12839
12837
  }
12840
12838
  function isJSDocNode(node) {
12841
- return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 358 /* LastJSDocNode */;
12839
+ return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */;
12842
12840
  }
12843
12841
  function isJSDocCommentContainingNode(node) {
12844
12842
  return node.kind === 327 /* JSDoc */ || node.kind === 326 /* JSDocNamepathType */ || node.kind === 328 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
12845
12843
  }
12846
12844
  function isJSDocTag(node) {
12847
- return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 358 /* LastJSDocTagNode */;
12845
+ return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */;
12848
12846
  }
12849
12847
  function isSetAccessor(node) {
12850
12848
  return node.kind === 178 /* SetAccessor */;
@@ -13346,7 +13344,7 @@ ${lanes.join("\n")}
13346
13344
  if (includeJsDoc && hasJSDocNodes(node)) {
13347
13345
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
13348
13346
  }
13349
- if (node.kind === 359 /* SyntaxList */ && node._children.length > 0) {
13347
+ if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) {
13350
13348
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
13351
13349
  }
13352
13350
  return skipTrivia(
@@ -14972,7 +14970,6 @@ ${lanes.join("\n")}
14972
14970
  ))) == null ? void 0 : _a.arguments[0];
14973
14971
  case 272 /* ImportDeclaration */:
14974
14972
  case 278 /* ExportDeclaration */:
14975
- case 358 /* JSDocImportTypeTag */:
14976
14973
  return tryCast(node.moduleSpecifier, isStringLiteralLike);
14977
14974
  case 271 /* ImportEqualsDeclaration */:
14978
14975
  return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike);
@@ -14997,7 +14994,6 @@ ${lanes.join("\n")}
14997
14994
  switch (node.parent.kind) {
14998
14995
  case 272 /* ImportDeclaration */:
14999
14996
  case 278 /* ExportDeclaration */:
15000
- case 358 /* JSDocImportTypeTag */:
15001
14997
  return node.parent;
15002
14998
  case 283 /* ExternalModuleReference */:
15003
14999
  return node.parent.parent;
@@ -15018,7 +15014,6 @@ ${lanes.join("\n")}
15018
15014
  switch (node.kind) {
15019
15015
  case 272 /* ImportDeclaration */:
15020
15016
  case 278 /* ExportDeclaration */:
15021
- case 358 /* JSDocImportTypeTag */:
15022
15017
  return node.moduleSpecifier;
15023
15018
  case 271 /* ImportEqualsDeclaration */:
15024
15019
  return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0;
@@ -15888,7 +15883,7 @@ ${lanes.join("\n")}
15888
15883
  }
15889
15884
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
15890
15885
  switch (nodeKind) {
15891
- case 362 /* CommaListExpression */:
15886
+ case 361 /* CommaListExpression */:
15892
15887
  return 0 /* Comma */;
15893
15888
  case 230 /* SpreadElement */:
15894
15889
  return 1 /* Spread */;
@@ -17566,7 +17561,7 @@ ${lanes.join("\n")}
17566
17561
  case 212 /* ElementAccessExpression */:
17567
17562
  case 211 /* PropertyAccessExpression */:
17568
17563
  case 235 /* NonNullExpression */:
17569
- case 361 /* PartiallyEmittedExpression */:
17564
+ case 360 /* PartiallyEmittedExpression */:
17570
17565
  case 238 /* SatisfiesExpression */:
17571
17566
  node = node.expression;
17572
17567
  continue;
@@ -18709,7 +18704,7 @@ ${lanes.join("\n")}
18709
18704
  return parent2.types;
18710
18705
  case 189 /* TupleType */:
18711
18706
  case 209 /* ArrayLiteralExpression */:
18712
- case 362 /* CommaListExpression */:
18707
+ case 361 /* CommaListExpression */:
18713
18708
  case 275 /* NamedImports */:
18714
18709
  case 279 /* NamedExports */:
18715
18710
  return parent2.elements;
@@ -20726,8 +20721,6 @@ ${lanes.join("\n")}
20726
20721
  updateJSDocImplementsTag,
20727
20722
  createJSDocSeeTag,
20728
20723
  updateJSDocSeeTag,
20729
- createJSDocImportTypeTag,
20730
- updateJSDocImportTypeTag,
20731
20724
  createJSDocNameReference,
20732
20725
  updateJSDocNameReference,
20733
20726
  createJSDocMemberName,
@@ -23506,16 +23499,6 @@ ${lanes.join("\n")}
23506
23499
  function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) {
23507
23500
  return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node;
23508
23501
  }
23509
- function createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment) {
23510
- const node = createBaseJSDocTag(358 /* JSDocImportTypeTag */, tagName ?? createIdentifier("importType"), comment);
23511
- node.importClause = importClause;
23512
- node.moduleSpecifier = moduleSpecifier;
23513
- node.comment = comment;
23514
- return node;
23515
- }
23516
- function updateJSDocImportTypeTag(node, tagName, importClause, moduleSpecifier, comment) {
23517
- return node.tagName !== tagName || node.comment !== comment || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier ? update(createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comment), node) : node;
23518
- }
23519
23502
  function createJSDocText(text) {
23520
23503
  const node = createBaseNode(328 /* JSDocText */);
23521
23504
  node.text = text;
@@ -23954,18 +23937,18 @@ ${lanes.join("\n")}
23954
23937
  return node;
23955
23938
  }
23956
23939
  function createSyntaxList3(children) {
23957
- const node = createBaseNode(359 /* SyntaxList */);
23940
+ const node = createBaseNode(358 /* SyntaxList */);
23958
23941
  node._children = children;
23959
23942
  return node;
23960
23943
  }
23961
23944
  function createNotEmittedStatement(original) {
23962
- const node = createBaseNode(360 /* NotEmittedStatement */);
23945
+ const node = createBaseNode(359 /* NotEmittedStatement */);
23963
23946
  node.original = original;
23964
23947
  setTextRange(node, original);
23965
23948
  return node;
23966
23949
  }
23967
23950
  function createPartiallyEmittedExpression(expression, original) {
23968
- const node = createBaseNode(361 /* PartiallyEmittedExpression */);
23951
+ const node = createBaseNode(360 /* PartiallyEmittedExpression */);
23969
23952
  node.expression = expression;
23970
23953
  node.original = original;
23971
23954
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -23987,7 +23970,7 @@ ${lanes.join("\n")}
23987
23970
  return node;
23988
23971
  }
23989
23972
  function createCommaListExpression(elements) {
23990
- const node = createBaseNode(362 /* CommaListExpression */);
23973
+ const node = createBaseNode(361 /* CommaListExpression */);
23991
23974
  node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements));
23992
23975
  node.transformFlags |= propagateChildrenFlags(node.elements);
23993
23976
  return node;
@@ -23996,7 +23979,7 @@ ${lanes.join("\n")}
23996
23979
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
23997
23980
  }
23998
23981
  function createSyntheticReferenceExpression(expression, thisArg) {
23999
- const node = createBaseNode(363 /* SyntheticReferenceExpression */);
23982
+ const node = createBaseNode(362 /* SyntheticReferenceExpression */);
24000
23983
  node.expression = expression;
24001
23984
  node.thisArg = thisArg;
24002
23985
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -24242,7 +24225,7 @@ ${lanes.join("\n")}
24242
24225
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
24243
24226
  case 235 /* NonNullExpression */:
24244
24227
  return updateNonNullExpression(outerExpression, expression);
24245
- case 361 /* PartiallyEmittedExpression */:
24228
+ case 360 /* PartiallyEmittedExpression */:
24246
24229
  return updatePartiallyEmittedExpression(outerExpression, expression);
24247
24230
  }
24248
24231
  }
@@ -24652,8 +24635,6 @@ ${lanes.join("\n")}
24652
24635
  return "augments";
24653
24636
  case 336 /* JSDocImplementsTag */:
24654
24637
  return "implements";
24655
- case 358 /* JSDocImportTypeTag */:
24656
- return "importType";
24657
24638
  default:
24658
24639
  return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`);
24659
24640
  }
@@ -24792,7 +24773,7 @@ ${lanes.join("\n")}
24792
24773
  case 216 /* TypeAssertionExpression */:
24793
24774
  case 238 /* SatisfiesExpression */:
24794
24775
  case 234 /* AsExpression */:
24795
- case 361 /* PartiallyEmittedExpression */:
24776
+ case 360 /* PartiallyEmittedExpression */:
24796
24777
  case 217 /* ParenthesizedExpression */:
24797
24778
  case 108 /* SuperKeyword */:
24798
24779
  return -2147483648 /* OuterExpressionExcludes */;
@@ -26820,10 +26801,10 @@ ${lanes.join("\n")}
26820
26801
  return node.kind === 237 /* SyntheticExpression */;
26821
26802
  }
26822
26803
  function isPartiallyEmittedExpression(node) {
26823
- return node.kind === 361 /* PartiallyEmittedExpression */;
26804
+ return node.kind === 360 /* PartiallyEmittedExpression */;
26824
26805
  }
26825
26806
  function isCommaListExpression(node) {
26826
- return node.kind === 362 /* CommaListExpression */;
26807
+ return node.kind === 361 /* CommaListExpression */;
26827
26808
  }
26828
26809
  function isTemplateSpan(node) {
26829
26810
  return node.kind === 239 /* TemplateSpan */;
@@ -26973,10 +26954,10 @@ ${lanes.join("\n")}
26973
26954
  return node.kind === 282 /* MissingDeclaration */;
26974
26955
  }
26975
26956
  function isNotEmittedStatement(node) {
26976
- return node.kind === 360 /* NotEmittedStatement */;
26957
+ return node.kind === 359 /* NotEmittedStatement */;
26977
26958
  }
26978
26959
  function isSyntheticReference(node) {
26979
- return node.kind === 363 /* SyntheticReferenceExpression */;
26960
+ return node.kind === 362 /* SyntheticReferenceExpression */;
26980
26961
  }
26981
26962
  function isExternalModuleReference(node) {
26982
26963
  return node.kind === 283 /* ExternalModuleReference */;
@@ -27176,11 +27157,8 @@ ${lanes.join("\n")}
27176
27157
  function isJSDocThrowsTag(node) {
27177
27158
  return node.kind === 356 /* JSDocThrowsTag */;
27178
27159
  }
27179
- function isJSDocImportTypeTag(node) {
27180
- return node.kind === 358 /* JSDocImportTypeTag */;
27181
- }
27182
27160
  function isSyntaxList(n) {
27183
- return n.kind === 359 /* SyntaxList */;
27161
+ return n.kind === 358 /* SyntaxList */;
27184
27162
  }
27185
27163
  var init_nodeTests = __esm({
27186
27164
  "src/compiler/factory/nodeTests.ts"() {
@@ -27581,7 +27559,7 @@ ${lanes.join("\n")}
27581
27559
  return (kinds & 2 /* TypeAssertions */) !== 0;
27582
27560
  case 235 /* NonNullExpression */:
27583
27561
  return (kinds & 4 /* NonNullAssertions */) !== 0;
27584
- case 361 /* PartiallyEmittedExpression */:
27562
+ case 360 /* PartiallyEmittedExpression */:
27585
27563
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
27586
27564
  }
27587
27565
  return false;
@@ -28393,9 +28371,6 @@ ${lanes.join("\n")}
28393
28371
  function forEachChildInJSDocTag(node, cbNode, cbNodes) {
28394
28372
  return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
28395
28373
  }
28396
- function forEachChildInJSDocImportTypeTag(node, cbNode, cbNodes) {
28397
- return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
28398
- }
28399
28374
  function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) {
28400
28375
  return visitNode2(cbNode, node.expression);
28401
28376
  }
@@ -29104,7 +29079,7 @@ ${lanes.join("\n")}
29104
29079
  [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
29105
29080
  return visitNodes(cbNode, cbNodes, node.modifiers);
29106
29081
  },
29107
- [362 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
29082
+ [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
29108
29083
  return visitNodes(cbNode, cbNodes, node.elements);
29109
29084
  },
29110
29085
  [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -29199,8 +29174,7 @@ ${lanes.join("\n")}
29199
29174
  [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
29200
29175
  [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
29201
29176
  [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
29202
- [358 /* JSDocImportTypeTag */]: forEachChildInJSDocImportTypeTag,
29203
- [361 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
29177
+ [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
29204
29178
  };
29205
29179
  ((Parser2) => {
29206
29180
  var scanner2 = createScanner(
@@ -35315,9 +35289,6 @@ ${lanes.join("\n")}
35315
35289
  case "throws":
35316
35290
  tag = parseThrowsTag(start2, tagName, margin, indentText);
35317
35291
  break;
35318
- case "importType":
35319
- tag = parseImportTypeTag(start2, tagName, margin, indentText);
35320
- break;
35321
35292
  default:
35322
35293
  tag = parseUnknownTag(start2, tagName, margin, indentText);
35323
35294
  break;
@@ -35637,27 +35608,6 @@ ${lanes.join("\n")}
35637
35608
  const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
35638
35609
  return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2);
35639
35610
  }
35640
- function parseImportTypeTag(start2, tagName, margin, indentText) {
35641
- const afterImportTypeTagPos = scanner2.getTokenFullStart();
35642
- let identifier;
35643
- if (isIdentifier2()) {
35644
- identifier = parseIdentifier();
35645
- }
35646
- let importClause;
35647
- if (identifier || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */) {
35648
- importClause = parseImportClause(
35649
- identifier,
35650
- afterImportTypeTagPos,
35651
- /*isTypeOnly*/
35652
- true
35653
- );
35654
- parseExpected(161 /* FromKeyword */);
35655
- }
35656
- Debug.assert(importClause);
35657
- const moduleSpecifier = parseModuleSpecifier();
35658
- const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0;
35659
- return finishNode(factory2.createJSDocImportTypeTag(tagName, importClause, moduleSpecifier, comments2), start2);
35660
- }
35661
35611
  function parseExpressionWithTypeArgumentsForAugments() {
35662
35612
  const usedBrace = parseOptional(19 /* OpenBraceToken */);
35663
35613
  const pos = getNodePos();
@@ -41274,15 +41224,9 @@ ${lanes.join("\n")}
41274
41224
  }
41275
41225
  }
41276
41226
  const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
41277
- const fromFile = tryFile(candidate2, onlyRecordFailures2, state2);
41227
+ const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2);
41278
41228
  if (fromFile) {
41279
- const resolved = resolvedIfExtensionMatches(extensions2, fromFile);
41280
- if (resolved) {
41281
- return noPackageId(resolved);
41282
- }
41283
- if (state2.traceEnabled) {
41284
- trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
41285
- }
41229
+ return noPackageId(fromFile);
41286
41230
  }
41287
41231
  const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
41288
41232
  const features = state2.features;
@@ -41338,10 +41282,6 @@ ${lanes.join("\n")}
41338
41282
  return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
41339
41283
  }
41340
41284
  }
41341
- function resolvedIfExtensionMatches(extensions, path, resolvedUsingTsExtension) {
41342
- const ext = tryGetExtensionFromPath2(path);
41343
- return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext, resolvedUsingTsExtension } : void 0;
41344
- }
41345
41285
  function extensionIsOk(extensions, extension) {
41346
41286
  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;
41347
41287
  }
@@ -49459,7 +49399,7 @@ ${lanes.join("\n")}
49459
49399
  return ambientModule;
49460
49400
  }
49461
49401
  const currentSourceFile = getSourceFileOfNode(location);
49462
- 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(
49402
+ 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(
49463
49403
  location.initializer,
49464
49404
  /*requireStringLiteralLikeArgument*/
49465
49405
  true
@@ -53760,7 +53700,6 @@ ${lanes.join("\n")}
53760
53700
  case 273 /* ImportClause */: {
53761
53701
  const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
53762
53702
  const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier;
53763
- const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;
53764
53703
  addResult(
53765
53704
  factory.createImportDeclaration(
53766
53705
  /*modifiers*/
@@ -53773,7 +53712,7 @@ ${lanes.join("\n")}
53773
53712
  void 0
53774
53713
  ),
53775
53714
  specifier2,
53776
- attributes
53715
+ node.parent.attributes
53777
53716
  ),
53778
53717
  0 /* None */
53779
53718
  );
@@ -53782,7 +53721,6 @@ ${lanes.join("\n")}
53782
53721
  case 274 /* NamespaceImport */: {
53783
53722
  const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
53784
53723
  const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier;
53785
- const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0;
53786
53724
  addResult(
53787
53725
  factory.createImportDeclaration(
53788
53726
  /*modifiers*/
@@ -53795,7 +53733,7 @@ ${lanes.join("\n")}
53795
53733
  factory.createNamespaceImport(factory.createIdentifier(localName))
53796
53734
  ),
53797
53735
  specifier2,
53798
- attributes
53736
+ node.parent.attributes
53799
53737
  ),
53800
53738
  0 /* None */
53801
53739
  );
@@ -53817,7 +53755,6 @@ ${lanes.join("\n")}
53817
53755
  case 276 /* ImportSpecifier */: {
53818
53756
  const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context);
53819
53757
  const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier;
53820
- const attributes = isImportDeclaration(node.parent.parent.parent) ? node.parent.parent.parent.attributes : void 0;
53821
53758
  addResult(
53822
53759
  factory.createImportDeclaration(
53823
53760
  /*modifiers*/
@@ -53837,7 +53774,7 @@ ${lanes.join("\n")}
53837
53774
  ])
53838
53775
  ),
53839
53776
  specifier2,
53840
- attributes
53777
+ node.parent.parent.parent.attributes
53841
53778
  ),
53842
53779
  0 /* None */
53843
53780
  );
@@ -85098,7 +85035,7 @@ ${lanes.join("\n")}
85098
85035
  return void 0;
85099
85036
  case 11 /* StringLiteral */:
85100
85037
  case 15 /* NoSubstitutionTemplateLiteral */:
85101
- 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(
85038
+ 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(
85102
85039
  node.parent,
85103
85040
  /*requireStringLiteralLikeArgument*/
85104
85041
  false
@@ -85648,7 +85585,7 @@ ${lanes.join("\n")}
85648
85585
  true,
85649
85586
  location
85650
85587
  );
85651
- const resolvedSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
85588
+ const resolvedValueSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol;
85652
85589
  isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */)));
85653
85590
  const typeSymbol = resolveEntityName(
85654
85591
  typeName,
@@ -85656,26 +85593,30 @@ ${lanes.join("\n")}
85656
85593
  /*ignoreErrors*/
85657
85594
  true,
85658
85595
  /*dontResolveAlias*/
85659
- false,
85596
+ true,
85660
85597
  location
85661
85598
  );
85662
- if (resolvedSymbol && resolvedSymbol === typeSymbol) {
85599
+ const resolvedTypeSymbol = typeSymbol && typeSymbol.flags & 2097152 /* Alias */ ? resolveAlias(typeSymbol) : typeSymbol;
85600
+ if (!valueSymbol) {
85601
+ isTypeOnly || (isTypeOnly = !!(typeSymbol && getTypeOnlyAliasDeclaration(typeSymbol, 788968 /* Type */)));
85602
+ }
85603
+ if (resolvedValueSymbol && resolvedValueSymbol === resolvedTypeSymbol) {
85663
85604
  const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(
85664
85605
  /*reportErrors*/
85665
85606
  false
85666
85607
  );
85667
- if (globalPromiseSymbol && resolvedSymbol === globalPromiseSymbol) {
85608
+ if (globalPromiseSymbol && resolvedValueSymbol === globalPromiseSymbol) {
85668
85609
  return 9 /* Promise */;
85669
85610
  }
85670
- const constructorType = getTypeOfSymbol(resolvedSymbol);
85611
+ const constructorType = getTypeOfSymbol(resolvedValueSymbol);
85671
85612
  if (constructorType && isConstructorType(constructorType)) {
85672
85613
  return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */;
85673
85614
  }
85674
85615
  }
85675
- if (!typeSymbol) {
85616
+ if (!resolvedTypeSymbol) {
85676
85617
  return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
85677
85618
  }
85678
- const type = getDeclaredTypeOfSymbol(typeSymbol);
85619
+ const type = getDeclaredTypeOfSymbol(resolvedTypeSymbol);
85679
85620
  if (isErrorType(type)) {
85680
85621
  return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */;
85681
85622
  } else if (type.flags & 3 /* AnyOrUnknown */) {
@@ -89476,13 +89417,13 @@ ${lanes.join("\n")}
89476
89417
  );
89477
89418
  },
89478
89419
  // Transformation nodes
89479
- [361 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
89420
+ [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
89480
89421
  return context.factory.updatePartiallyEmittedExpression(
89481
89422
  node,
89482
89423
  Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression))
89483
89424
  );
89484
89425
  },
89485
- [362 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
89426
+ [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
89486
89427
  return context.factory.updateCommaListExpression(
89487
89428
  node,
89488
89429
  nodesVisitor(node.elements, visitor, isExpression)
@@ -91497,9 +91438,50 @@ ${lanes.join("\n")}
91497
91438
  return visitorWorker(node);
91498
91439
  }
91499
91440
  }
91500
- function visitElidableStatement(node) {
91441
+ function isElisionBlocked(node) {
91501
91442
  const parsed = getParseTreeNode(node);
91502
- if (parsed !== node) {
91443
+ if (parsed === node || isExportAssignment(node)) {
91444
+ return false;
91445
+ }
91446
+ if (!parsed || parsed.kind !== node.kind) {
91447
+ return true;
91448
+ }
91449
+ switch (node.kind) {
91450
+ case 272 /* ImportDeclaration */:
91451
+ Debug.assertNode(parsed, isImportDeclaration);
91452
+ if (node.importClause !== parsed.importClause) {
91453
+ return true;
91454
+ }
91455
+ if (node.attributes !== parsed.attributes) {
91456
+ return true;
91457
+ }
91458
+ break;
91459
+ case 271 /* ImportEqualsDeclaration */:
91460
+ Debug.assertNode(parsed, isImportEqualsDeclaration);
91461
+ if (node.name !== parsed.name) {
91462
+ return true;
91463
+ }
91464
+ if (node.isTypeOnly !== parsed.isTypeOnly) {
91465
+ return true;
91466
+ }
91467
+ if (node.moduleReference !== parsed.moduleReference && (isEntityName(node.moduleReference) || isEntityName(parsed.moduleReference))) {
91468
+ return true;
91469
+ }
91470
+ break;
91471
+ case 278 /* ExportDeclaration */:
91472
+ Debug.assertNode(parsed, isExportDeclaration);
91473
+ if (node.exportClause !== parsed.exportClause) {
91474
+ return true;
91475
+ }
91476
+ if (node.attributes !== parsed.attributes) {
91477
+ return true;
91478
+ }
91479
+ break;
91480
+ }
91481
+ return false;
91482
+ }
91483
+ function visitElidableStatement(node) {
91484
+ if (isElisionBlocked(node)) {
91503
91485
  if (node.transformFlags & 1 /* ContainsTypeScript */) {
91504
91486
  return visitEachChild(node, visitor, context);
91505
91487
  }
@@ -93352,7 +93334,7 @@ ${lanes.join("\n")}
93352
93334
  /*discarded*/
93353
93335
  true
93354
93336
  );
93355
- case 362 /* CommaListExpression */:
93337
+ case 361 /* CommaListExpression */:
93356
93338
  return visitCommaListExpression(
93357
93339
  node,
93358
93340
  /*discarded*/
@@ -96463,7 +96445,7 @@ ${lanes.join("\n")}
96463
96445
  return visitForStatement(node);
96464
96446
  case 244 /* ExpressionStatement */:
96465
96447
  return visitExpressionStatement(node);
96466
- case 362 /* CommaListExpression */:
96448
+ case 361 /* CommaListExpression */:
96467
96449
  return visitCommaListExpression(
96468
96450
  node,
96469
96451
  /*discarded*/
@@ -96475,7 +96457,7 @@ ${lanes.join("\n")}
96475
96457
  /*discarded*/
96476
96458
  false
96477
96459
  );
96478
- case 361 /* PartiallyEmittedExpression */:
96460
+ case 360 /* PartiallyEmittedExpression */:
96479
96461
  return visitPartiallyEmittedExpression(
96480
96462
  node,
96481
96463
  /*discarded*/
@@ -96561,7 +96543,7 @@ ${lanes.join("\n")}
96561
96543
  /*discarded*/
96562
96544
  true
96563
96545
  );
96564
- case 362 /* CommaListExpression */:
96546
+ case 361 /* CommaListExpression */:
96565
96547
  return visitCommaListExpression(
96566
96548
  node,
96567
96549
  /*discarded*/
@@ -99164,7 +99146,7 @@ ${lanes.join("\n")}
99164
99146
  return visitObjectLiteralExpression(node);
99165
99147
  case 226 /* BinaryExpression */:
99166
99148
  return visitBinaryExpression(node, expressionResultIsUnused2);
99167
- case 362 /* CommaListExpression */:
99149
+ case 361 /* CommaListExpression */:
99168
99150
  return visitCommaListExpression(node, expressionResultIsUnused2);
99169
99151
  case 299 /* CatchClause */:
99170
99152
  return visitCatchClause(node);
@@ -102430,7 +102412,7 @@ ${lanes.join("\n")}
102430
102412
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
102431
102413
  case 226 /* BinaryExpression */:
102432
102414
  return visitBinaryExpression(node, expressionResultIsUnused2);
102433
- case 362 /* CommaListExpression */:
102415
+ case 361 /* CommaListExpression */:
102434
102416
  return visitCommaListExpression(node, expressionResultIsUnused2);
102435
102417
  case 15 /* NoSubstitutionTemplateLiteral */:
102436
102418
  case 16 /* TemplateHead */:
@@ -105808,7 +105790,7 @@ ${lanes.join("\n")}
105808
105790
  switch (node.kind) {
105809
105791
  case 226 /* BinaryExpression */:
105810
105792
  return visitBinaryExpression(node);
105811
- case 362 /* CommaListExpression */:
105793
+ case 361 /* CommaListExpression */:
105812
105794
  return visitCommaListExpression(node);
105813
105795
  case 227 /* ConditionalExpression */:
105814
105796
  return visitConditionalExpression(node);
@@ -108194,7 +108176,7 @@ ${lanes.join("\n")}
108194
108176
  return visitExpressionStatement(node);
108195
108177
  case 217 /* ParenthesizedExpression */:
108196
108178
  return visitParenthesizedExpression(node, valueIsDiscarded);
108197
- case 361 /* PartiallyEmittedExpression */:
108179
+ case 360 /* PartiallyEmittedExpression */:
108198
108180
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
108199
108181
  case 213 /* CallExpression */:
108200
108182
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -110605,7 +110587,7 @@ ${lanes.join("\n")}
110605
110587
  return visitExpressionStatement(node);
110606
110588
  case 217 /* ParenthesizedExpression */:
110607
110589
  return visitParenthesizedExpression(node, valueIsDiscarded);
110608
- case 361 /* PartiallyEmittedExpression */:
110590
+ case 360 /* PartiallyEmittedExpression */:
110609
110591
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
110610
110592
  case 226 /* BinaryExpression */:
110611
110593
  if (isDestructuringAssignment(node)) {
@@ -112744,8 +112726,6 @@ ${lanes.join("\n")}
112744
112726
  }
112745
112727
  if (isDeclaration(input) && isDeclarationAndNotVisible(input))
112746
112728
  return;
112747
- if (isJSDocImportTypeTag(input))
112748
- return;
112749
112729
  if (isFunctionLike(input) && resolver.isImplementationOfOverload(input))
112750
112730
  return;
112751
112731
  let previousEnclosingDeclaration;
@@ -113404,7 +113384,7 @@ ${lanes.join("\n")}
113404
113384
  }
113405
113385
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
113406
113386
  var _a, _b;
113407
- const enabledSyntaxKindFeatures = new Array(364 /* Count */);
113387
+ const enabledSyntaxKindFeatures = new Array(363 /* Count */);
113408
113388
  let lexicalEnvironmentVariableDeclarations;
113409
113389
  let lexicalEnvironmentFunctionDeclarations;
113410
113390
  let lexicalEnvironmentStatements;
@@ -115265,9 +115245,7 @@ ${lanes.join("\n")}
115265
115245
  return emitJSDocTypedefTag(node);
115266
115246
  case 354 /* JSDocSeeTag */:
115267
115247
  return emitJSDocSeeTag(node);
115268
- case 358 /* JSDocImportTypeTag */:
115269
- return emitJSDocImportTypeTag(node);
115270
- case 360 /* NotEmittedStatement */:
115248
+ case 359 /* NotEmittedStatement */:
115271
115249
  return;
115272
115250
  }
115273
115251
  if (isExpression(node)) {
@@ -115368,15 +115346,15 @@ ${lanes.join("\n")}
115368
115346
  return emitJsxSelfClosingElement(node);
115369
115347
  case 288 /* JsxFragment */:
115370
115348
  return emitJsxFragment(node);
115371
- case 359 /* SyntaxList */:
115349
+ case 358 /* SyntaxList */:
115372
115350
  return Debug.fail("SyntaxList should not be printed");
115373
- case 360 /* NotEmittedStatement */:
115351
+ case 359 /* NotEmittedStatement */:
115374
115352
  return;
115375
- case 361 /* PartiallyEmittedExpression */:
115353
+ case 360 /* PartiallyEmittedExpression */:
115376
115354
  return emitPartiallyEmittedExpression(node);
115377
- case 362 /* CommaListExpression */:
115355
+ case 361 /* CommaListExpression */:
115378
115356
  return emitCommaList(node);
115379
- case 363 /* SyntheticReferenceExpression */:
115357
+ case 362 /* SyntheticReferenceExpression */:
115380
115358
  return Debug.fail("SyntheticReferenceExpression should not be printed");
115381
115359
  }
115382
115360
  }
@@ -117274,16 +117252,6 @@ ${lanes.join("\n")}
117274
117252
  emit(tag.name);
117275
117253
  emitJSDocComment(tag.comment);
117276
117254
  }
117277
- function emitJSDocImportTypeTag(tag) {
117278
- emitJSDocTagName(tag.tagName);
117279
- writeSpace();
117280
- emit(tag.importClause);
117281
- writeSpace();
117282
- emitTokenWithComment(161 /* FromKeyword */, tag.importClause.end, writeKeyword, tag);
117283
- writeSpace();
117284
- emitExpression(tag.moduleSpecifier);
117285
- emitJSDocComment(tag.comment);
117286
- }
117287
117255
  function emitJSDocNameReference(node) {
117288
117256
  writeSpace();
117289
117257
  writePunctuation("{");
@@ -118783,7 +118751,7 @@ ${lanes.join("\n")}
118783
118751
  emitLeadingComments(
118784
118752
  pos,
118785
118753
  /*isEmittedNode*/
118786
- node.kind !== 360 /* NotEmittedStatement */
118754
+ node.kind !== 359 /* NotEmittedStatement */
118787
118755
  );
118788
118756
  }
118789
118757
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
@@ -118807,7 +118775,7 @@ ${lanes.join("\n")}
118807
118775
  containerPos = savedContainerPos;
118808
118776
  containerEnd = savedContainerEnd;
118809
118777
  declarationListContainerEnd = savedDeclarationListContainerEnd;
118810
- if (!skipTrailingComments && node.kind !== 360 /* NotEmittedStatement */) {
118778
+ if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) {
118811
118779
  emitTrailingComments(end);
118812
118780
  }
118813
118781
  }
@@ -119079,7 +119047,7 @@ ${lanes.join("\n")}
119079
119047
  }
119080
119048
  } else {
119081
119049
  const source = sourceMapRange.source || sourceMapSource;
119082
- if (node.kind !== 360 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
119050
+ if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
119083
119051
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
119084
119052
  }
119085
119053
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -119094,7 +119062,7 @@ ${lanes.join("\n")}
119094
119062
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
119095
119063
  sourceMapsDisabled = false;
119096
119064
  }
119097
- if (node.kind !== 360 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
119065
+ if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
119098
119066
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
119099
119067
  }
119100
119068
  }
@@ -121980,9 +121948,6 @@ ${lanes.join("\n")}
121980
121948
  if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || isJavaScriptFile) {
121981
121949
  collectDynamicImportOrRequireCalls(file);
121982
121950
  }
121983
- if (isJavaScriptFile) {
121984
- collectJsDocImportTypeReferences(file);
121985
- }
121986
121951
  file.imports = imports || emptyArray;
121987
121952
  file.moduleAugmentations = moduleAugmentations || emptyArray;
121988
121953
  file.ambientModuleNames = ambientModules || emptyArray;
@@ -122057,23 +122022,6 @@ ${lanes.join("\n")}
122057
122022
  }
122058
122023
  }
122059
122024
  }
122060
- function collectJsDocImportTypeReferences(file2) {
122061
- const r = /@importType/g;
122062
- while (r.exec(file2.text) !== null) {
122063
- const node = getNodeAtPosition(file2, r.lastIndex);
122064
- if (isJSDocImportTypeTag(node)) {
122065
- const moduleNameExpr = getExternalModuleName(node);
122066
- if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) {
122067
- setParentRecursive(
122068
- node,
122069
- /*incremental*/
122070
- false
122071
- );
122072
- imports = append(imports, moduleNameExpr);
122073
- }
122074
- }
122075
- }
122076
- }
122077
122025
  function getNodeAtPosition(sourceFile, position) {
122078
122026
  let current = sourceFile;
122079
122027
  const getContainingChild = (child) => {
@@ -132504,7 +132452,7 @@ ${lanes.join("\n")}
132504
132452
  });
132505
132453
  }
132506
132454
  function isModuleSpecifierLike(node) {
132507
- return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || isJSDocImportTypeTag(node.parent) || isRequireCall(
132455
+ return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || isRequireCall(
132508
132456
  node.parent,
132509
132457
  /*requireStringLiteralLikeArgument*/
132510
132458
  false
@@ -138437,8 +138385,7 @@ ${lanes.join("\n")}
138437
138385
  factory.createIdentifier(name)
138438
138386
  ));
138439
138387
  });
138440
- const importDecl = tryCast(toConvert.parent.parent, isImportDeclaration);
138441
- Debug.assert(importDecl, "Unexpected declaration");
138388
+ const importDecl = toConvert.parent.parent;
138442
138389
  if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports) {
138443
138390
  changes.insertNodeAfter(sourceFile, importDecl, updateImport(
138444
138391
  importDecl,
@@ -138458,10 +138405,7 @@ ${lanes.join("\n")}
138458
138405
  }
138459
138406
  function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConvert, shouldUseDefault = getShouldUseDefault(program, toConvert.parent)) {
138460
138407
  const checker = program.getTypeChecker();
138461
- const importDecl = tryCast(toConvert.parent.parent, isImportDeclaration);
138462
- if (importDecl === void 0) {
138463
- Debug.assert(importDecl, "Unexpected declaration");
138464
- }
138408
+ const importDecl = toConvert.parent.parent;
138465
138409
  const { moduleSpecifier } = importDecl;
138466
138410
  const toConvertSymbols = /* @__PURE__ */ new Set();
138467
138411
  toConvert.elements.forEach((namedImport) => {
@@ -143997,7 +143941,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
143997
143941
  }
143998
143942
  }
143999
143943
  function createSyntaxList(nodes, parent2) {
144000
- const list = createNode(359 /* SyntaxList */, nodes.pos, nodes.end, parent2);
143944
+ const list = createNode(358 /* SyntaxList */, nodes.pos, nodes.end, parent2);
144001
143945
  list._children = [];
144002
143946
  let pos = nodes.pos;
144003
143947
  for (const node of nodes) {
@@ -145526,7 +145470,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
145526
145470
  if (!children.length) {
145527
145471
  return void 0;
145528
145472
  }
145529
- const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 358 /* LastJSDocNode */);
145473
+ const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 357 /* LastJSDocNode */);
145530
145474
  return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
145531
145475
  }
145532
145476
  getLastToken(sourceFile) {
@@ -149936,7 +149880,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
149936
149880
  const declaration = getDeclaration2(context.sourceFile, context.span.start);
149937
149881
  if (declaration) {
149938
149882
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration));
149939
- 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;
149883
+ 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;
149940
149884
  const mainAction = createCodeFixAction(
149941
149885
  fixId13,
149942
149886
  changes,
@@ -149962,7 +149906,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
149962
149906
  if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) {
149963
149907
  doChange11(changes, diag2.file, errorDeclaration);
149964
149908
  fixedImportDeclarations.add(errorDeclaration);
149965
- } 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)) {
149909
+ } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) {
149966
149910
  doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent);
149967
149911
  fixedImportDeclarations.add(errorDeclaration.parent.parent.parent);
149968
149912
  } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) {
@@ -157377,7 +157321,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157377
157321
  const { parent: parent2 } = name;
157378
157322
  if (isImportEqualsDeclaration(parent2) && isExternalModuleReference(parent2.moduleReference)) {
157379
157323
  return { importNode: parent2, name, moduleSpecifier: parent2.moduleReference.expression };
157380
- } else if (isNamespaceImport(parent2) && isImportDeclaration(parent2.parent.parent)) {
157324
+ } else if (isNamespaceImport(parent2)) {
157381
157325
  const importNode = parent2.parent.parent;
157382
157326
  return { importNode, name, moduleSpecifier: importNode.moduleSpecifier };
157383
157327
  }
@@ -160005,7 +159949,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160005
159949
  const insideComment = isInComment(sourceFile, position, currentToken);
160006
159950
  log("getCompletionData: Is inside comment: " + (timestamp() - start));
160007
159951
  let insideJsDocTagTypeExpression = false;
160008
- let insideJsDocImportTypeTag = false;
160009
159952
  let isInSnippetScope = false;
160010
159953
  if (insideComment) {
160011
159954
  if (hasDocComment(sourceFile, position)) {
@@ -160023,28 +159966,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160023
159966
  if (tag.tagName.pos <= position && position <= tag.tagName.end) {
160024
159967
  return { kind: 1 /* JsDocTagName */ };
160025
159968
  }
160026
- if (isJSDocImportTypeTag(tag)) {
160027
- insideJsDocImportTypeTag = true;
160028
- } else {
160029
- const typeExpression = tryGetTypeExpressionFromTag(tag);
160030
- if (typeExpression) {
160031
- currentToken = getTokenAtPosition(sourceFile, position);
160032
- if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) {
160033
- insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression);
160034
- }
160035
- }
160036
- if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
160037
- return { kind: 3 /* JsDocParameterName */, tag };
159969
+ const typeExpression = tryGetTypeExpressionFromTag(tag);
159970
+ if (typeExpression) {
159971
+ currentToken = getTokenAtPosition(sourceFile, position);
159972
+ if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) {
159973
+ insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression);
160038
159974
  }
160039
159975
  }
159976
+ if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
159977
+ return { kind: 3 /* JsDocParameterName */, tag };
159978
+ }
160040
159979
  }
160041
- if (!insideJsDocTagTypeExpression && !insideJsDocImportTypeTag) {
159980
+ if (!insideJsDocTagTypeExpression) {
160042
159981
  log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
160043
159982
  return void 0;
160044
159983
  }
160045
159984
  }
160046
159985
  start = timestamp();
160047
- const isJsOnlyLocation = !insideJsDocTagTypeExpression && !insideJsDocImportTypeTag && isSourceFileJS(sourceFile);
159986
+ const isJsOnlyLocation = !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile);
160048
159987
  const tokens = getRelevantTokens(position, sourceFile);
160049
159988
  const previousToken = tokens.previousToken;
160050
159989
  let contextToken = tokens.contextToken;
@@ -160557,7 +160496,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160557
160496
  }
160558
160497
  }
160559
160498
  function isTypeOnlyCompletion() {
160560
- return insideJsDocTagTypeExpression || insideJsDocImportTypeTag || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken));
160499
+ return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken));
160561
160500
  }
160562
160501
  function isContextTokenValueLocation(contextToken2) {
160563
160502
  return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */);
@@ -161566,7 +161505,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
161566
161505
  }
161567
161506
  function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
161568
161507
  switch (location.kind) {
161569
- case 359 /* SyntaxList */:
161508
+ case 358 /* SyntaxList */:
161570
161509
  return tryCast(location.parent, isObjectTypeDeclaration);
161571
161510
  case 1 /* EndOfFileToken */:
161572
161511
  const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
@@ -161797,13 +161736,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
161797
161736
  var _a;
161798
161737
  if (!node)
161799
161738
  return void 0;
161800
- const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration, isJSDocImportTypeTag)) ?? node;
161739
+ const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)) ?? node;
161801
161740
  const sourceFile = top.getSourceFile();
161802
161741
  if (rangeIsOnSingleLine(top, sourceFile)) {
161803
161742
  return createTextSpanFromNode(top, sourceFile);
161804
161743
  }
161805
161744
  Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */);
161806
- const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ || top.kind === 358 /* JSDocImportTypeTag */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference;
161745
+ const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference;
161807
161746
  const withoutModuleSpecifier = {
161808
161747
  pos: top.getFirstToken().getStart(),
161809
161748
  end: potentialSplitPoint.pos
@@ -162165,7 +162104,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
162165
162104
  case 272 /* ImportDeclaration */:
162166
162105
  case 278 /* ExportDeclaration */:
162167
162106
  case 283 /* ExternalModuleReference */:
162168
- case 358 /* JSDocImportTypeTag */:
162169
162107
  return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) };
162170
162108
  case 296 /* CaseClause */:
162171
162109
  const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses);
@@ -162945,7 +162883,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
162945
162883
  );
162946
162884
  break;
162947
162885
  case 272 /* ImportDeclaration */:
162948
- case 358 /* JSDocImportTypeTag */:
162949
162886
  directImports.push(direct);
162950
162887
  const namedBindings = direct.importClause && direct.importClause.namedBindings;
162951
162888
  if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) {
@@ -167081,7 +167018,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167081
167018
  "host",
167082
167019
  "ignore",
167083
167020
  "implements",
167084
- "importType",
167085
167021
  "inheritdoc",
167086
167022
  "inner",
167087
167023
  "instance",
@@ -167322,84 +167258,98 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167322
167258
  if (importGroup.length === 0) {
167323
167259
  return importGroup;
167324
167260
  }
167325
- const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroup);
167326
- const coalescedImports = [];
167327
- if (importWithoutClause) {
167328
- coalescedImports.push(importWithoutClause);
167329
- }
167330
- for (const group2 of [regularImports, typeOnlyImports]) {
167331
- const isTypeOnly = group2 === typeOnlyImports;
167332
- const { defaultImports, namespaceImports, namedImports } = group2;
167333
- if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
167334
- const defaultImport = defaultImports[0];
167335
- coalescedImports.push(
167336
- updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
167337
- );
167338
- continue;
167339
- }
167340
- const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
167341
- for (const namespaceImport of sortedNamespaceImports) {
167342
- coalescedImports.push(
167343
- updateImportDeclarationAndClause(
167344
- namespaceImport,
167345
- /*name*/
167346
- void 0,
167347
- namespaceImport.importClause.namedBindings
167348
- )
167349
- );
167350
- }
167351
- const firstDefaultImport = firstOrUndefined(defaultImports);
167352
- const firstNamedImport = firstOrUndefined(namedImports);
167353
- const importDecl = firstDefaultImport ?? firstNamedImport;
167354
- if (!importDecl) {
167355
- continue;
167261
+ const importGroupsByAttributes = groupBy(importGroup, (decl) => {
167262
+ if (decl.attributes) {
167263
+ let attrs = decl.attributes.token + " ";
167264
+ for (const x of sort(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) {
167265
+ attrs += x.name.text + ":";
167266
+ attrs += isStringLiteralLike(x.value) ? `"${x.value.text}"` : x.value.getText() + " ";
167267
+ }
167268
+ return attrs;
167356
167269
  }
167357
- let newDefaultImport;
167358
- const newImportSpecifiers = [];
167359
- if (defaultImports.length === 1) {
167360
- newDefaultImport = defaultImports[0].importClause.name;
167361
- } else {
167362
- for (const defaultImport of defaultImports) {
167363
- newImportSpecifiers.push(
167364
- factory.createImportSpecifier(
167365
- /*isTypeOnly*/
167366
- false,
167367
- factory.createIdentifier("default"),
167368
- defaultImport.importClause.name
167270
+ return "";
167271
+ });
167272
+ const coalescedImports = [];
167273
+ for (const attribute in importGroupsByAttributes) {
167274
+ const importGroupSameAttrs = importGroupsByAttributes[attribute];
167275
+ const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroupSameAttrs);
167276
+ if (importWithoutClause) {
167277
+ coalescedImports.push(importWithoutClause);
167278
+ }
167279
+ for (const group2 of [regularImports, typeOnlyImports]) {
167280
+ const isTypeOnly = group2 === typeOnlyImports;
167281
+ const { defaultImports, namespaceImports, namedImports } = group2;
167282
+ if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
167283
+ const defaultImport = defaultImports[0];
167284
+ coalescedImports.push(
167285
+ updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings)
167286
+ );
167287
+ continue;
167288
+ }
167289
+ const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text));
167290
+ for (const namespaceImport of sortedNamespaceImports) {
167291
+ coalescedImports.push(
167292
+ updateImportDeclarationAndClause(
167293
+ namespaceImport,
167294
+ /*name*/
167295
+ void 0,
167296
+ namespaceImport.importClause.namedBindings
167369
167297
  )
167370
167298
  );
167371
167299
  }
167372
- }
167373
- newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
167374
- const sortedImportSpecifiers = factory.createNodeArray(
167375
- sortSpecifiers(newImportSpecifiers, comparer, preferences),
167376
- firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma
167377
- );
167378
- const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);
167379
- if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {
167380
- setEmitFlags(newNamedImports, 2 /* MultiLine */);
167381
- }
167382
- if (isTypeOnly && newDefaultImport && newNamedImports) {
167383
- coalescedImports.push(
167384
- updateImportDeclarationAndClause(
167385
- importDecl,
167386
- newDefaultImport,
167387
- /*namedBindings*/
167388
- void 0
167389
- )
167390
- );
167391
- coalescedImports.push(
167392
- updateImportDeclarationAndClause(
167393
- firstNamedImport ?? importDecl,
167394
- /*name*/
167395
- void 0,
167396
- newNamedImports
167397
- )
167398
- );
167399
- } else {
167400
- coalescedImports.push(
167401
- updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
167300
+ const firstDefaultImport = firstOrUndefined(defaultImports);
167301
+ const firstNamedImport = firstOrUndefined(namedImports);
167302
+ const importDecl = firstDefaultImport ?? firstNamedImport;
167303
+ if (!importDecl) {
167304
+ continue;
167305
+ }
167306
+ let newDefaultImport;
167307
+ const newImportSpecifiers = [];
167308
+ if (defaultImports.length === 1) {
167309
+ newDefaultImport = defaultImports[0].importClause.name;
167310
+ } else {
167311
+ for (const defaultImport of defaultImports) {
167312
+ newImportSpecifiers.push(
167313
+ factory.createImportSpecifier(
167314
+ /*isTypeOnly*/
167315
+ false,
167316
+ factory.createIdentifier("default"),
167317
+ defaultImport.importClause.name
167318
+ )
167319
+ );
167320
+ }
167321
+ }
167322
+ newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
167323
+ const sortedImportSpecifiers = factory.createNodeArray(
167324
+ sortSpecifiers(newImportSpecifiers, comparer, preferences),
167325
+ firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma
167402
167326
  );
167327
+ const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers);
167328
+ if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) {
167329
+ setEmitFlags(newNamedImports, 2 /* MultiLine */);
167330
+ }
167331
+ if (isTypeOnly && newDefaultImport && newNamedImports) {
167332
+ coalescedImports.push(
167333
+ updateImportDeclarationAndClause(
167334
+ importDecl,
167335
+ newDefaultImport,
167336
+ /*namedBindings*/
167337
+ void 0
167338
+ )
167339
+ );
167340
+ coalescedImports.push(
167341
+ updateImportDeclarationAndClause(
167342
+ firstNamedImport ?? importDecl,
167343
+ /*name*/
167344
+ void 0,
167345
+ newNamedImports
167346
+ )
167347
+ );
167348
+ } else {
167349
+ coalescedImports.push(
167350
+ updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports)
167351
+ );
167352
+ }
167403
167353
  }
167404
167354
  }
167405
167355
  return coalescedImports;
@@ -175852,6 +175802,7 @@ ${options.prefix}` : "\n" : options.prefix
175852
175802
  /**
175853
175803
  * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one)
175854
175804
  * This property is changed in 'updateGraph' based on the set of files in program
175805
+ * @internal
175855
175806
  */
175856
175807
  this.projectProgramVersion = 0;
175857
175808
  /**
@@ -175859,6 +175810,7 @@ ${options.prefix}` : "\n" : options.prefix
175859
175810
  * - new root file was added/removed
175860
175811
  * - edit happen in some file that is currently included in the project.
175861
175812
  * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project
175813
+ * @internal
175862
175814
  */
175863
175815
  this.projectStateVersion = 0;
175864
175816
  this.isInitialLoadPending = returnFalse;
@@ -176896,7 +176848,7 @@ ${options.prefix}` : "\n" : options.prefix
176896
176848
  );
176897
176849
  const elapsed = timestamp() - start;
176898
176850
  this.sendPerformanceEvent("UpdateGraph", elapsed);
176899
- this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} Version: ${this.getProjectVersion()} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`);
176851
+ 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`);
176900
176852
  if (this.projectService.logger.isTestLogger) {
176901
176853
  if (this.program !== oldProgram) {
176902
176854
  this.print(
@@ -177059,6 +177011,7 @@ ${options.prefix}` : "\n" : options.prefix
177059
177011
  }
177060
177012
  /** @internal */
177061
177013
  print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) {
177014
+ var _a;
177062
177015
  this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`);
177063
177016
  this.writeLog(this.filesToStringWorker(
177064
177017
  writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */),
@@ -177076,6 +177029,14 @@ ${options.prefix}` : "\n" : options.prefix
177076
177029
  false
177077
177030
  );
177078
177031
  }
177032
+ (_a = this.noDtsResolutionProject) == null ? void 0 : _a.print(
177033
+ /*writeProjectFileNames*/
177034
+ false,
177035
+ /*writeFileExplaination*/
177036
+ false,
177037
+ /*writeFileVersionAndText*/
177038
+ false
177039
+ );
177079
177040
  }
177080
177041
  setCompilerOptions(compilerOptions) {
177081
177042
  var _a;
@@ -178515,6 +178476,8 @@ ${options.prefix}` : "\n" : options.prefix
178515
178476
  /** @internal */
178516
178477
  this.extendedConfigCache = /* @__PURE__ */ new Map();
178517
178478
  /** @internal */
178479
+ this.baseline = noop;
178480
+ /** @internal */
178518
178481
  this.verifyDocumentRegistry = noop;
178519
178482
  /** @internal */
178520
178483
  this.verifyProgram = noop;
@@ -180504,6 +180467,8 @@ Dynamic files must always be opened with service's current directory or service
180504
180467
  });
180505
180468
  this.inferredProjects.forEach((project) => this.clearSemanticCache(project));
180506
180469
  this.ensureProjectForOpenFiles();
180470
+ this.logger.info("After reloading projects..");
180471
+ this.printProjects();
180507
180472
  }
180508
180473
  /**
180509
180474
  * This function goes through all the openFiles and tries to file the config file for them.
@@ -181029,7 +180994,7 @@ Dynamic files must always be opened with service's current directory or service
181029
180994
  }
181030
180995
  }
181031
180996
  }
181032
- closeExternalProject(uncheckedFileName) {
180997
+ closeExternalProject(uncheckedFileName, print) {
181033
180998
  const fileName = toNormalizedPath(uncheckedFileName);
181034
180999
  const configFiles = this.externalProjectToConfiguredProjectMap.get(fileName);
181035
181000
  if (configFiles) {
@@ -181043,6 +181008,8 @@ Dynamic files must always be opened with service's current directory or service
181043
181008
  this.removeProject(externalProject);
181044
181009
  }
181045
181010
  }
181011
+ if (print)
181012
+ this.printProjects();
181046
181013
  }
181047
181014
  openExternalProjects(projects) {
181048
181015
  const projectsToClose = arrayToMap(this.externalProjects, (p) => p.getProjectName(), (_) => true);
@@ -181050,12 +181017,21 @@ Dynamic files must always be opened with service's current directory or service
181050
181017
  projectsToClose.set(externalProjectName, true);
181051
181018
  });
181052
181019
  for (const externalProject of projects) {
181053
- this.openExternalProject(externalProject);
181020
+ this.openExternalProject(
181021
+ externalProject,
181022
+ /*print*/
181023
+ false
181024
+ );
181054
181025
  projectsToClose.delete(externalProject.projectFileName);
181055
181026
  }
181056
181027
  forEachKey(projectsToClose, (externalProjectName) => {
181057
- this.closeExternalProject(externalProjectName);
181028
+ this.closeExternalProject(
181029
+ externalProjectName,
181030
+ /*print*/
181031
+ false
181032
+ );
181058
181033
  });
181034
+ this.printProjects();
181059
181035
  }
181060
181036
  static escapeFilenameForRegex(filename) {
181061
181037
  return filename.replace(this.filenameEscapeRegexp, "\\$&");
@@ -181148,7 +181124,7 @@ Dynamic files must always be opened with service's current directory or service
181148
181124
  proj.rootFiles = filesToKeep;
181149
181125
  return excludedFiles;
181150
181126
  }
181151
- openExternalProject(proj) {
181127
+ openExternalProject(proj, print) {
181152
181128
  proj.typeAcquisition = proj.typeAcquisition || {};
181153
181129
  proj.typeAcquisition.include = proj.typeAcquisition.include || [];
181154
181130
  proj.typeAcquisition.exclude = proj.typeAcquisition.exclude || [];
@@ -181187,12 +181163,22 @@ Dynamic files must always be opened with service's current directory or service
181187
181163
  externalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);
181188
181164
  this.updateRootAndOptionsOfNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions);
181189
181165
  externalProject.updateGraph();
181166
+ if (print)
181167
+ this.printProjects();
181190
181168
  return;
181191
181169
  }
181192
- this.closeExternalProject(proj.projectFileName);
181170
+ this.closeExternalProject(
181171
+ proj.projectFileName,
181172
+ /*print*/
181173
+ false
181174
+ );
181193
181175
  } else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) {
181194
181176
  if (!tsConfigFiles) {
181195
- this.closeExternalProject(proj.projectFileName);
181177
+ this.closeExternalProject(
181178
+ proj.projectFileName,
181179
+ /*print*/
181180
+ false
181181
+ );
181196
181182
  } else {
181197
181183
  const oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
181198
181184
  let iNew = 0;
@@ -181232,6 +181218,8 @@ Dynamic files must always be opened with service's current directory or service
181232
181218
  const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition, excludedFiles);
181233
181219
  project.updateGraph();
181234
181220
  }
181221
+ if (print)
181222
+ this.printProjects();
181235
181223
  }
181236
181224
  hasDeferredExtension() {
181237
181225
  for (const extension of this.hostConfiguration.extraFileExtensions) {
@@ -182227,7 +182215,11 @@ ${json}${newLine}`;
182227
182215
  return this.requiredResponse(response);
182228
182216
  },
182229
182217
  ["openExternalProject" /* OpenExternalProject */]: (request) => {
182230
- this.projectService.openExternalProject(request.arguments);
182218
+ this.projectService.openExternalProject(
182219
+ request.arguments,
182220
+ /*print*/
182221
+ true
182222
+ );
182231
182223
  return this.requiredResponse(
182232
182224
  /*response*/
182233
182225
  true
@@ -182241,7 +182233,11 @@ ${json}${newLine}`;
182241
182233
  );
182242
182234
  },
182243
182235
  ["closeExternalProject" /* CloseExternalProject */]: (request) => {
182244
- this.projectService.closeExternalProject(request.arguments.projectFileName);
182236
+ this.projectService.closeExternalProject(
182237
+ request.arguments.projectFileName,
182238
+ /*print*/
182239
+ true
182240
+ );
182245
182241
  return this.requiredResponse(
182246
182242
  /*response*/
182247
182243
  true
@@ -187454,7 +187450,6 @@ ${e.message}`;
187454
187450
  isJSDocEnumTag: () => isJSDocEnumTag,
187455
187451
  isJSDocFunctionType: () => isJSDocFunctionType,
187456
187452
  isJSDocImplementsTag: () => isJSDocImplementsTag,
187457
- isJSDocImportTypeTag: () => isJSDocImportTypeTag,
187458
187453
  isJSDocIndexSignature: () => isJSDocIndexSignature,
187459
187454
  isJSDocLikeText: () => isJSDocLikeText,
187460
187455
  isJSDocLink: () => isJSDocLink,
@@ -189876,7 +189871,6 @@ ${e.message}`;
189876
189871
  isJSDocEnumTag: () => isJSDocEnumTag,
189877
189872
  isJSDocFunctionType: () => isJSDocFunctionType,
189878
189873
  isJSDocImplementsTag: () => isJSDocImplementsTag,
189879
- isJSDocImportTypeTag: () => isJSDocImportTypeTag,
189880
189874
  isJSDocIndexSignature: () => isJSDocIndexSignature,
189881
189875
  isJSDocLikeText: () => isJSDocLikeText,
189882
189876
  isJSDocLink: () => isJSDocLink,