typescript 5.0.0-dev.20221211 → 5.0.0-dev.20221213

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
@@ -1598,6 +1598,7 @@ __export(server_exports, {
1598
1598
  isJSDocNode: () => isJSDocNode,
1599
1599
  isJSDocNonNullableType: () => isJSDocNonNullableType,
1600
1600
  isJSDocNullableType: () => isJSDocNullableType,
1601
+ isJSDocOptionalParameter: () => isJSDocOptionalParameter,
1601
1602
  isJSDocOptionalType: () => isJSDocOptionalType,
1602
1603
  isJSDocOverrideTag: () => isJSDocOverrideTag,
1603
1604
  isJSDocParameterTag: () => isJSDocParameterTag,
@@ -1613,6 +1614,7 @@ __export(server_exports, {
1613
1614
  isJSDocTag: () => isJSDocTag,
1614
1615
  isJSDocTemplateTag: () => isJSDocTemplateTag,
1615
1616
  isJSDocThisTag: () => isJSDocThisTag,
1617
+ isJSDocThrowsTag: () => isJSDocThrowsTag,
1616
1618
  isJSDocTypeAlias: () => isJSDocTypeAlias,
1617
1619
  isJSDocTypeAssertion: () => isJSDocTypeAssertion,
1618
1620
  isJSDocTypeExpression: () => isJSDocTypeExpression,
@@ -1743,6 +1745,7 @@ __export(server_exports, {
1743
1745
  isOmittedExpression: () => isOmittedExpression,
1744
1746
  isOptionalChain: () => isOptionalChain,
1745
1747
  isOptionalChainRoot: () => isOptionalChainRoot,
1748
+ isOptionalDeclaration: () => isOptionalDeclaration,
1746
1749
  isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag,
1747
1750
  isOptionalTypeNode: () => isOptionalTypeNode,
1748
1751
  isOuterExpression: () => isOuterExpression,
@@ -2645,7 +2648,7 @@ __export(ts_server_exports3, {
2645
2648
 
2646
2649
  // src/compiler/corePublic.ts
2647
2650
  var versionMajorMinor = "5.0";
2648
- var version = `${versionMajorMinor}.0-dev.20221211`;
2651
+ var version = `${versionMajorMinor}.0-dev.20221213`;
2649
2652
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2650
2653
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2651
2654
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6426,14 +6429,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6426
6429
  SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 348] = "JSDocTypedefTag";
6427
6430
  SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 349] = "JSDocSeeTag";
6428
6431
  SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 350] = "JSDocPropertyTag";
6429
- SyntaxKind5[SyntaxKind5["SyntaxList"] = 351] = "SyntaxList";
6430
- SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 352] = "NotEmittedStatement";
6431
- SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 353] = "PartiallyEmittedExpression";
6432
- SyntaxKind5[SyntaxKind5["CommaListExpression"] = 354] = "CommaListExpression";
6433
- SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 355] = "MergeDeclarationMarker";
6434
- SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 356] = "EndOfDeclarationMarker";
6435
- SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 357] = "SyntheticReferenceExpression";
6436
- SyntaxKind5[SyntaxKind5["Count"] = 358] = "Count";
6432
+ SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 351] = "JSDocThrowsTag";
6433
+ SyntaxKind5[SyntaxKind5["SyntaxList"] = 352] = "SyntaxList";
6434
+ SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 353] = "NotEmittedStatement";
6435
+ SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 354] = "PartiallyEmittedExpression";
6436
+ SyntaxKind5[SyntaxKind5["CommaListExpression"] = 355] = "CommaListExpression";
6437
+ SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 356] = "MergeDeclarationMarker";
6438
+ SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 357] = "EndOfDeclarationMarker";
6439
+ SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 358] = "SyntheticReferenceExpression";
6440
+ SyntaxKind5[SyntaxKind5["Count"] = 359] = "Count";
6437
6441
  SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment";
6438
6442
  SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment";
6439
6443
  SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -6462,9 +6466,9 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
6462
6466
  SyntaxKind5[SyntaxKind5["LastStatement"] = 256 /* DebuggerStatement */] = "LastStatement";
6463
6467
  SyntaxKind5[SyntaxKind5["FirstNode"] = 163 /* QualifiedName */] = "FirstNode";
6464
6468
  SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 312 /* JSDocTypeExpression */] = "FirstJSDocNode";
6465
- SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 350 /* JSDocPropertyTag */] = "LastJSDocNode";
6469
+ SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 351 /* JSDocThrowsTag */] = "LastJSDocNode";
6466
6470
  SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 330 /* JSDocTag */] = "FirstJSDocTagNode";
6467
- SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 350 /* JSDocPropertyTag */] = "LastJSDocTagNode";
6471
+ SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 351 /* JSDocThrowsTag */] = "LastJSDocTagNode";
6468
6472
  SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 126 /* AbstractKeyword */] = "FirstContextualKeyword";
6469
6473
  SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 162 /* OfKeyword */] = "LastContextualKeyword";
6470
6474
  return SyntaxKind5;
@@ -14396,8 +14400,8 @@ function isExpressionKind(kind) {
14396
14400
  case 227 /* SpreadElement */:
14397
14401
  case 231 /* AsExpression */:
14398
14402
  case 229 /* OmittedExpression */:
14399
- case 354 /* CommaListExpression */:
14400
- case 353 /* PartiallyEmittedExpression */:
14403
+ case 355 /* CommaListExpression */:
14404
+ case 354 /* PartiallyEmittedExpression */:
14401
14405
  case 235 /* SatisfiesExpression */:
14402
14406
  return true;
14403
14407
  default:
@@ -14474,7 +14478,7 @@ function isDeclarationStatementKind(kind) {
14474
14478
  return kind === 259 /* FunctionDeclaration */ || kind === 279 /* MissingDeclaration */ || kind === 260 /* ClassDeclaration */ || kind === 261 /* InterfaceDeclaration */ || kind === 262 /* TypeAliasDeclaration */ || kind === 263 /* EnumDeclaration */ || kind === 264 /* ModuleDeclaration */ || kind === 269 /* ImportDeclaration */ || kind === 268 /* ImportEqualsDeclaration */ || kind === 275 /* ExportDeclaration */ || kind === 274 /* ExportAssignment */ || kind === 267 /* NamespaceExportDeclaration */;
14475
14479
  }
14476
14480
  function isStatementKindButNotDeclarationKind(kind) {
14477
- return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 352 /* NotEmittedStatement */ || kind === 356 /* EndOfDeclarationMarker */ || kind === 355 /* MergeDeclarationMarker */;
14481
+ return kind === 249 /* BreakStatement */ || kind === 248 /* ContinueStatement */ || kind === 256 /* DebuggerStatement */ || kind === 243 /* DoStatement */ || kind === 241 /* ExpressionStatement */ || kind === 239 /* EmptyStatement */ || kind === 246 /* ForInStatement */ || kind === 247 /* ForOfStatement */ || kind === 245 /* ForStatement */ || kind === 242 /* IfStatement */ || kind === 253 /* LabeledStatement */ || kind === 250 /* ReturnStatement */ || kind === 252 /* SwitchStatement */ || kind === 254 /* ThrowStatement */ || kind === 255 /* TryStatement */ || kind === 240 /* VariableStatement */ || kind === 244 /* WhileStatement */ || kind === 251 /* WithStatement */ || kind === 353 /* NotEmittedStatement */ || kind === 357 /* EndOfDeclarationMarker */ || kind === 356 /* MergeDeclarationMarker */;
14478
14482
  }
14479
14483
  function isDeclaration(node) {
14480
14484
  if (node.kind === 165 /* TypeParameter */) {
@@ -14535,13 +14539,13 @@ function isCaseOrDefaultClause(node) {
14535
14539
  return kind === 292 /* CaseClause */ || kind === 293 /* DefaultClause */;
14536
14540
  }
14537
14541
  function isJSDocNode(node) {
14538
- return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 350 /* LastJSDocNode */;
14542
+ return node.kind >= 312 /* FirstJSDocNode */ && node.kind <= 351 /* LastJSDocNode */;
14539
14543
  }
14540
14544
  function isJSDocCommentContainingNode(node) {
14541
14545
  return node.kind === 323 /* JSDoc */ || node.kind === 322 /* JSDocNamepathType */ || node.kind === 324 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node);
14542
14546
  }
14543
14547
  function isJSDocTag(node) {
14544
- return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 350 /* LastJSDocTagNode */;
14548
+ return node.kind >= 330 /* FirstJSDocTagNode */ && node.kind <= 351 /* LastJSDocTagNode */;
14545
14549
  }
14546
14550
  function isSetAccessor(node) {
14547
14551
  return node.kind === 175 /* SetAccessor */;
@@ -14951,7 +14955,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
14951
14955
  if (includeJsDoc && hasJSDocNodes(node)) {
14952
14956
  return getTokenPosOfNode(node.jsDoc[0], sourceFile);
14953
14957
  }
14954
- if (node.kind === 351 /* SyntaxList */ && node._children.length > 0) {
14958
+ if (node.kind === 352 /* SyntaxList */ && node._children.length > 0) {
14955
14959
  return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
14956
14960
  }
14957
14961
  return skipTrivia(
@@ -16125,7 +16129,7 @@ function isExpressionNode(node) {
16125
16129
  case 233 /* MetaProperty */:
16126
16130
  return true;
16127
16131
  case 230 /* ExpressionWithTypeArguments */:
16128
- return !isHeritageClause(node.parent);
16132
+ return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent);
16129
16133
  case 163 /* QualifiedName */:
16130
16134
  while (node.parent.kind === 163 /* QualifiedName */) {
16131
16135
  node = node.parent;
@@ -17224,7 +17228,7 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => {
17224
17228
  })(OperatorPrecedence || {});
17225
17229
  function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
17226
17230
  switch (nodeKind) {
17227
- case 354 /* CommaListExpression */:
17231
+ case 355 /* CommaListExpression */:
17228
17232
  return 0 /* Comma */;
17229
17233
  case 227 /* SpreadElement */:
17230
17234
  return 1 /* Spread */;
@@ -18208,7 +18212,18 @@ function tryGetClassExtendingExpressionWithTypeArguments(node) {
18208
18212
  return cls && !cls.isImplements ? cls.class : void 0;
18209
18213
  }
18210
18214
  function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) {
18211
- return isExpressionWithTypeArguments(node) && isHeritageClause(node.parent) && isClassLike(node.parent.parent) ? { class: node.parent.parent, isImplements: node.parent.token === 117 /* ImplementsKeyword */ } : void 0;
18215
+ if (isExpressionWithTypeArguments(node)) {
18216
+ if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) {
18217
+ return { class: node.parent.parent, isImplements: node.parent.token === 117 /* ImplementsKeyword */ };
18218
+ }
18219
+ if (isJSDocAugmentsTag(node.parent)) {
18220
+ const host = getEffectiveJSDocHost(node.parent);
18221
+ if (host && isClassLike(host)) {
18222
+ return { class: host, isImplements: false };
18223
+ }
18224
+ }
18225
+ }
18226
+ return void 0;
18212
18227
  }
18213
18228
  function isAssignmentExpression(node, excludeCompoundAssignment) {
18214
18229
  return isBinaryExpression(node) && (excludeCompoundAssignment ? node.operatorToken.kind === 63 /* EqualsToken */ : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left);
@@ -18791,7 +18806,7 @@ function getLeftmostExpression(node, stopAtCallExpressions) {
18791
18806
  case 209 /* ElementAccessExpression */:
18792
18807
  case 208 /* PropertyAccessExpression */:
18793
18808
  case 232 /* NonNullExpression */:
18794
- case 353 /* PartiallyEmittedExpression */:
18809
+ case 354 /* PartiallyEmittedExpression */:
18795
18810
  case 235 /* SatisfiesExpression */:
18796
18811
  node = node.expression;
18797
18812
  continue;
@@ -19947,7 +19962,7 @@ function getContainingNodeArray(node) {
19947
19962
  return parent2.types;
19948
19963
  case 186 /* TupleType */:
19949
19964
  case 206 /* ArrayLiteralExpression */:
19950
- case 354 /* CommaListExpression */:
19965
+ case 355 /* CommaListExpression */:
19951
19966
  case 272 /* NamedImports */:
19952
19967
  case 276 /* NamedExports */:
19953
19968
  return parent2.elements;
@@ -20110,6 +20125,23 @@ function hasTabstop(node) {
20110
20125
  var _a2;
20111
20126
  return ((_a2 = getSnippetElement(node)) == null ? void 0 : _a2.kind) === 0 /* TabStop */;
20112
20127
  }
20128
+ function isJSDocOptionalParameter(node) {
20129
+ return isInJSFile(node) && (node.type && node.type.kind === 319 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */));
20130
+ }
20131
+ function isOptionalDeclaration(declaration) {
20132
+ switch (declaration.kind) {
20133
+ case 169 /* PropertyDeclaration */:
20134
+ case 168 /* PropertySignature */:
20135
+ return !!declaration.questionToken;
20136
+ case 166 /* Parameter */:
20137
+ return !!declaration.questionToken || isJSDocOptionalParameter(declaration);
20138
+ case 350 /* JSDocPropertyTag */:
20139
+ case 343 /* JSDocParameterTag */:
20140
+ return isOptionalJSDocPropertyLikeTag(declaration);
20141
+ default:
20142
+ return false;
20143
+ }
20144
+ }
20113
20145
 
20114
20146
  // src/compiler/factory/baseNodeFactory.ts
20115
20147
  function createBaseNodeFactory() {
@@ -21065,6 +21097,12 @@ function createNodeFactory(flags, baseFactory2) {
21065
21097
  get updateJSDocDeprecatedTag() {
21066
21098
  return getJSDocSimpleTagUpdateFunction(334 /* JSDocDeprecatedTag */);
21067
21099
  },
21100
+ get createJSDocThrowsTag() {
21101
+ return getJSDocTypeLikeTagCreateFunction(351 /* JSDocThrowsTag */);
21102
+ },
21103
+ get updateJSDocThrowsTag() {
21104
+ return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocThrowsTag */);
21105
+ },
21068
21106
  createJSDocUnknownTag,
21069
21107
  updateJSDocUnknownTag,
21070
21108
  createJSDocText,
@@ -24014,18 +24052,18 @@ function createNodeFactory(flags, baseFactory2) {
24014
24052
  return node;
24015
24053
  }
24016
24054
  function createSyntaxList3(children) {
24017
- const node = createBaseNode(351 /* SyntaxList */);
24055
+ const node = createBaseNode(352 /* SyntaxList */);
24018
24056
  node._children = children;
24019
24057
  return node;
24020
24058
  }
24021
24059
  function createNotEmittedStatement2(original) {
24022
- const node = createBaseNode(352 /* NotEmittedStatement */);
24060
+ const node = createBaseNode(353 /* NotEmittedStatement */);
24023
24061
  node.original = original;
24024
24062
  setTextRange(node, original);
24025
24063
  return node;
24026
24064
  }
24027
24065
  function createPartiallyEmittedExpression2(expression, original) {
24028
- const node = createBaseNode(353 /* PartiallyEmittedExpression */);
24066
+ const node = createBaseNode(354 /* PartiallyEmittedExpression */);
24029
24067
  node.expression = expression;
24030
24068
  node.original = original;
24031
24069
  node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */;
@@ -24047,7 +24085,7 @@ function createNodeFactory(flags, baseFactory2) {
24047
24085
  return node;
24048
24086
  }
24049
24087
  function createCommaListExpression(elements) {
24050
- const node = createBaseNode(354 /* CommaListExpression */);
24088
+ const node = createBaseNode(355 /* CommaListExpression */);
24051
24089
  node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements));
24052
24090
  node.transformFlags |= propagateChildrenFlags(node.elements);
24053
24091
  return node;
@@ -24056,19 +24094,19 @@ function createNodeFactory(flags, baseFactory2) {
24056
24094
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
24057
24095
  }
24058
24096
  function createEndOfDeclarationMarker(original) {
24059
- const node = createBaseNode(356 /* EndOfDeclarationMarker */);
24097
+ const node = createBaseNode(357 /* EndOfDeclarationMarker */);
24060
24098
  node.emitNode = {};
24061
24099
  node.original = original;
24062
24100
  return node;
24063
24101
  }
24064
24102
  function createMergeDeclarationMarker(original) {
24065
- const node = createBaseNode(355 /* MergeDeclarationMarker */);
24103
+ const node = createBaseNode(356 /* MergeDeclarationMarker */);
24066
24104
  node.emitNode = {};
24067
24105
  node.original = original;
24068
24106
  return node;
24069
24107
  }
24070
24108
  function createSyntheticReferenceExpression(expression, thisArg) {
24071
- const node = createBaseNode(357 /* SyntheticReferenceExpression */);
24109
+ const node = createBaseNode(358 /* SyntheticReferenceExpression */);
24072
24110
  node.expression = expression;
24073
24111
  node.thisArg = thisArg;
24074
24112
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -24216,7 +24254,7 @@ function createNodeFactory(flags, baseFactory2) {
24216
24254
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
24217
24255
  case 232 /* NonNullExpression */:
24218
24256
  return updateNonNullExpression2(outerExpression, expression);
24219
- case 353 /* PartiallyEmittedExpression */:
24257
+ case 354 /* PartiallyEmittedExpression */:
24220
24258
  return updatePartiallyEmittedExpression2(outerExpression, expression);
24221
24259
  }
24222
24260
  }
@@ -24707,7 +24745,7 @@ function getTransformFlagsSubtreeExclusions(kind) {
24707
24745
  case 213 /* TypeAssertionExpression */:
24708
24746
  case 235 /* SatisfiesExpression */:
24709
24747
  case 231 /* AsExpression */:
24710
- case 353 /* PartiallyEmittedExpression */:
24748
+ case 354 /* PartiallyEmittedExpression */:
24711
24749
  case 214 /* ParenthesizedExpression */:
24712
24750
  case 106 /* SuperKeyword */:
24713
24751
  return -2147483648 /* OuterExpressionExcludes */;
@@ -26245,10 +26283,10 @@ function isSyntheticExpression(node) {
26245
26283
  return node.kind === 234 /* SyntheticExpression */;
26246
26284
  }
26247
26285
  function isPartiallyEmittedExpression(node) {
26248
- return node.kind === 353 /* PartiallyEmittedExpression */;
26286
+ return node.kind === 354 /* PartiallyEmittedExpression */;
26249
26287
  }
26250
26288
  function isCommaListExpression(node) {
26251
- return node.kind === 354 /* CommaListExpression */;
26289
+ return node.kind === 355 /* CommaListExpression */;
26252
26290
  }
26253
26291
  function isTemplateSpan(node) {
26254
26292
  return node.kind === 236 /* TemplateSpan */;
@@ -26392,16 +26430,16 @@ function isMissingDeclaration(node) {
26392
26430
  return node.kind === 279 /* MissingDeclaration */;
26393
26431
  }
26394
26432
  function isNotEmittedStatement(node) {
26395
- return node.kind === 352 /* NotEmittedStatement */;
26433
+ return node.kind === 353 /* NotEmittedStatement */;
26396
26434
  }
26397
26435
  function isSyntheticReference(node) {
26398
- return node.kind === 357 /* SyntheticReferenceExpression */;
26436
+ return node.kind === 358 /* SyntheticReferenceExpression */;
26399
26437
  }
26400
26438
  function isMergeDeclarationMarker(node) {
26401
- return node.kind === 355 /* MergeDeclarationMarker */;
26439
+ return node.kind === 356 /* MergeDeclarationMarker */;
26402
26440
  }
26403
26441
  function isEndOfDeclarationMarker(node) {
26404
- return node.kind === 356 /* EndOfDeclarationMarker */;
26442
+ return node.kind === 357 /* EndOfDeclarationMarker */;
26405
26443
  }
26406
26444
  function isExternalModuleReference(node) {
26407
26445
  return node.kind === 280 /* ExternalModuleReference */;
@@ -26589,8 +26627,11 @@ function isJSDocPropertyTag(node) {
26589
26627
  function isJSDocImplementsTag(node) {
26590
26628
  return node.kind === 332 /* JSDocImplementsTag */;
26591
26629
  }
26630
+ function isJSDocThrowsTag(node) {
26631
+ return node.kind === 351 /* JSDocThrowsTag */;
26632
+ }
26592
26633
  function isSyntaxList(n) {
26593
- return n.kind === 351 /* SyntaxList */;
26634
+ return n.kind === 352 /* SyntaxList */;
26594
26635
  }
26595
26636
 
26596
26637
  // src/compiler/factory/utilities.ts
@@ -26894,7 +26935,7 @@ function startsWithUseStrict(statements) {
26894
26935
  return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement);
26895
26936
  }
26896
26937
  function isCommaSequence(node) {
26897
- return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 354 /* CommaListExpression */;
26938
+ return node.kind === 223 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 355 /* CommaListExpression */;
26898
26939
  }
26899
26940
  function isJSDocTypeAssertion(node) {
26900
26941
  return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node);
@@ -26917,7 +26958,7 @@ function isOuterExpression(node, kinds = 15 /* All */) {
26917
26958
  return (kinds & 2 /* TypeAssertions */) !== 0;
26918
26959
  case 232 /* NonNullExpression */:
26919
26960
  return (kinds & 4 /* NonNullAssertions */) !== 0;
26920
- case 353 /* PartiallyEmittedExpression */:
26961
+ case 354 /* PartiallyEmittedExpression */:
26921
26962
  return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0;
26922
26963
  }
26923
26964
  return false;
@@ -27855,7 +27896,7 @@ var forEachChildTable = {
27855
27896
  [279 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) {
27856
27897
  return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers);
27857
27898
  },
27858
- [354 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
27899
+ [355 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) {
27859
27900
  return visitNodes(cbNode, cbNodes, node.elements);
27860
27901
  },
27861
27902
  [281 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) {
@@ -27923,10 +27964,11 @@ var forEachChildTable = {
27923
27964
  [341 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) {
27924
27965
  return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
27925
27966
  },
27926
- [344 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag,
27927
- [346 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag,
27928
- [345 /* JSDocThisTag */]: forEachChildInJSDocReturnTag,
27929
- [342 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag,
27967
+ [344 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag,
27968
+ [346 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag,
27969
+ [345 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag,
27970
+ [342 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag,
27971
+ [351 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag,
27930
27972
  [326 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) {
27931
27973
  return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type);
27932
27974
  },
@@ -27944,7 +27986,7 @@ var forEachChildTable = {
27944
27986
  [339 /* JSDocReadonlyTag */]: forEachChildInJSDocTag,
27945
27987
  [334 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag,
27946
27988
  [340 /* JSDocOverrideTag */]: forEachChildInJSDocTag,
27947
- [353 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
27989
+ [354 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
27948
27990
  };
27949
27991
  function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) {
27950
27992
  return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type);
@@ -27985,7 +28027,7 @@ function forEachChildInOptionalRestOrJSDocParameterModifier(node, cbNode, _cbNod
27985
28027
  function forEachChildInJSDocParameterOrPropertyTag(node, cbNode, cbNodes) {
27986
28028
  return visitNode2(cbNode, node.tagName) || (node.isNameFirst ? visitNode2(cbNode, node.name) || visitNode2(cbNode, node.typeExpression) : visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.name)) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
27987
28029
  }
27988
- function forEachChildInJSDocReturnTag(node, cbNode, cbNodes) {
28030
+ function forEachChildInJSDocTypeLikeTag(node, cbNode, cbNodes) {
27989
28031
  return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment));
27990
28032
  }
27991
28033
  function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) {
@@ -33283,6 +33325,10 @@ var Parser;
33283
33325
  case "see":
33284
33326
  tag = parseSeeTag(start3, tagName, margin, indentText);
33285
33327
  break;
33328
+ case "exception":
33329
+ case "throws":
33330
+ tag = parseThrowsTag(start3, tagName, margin, indentText);
33331
+ break;
33286
33332
  default:
33287
33333
  tag = parseUnknownTag(start3, tagName, margin, indentText);
33288
33334
  break;
@@ -33535,6 +33581,11 @@ var Parser;
33535
33581
  const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent3, indentText) : void 0;
33536
33582
  return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start3);
33537
33583
  }
33584
+ function parseThrowsTag(start3, tagName, indent3, indentText) {
33585
+ const typeExpression = tryParseTypeExpression();
33586
+ const comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
33587
+ return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start3);
33588
+ }
33538
33589
  function parseAuthorTag(start3, tagName, indent3, indentText) {
33539
33590
  const commentStart = getNodePos();
33540
33591
  const textOnly = parseAuthorNameAndEmail();
@@ -49958,8 +50009,8 @@ function createTypeChecker(host) {
49958
50009
  if (isBindingPattern(declaration.parent)) {
49959
50010
  return getTypeForBindingElement(declaration);
49960
50011
  }
49961
- const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration);
49962
- const isOptional = includeOptionality && (isProperty && !!declaration.questionToken || isParameter(declaration) && (!!declaration.questionToken || isJSDocOptionalParameter(declaration)) || isOptionalJSDocPropertyLikeTag(declaration));
50012
+ const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration);
50013
+ const isOptional = includeOptionality && isOptionalDeclaration(declaration);
49963
50014
  const declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
49964
50015
  if (declaredType) {
49965
50016
  return addOptionality(declaredType, isProperty, isOptional);
@@ -52867,9 +52918,6 @@ function createTypeChecker(host) {
52867
52918
  });
52868
52919
  return result;
52869
52920
  }
52870
- function isJSDocOptionalParameter(node) {
52871
- return isInJSFile(node) && (node.type && node.type.kind === 319 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */));
52872
- }
52873
52921
  function tryFindAmbientModule(moduleName, withAugmentations) {
52874
52922
  if (isExternalModuleNameRelative(moduleName)) {
52875
52923
  return void 0;
@@ -79098,13 +79146,13 @@ var visitEachChildTable = {
79098
79146
  visitLexicalEnvironment(node.statements, visitor, context)
79099
79147
  );
79100
79148
  },
79101
- [353 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
79149
+ [354 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
79102
79150
  return context.factory.updatePartiallyEmittedExpression(
79103
79151
  node,
79104
79152
  nodeVisitor(node.expression, visitor, isExpression)
79105
79153
  );
79106
79154
  },
79107
- [354 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
79155
+ [355 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
79108
79156
  return context.factory.updateCommaListExpression(
79109
79157
  node,
79110
79158
  nodesVisitor(node.elements, visitor, isExpression)
@@ -85168,7 +85216,7 @@ function transformES2018(context) {
85168
85216
  return visitObjectLiteralExpression(node);
85169
85217
  case 223 /* BinaryExpression */:
85170
85218
  return visitBinaryExpression(node, expressionResultIsUnused2);
85171
- case 354 /* CommaListExpression */:
85219
+ case 355 /* CommaListExpression */:
85172
85220
  return visitCommaListExpression(node, expressionResultIsUnused2);
85173
85221
  case 295 /* CatchClause */:
85174
85222
  return visitCatchClause(node);
@@ -87364,7 +87412,7 @@ function transformES2015(context) {
87364
87412
  return visitParenthesizedExpression(node, expressionResultIsUnused2);
87365
87413
  case 223 /* BinaryExpression */:
87366
87414
  return visitBinaryExpression(node, expressionResultIsUnused2);
87367
- case 354 /* CommaListExpression */:
87415
+ case 355 /* CommaListExpression */:
87368
87416
  return visitCommaListExpression(node, expressionResultIsUnused2);
87369
87417
  case 14 /* NoSubstitutionTemplateLiteral */:
87370
87418
  case 15 /* TemplateHead */:
@@ -90059,7 +90107,7 @@ function transformGenerators(context) {
90059
90107
  switch (node.kind) {
90060
90108
  case 223 /* BinaryExpression */:
90061
90109
  return visitBinaryExpression(node);
90062
- case 354 /* CommaListExpression */:
90110
+ case 355 /* CommaListExpression */:
90063
90111
  return visitCommaListExpression(node);
90064
90112
  case 224 /* ConditionalExpression */:
90065
90113
  return visitConditionalExpression(node);
@@ -92144,9 +92192,9 @@ function transformModule(context) {
92144
92192
  return visitFunctionDeclaration(node);
92145
92193
  case 260 /* ClassDeclaration */:
92146
92194
  return visitClassDeclaration(node);
92147
- case 355 /* MergeDeclarationMarker */:
92195
+ case 356 /* MergeDeclarationMarker */:
92148
92196
  return visitMergeDeclarationMarker(node);
92149
- case 356 /* EndOfDeclarationMarker */:
92197
+ case 357 /* EndOfDeclarationMarker */:
92150
92198
  return visitEndOfDeclarationMarker(node);
92151
92199
  default:
92152
92200
  return visitor(node);
@@ -92163,7 +92211,7 @@ function transformModule(context) {
92163
92211
  return visitExpressionStatement(node);
92164
92212
  case 214 /* ParenthesizedExpression */:
92165
92213
  return visitParenthesizedExpression(node, valueIsDiscarded);
92166
- case 353 /* PartiallyEmittedExpression */:
92214
+ case 354 /* PartiallyEmittedExpression */:
92167
92215
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
92168
92216
  case 210 /* CallExpression */:
92169
92217
  if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) {
@@ -93938,9 +93986,9 @@ function transformSystemModule(context) {
93938
93986
  return visitCatchClause(node);
93939
93987
  case 238 /* Block */:
93940
93988
  return visitBlock(node);
93941
- case 355 /* MergeDeclarationMarker */:
93989
+ case 356 /* MergeDeclarationMarker */:
93942
93990
  return visitMergeDeclarationMarker(node);
93943
- case 356 /* EndOfDeclarationMarker */:
93991
+ case 357 /* EndOfDeclarationMarker */:
93944
93992
  return visitEndOfDeclarationMarker(node);
93945
93993
  default:
93946
93994
  return visitor(node);
@@ -94088,7 +94136,7 @@ function transformSystemModule(context) {
94088
94136
  return visitExpressionStatement(node);
94089
94137
  case 214 /* ParenthesizedExpression */:
94090
94138
  return visitParenthesizedExpression(node, valueIsDiscarded);
94091
- case 353 /* PartiallyEmittedExpression */:
94139
+ case 354 /* PartiallyEmittedExpression */:
94092
94140
  return visitPartiallyEmittedExpression(node, valueIsDiscarded);
94093
94141
  case 223 /* BinaryExpression */:
94094
94142
  if (isDestructuringAssignment(node)) {
@@ -96489,7 +96537,7 @@ function noEmitNotification(hint, node, callback) {
96489
96537
  }
96490
96538
  function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) {
96491
96539
  var _a2, _b;
96492
- const enabledSyntaxKindFeatures = new Array(358 /* Count */);
96540
+ const enabledSyntaxKindFeatures = new Array(359 /* Count */);
96493
96541
  let lexicalEnvironmentVariableDeclarations;
96494
96542
  let lexicalEnvironmentFunctionDeclarations;
96495
96543
  let lexicalEnvironmentStatements;
@@ -98207,6 +98255,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
98207
98255
  case 344 /* JSDocReturnTag */:
98208
98256
  case 345 /* JSDocThisTag */:
98209
98257
  case 346 /* JSDocTypeTag */:
98258
+ case 351 /* JSDocThrowsTag */:
98210
98259
  return emitJSDocSimpleTypedTag(node);
98211
98260
  case 347 /* JSDocTemplateTag */:
98212
98261
  return emitJSDocTemplateTag(node);
@@ -98214,9 +98263,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
98214
98263
  return emitJSDocTypedefTag(node);
98215
98264
  case 349 /* JSDocSeeTag */:
98216
98265
  return emitJSDocSeeTag(node);
98217
- case 352 /* NotEmittedStatement */:
98218
- case 356 /* EndOfDeclarationMarker */:
98219
- case 355 /* MergeDeclarationMarker */:
98266
+ case 353 /* NotEmittedStatement */:
98267
+ case 357 /* EndOfDeclarationMarker */:
98268
+ case 356 /* MergeDeclarationMarker */:
98220
98269
  return;
98221
98270
  }
98222
98271
  if (isExpression(node)) {
@@ -98311,18 +98360,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
98311
98360
  return emitJsxSelfClosingElement(node);
98312
98361
  case 285 /* JsxFragment */:
98313
98362
  return emitJsxFragment(node);
98314
- case 351 /* SyntaxList */:
98363
+ case 352 /* SyntaxList */:
98315
98364
  return Debug.fail("SyntaxList should not be printed");
98316
- case 352 /* NotEmittedStatement */:
98365
+ case 353 /* NotEmittedStatement */:
98317
98366
  return;
98318
- case 353 /* PartiallyEmittedExpression */:
98367
+ case 354 /* PartiallyEmittedExpression */:
98319
98368
  return emitPartiallyEmittedExpression(node);
98320
- case 354 /* CommaListExpression */:
98369
+ case 355 /* CommaListExpression */:
98321
98370
  return emitCommaList(node);
98322
- case 355 /* MergeDeclarationMarker */:
98323
- case 356 /* EndOfDeclarationMarker */:
98371
+ case 356 /* MergeDeclarationMarker */:
98372
+ case 357 /* EndOfDeclarationMarker */:
98324
98373
  return;
98325
- case 357 /* SyntheticReferenceExpression */:
98374
+ case 358 /* SyntheticReferenceExpression */:
98326
98375
  return Debug.fail("SyntheticReferenceExpression should not be printed");
98327
98376
  }
98328
98377
  }
@@ -101237,7 +101286,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
101237
101286
  const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */;
101238
101287
  if ((pos > 0 || end > 0) && pos !== end) {
101239
101288
  if (!skipLeadingComments) {
101240
- emitLeadingComments(pos, node.kind !== 352 /* NotEmittedStatement */);
101289
+ emitLeadingComments(pos, node.kind !== 353 /* NotEmittedStatement */);
101241
101290
  }
101242
101291
  if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) {
101243
101292
  containerPos = pos;
@@ -101260,7 +101309,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
101260
101309
  containerPos = savedContainerPos;
101261
101310
  containerEnd = savedContainerEnd;
101262
101311
  declarationListContainerEnd = savedDeclarationListContainerEnd;
101263
- if (!skipTrailingComments && node.kind !== 352 /* NotEmittedStatement */) {
101312
+ if (!skipTrailingComments && node.kind !== 353 /* NotEmittedStatement */) {
101264
101313
  emitTrailingComments(end);
101265
101314
  }
101266
101315
  }
@@ -101512,7 +101561,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
101512
101561
  }
101513
101562
  } else {
101514
101563
  const source = sourceMapRange.source || sourceMapSource;
101515
- if (node.kind !== 352 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
101564
+ if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) {
101516
101565
  emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
101517
101566
  }
101518
101567
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
@@ -101527,7 +101576,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
101527
101576
  if (emitFlags & 128 /* NoNestedSourceMaps */) {
101528
101577
  sourceMapsDisabled = false;
101529
101578
  }
101530
- if (node.kind !== 352 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
101579
+ if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) {
101531
101580
  emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
101532
101581
  }
101533
101582
  }
@@ -113105,6 +113154,7 @@ __export(ts_exports3, {
113105
113154
  isJSDocNode: () => isJSDocNode,
113106
113155
  isJSDocNonNullableType: () => isJSDocNonNullableType,
113107
113156
  isJSDocNullableType: () => isJSDocNullableType,
113157
+ isJSDocOptionalParameter: () => isJSDocOptionalParameter,
113108
113158
  isJSDocOptionalType: () => isJSDocOptionalType,
113109
113159
  isJSDocOverrideTag: () => isJSDocOverrideTag,
113110
113160
  isJSDocParameterTag: () => isJSDocParameterTag,
@@ -113120,6 +113170,7 @@ __export(ts_exports3, {
113120
113170
  isJSDocTag: () => isJSDocTag,
113121
113171
  isJSDocTemplateTag: () => isJSDocTemplateTag,
113122
113172
  isJSDocThisTag: () => isJSDocThisTag,
113173
+ isJSDocThrowsTag: () => isJSDocThrowsTag,
113123
113174
  isJSDocTypeAlias: () => isJSDocTypeAlias,
113124
113175
  isJSDocTypeAssertion: () => isJSDocTypeAssertion,
113125
113176
  isJSDocTypeExpression: () => isJSDocTypeExpression,
@@ -113250,6 +113301,7 @@ __export(ts_exports3, {
113250
113301
  isOmittedExpression: () => isOmittedExpression,
113251
113302
  isOptionalChain: () => isOptionalChain,
113252
113303
  isOptionalChainRoot: () => isOptionalChainRoot,
113304
+ isOptionalDeclaration: () => isOptionalDeclaration,
113253
113305
  isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag,
113254
113306
  isOptionalTypeNode: () => isOptionalTypeNode,
113255
113307
  isOuterExpression: () => isOuterExpression,
@@ -116120,7 +116172,7 @@ function buildLinkParts(link, checker) {
116120
116172
  if (text)
116121
116173
  parts.push(linkTextPart(text));
116122
116174
  } else {
116123
- parts.push(linkTextPart(name + (suffix || text.indexOf("://") === 0 ? "" : " ") + text));
116175
+ parts.push(linkTextPart(name + (suffix ? "" : " ") + text));
116124
116176
  }
116125
116177
  }
116126
116178
  parts.push(linkPart("}"));
@@ -116136,20 +116188,26 @@ function skipSeparatorFromLinkText(text) {
116136
116188
  return text;
116137
116189
  }
116138
116190
  function findLinkNameEnd(text) {
116191
+ let pos = text.indexOf("://");
116192
+ if (pos === 0) {
116193
+ while (pos < text.length && text.charCodeAt(pos) !== 124 /* bar */)
116194
+ pos++;
116195
+ return pos;
116196
+ }
116139
116197
  if (text.indexOf("()") === 0)
116140
116198
  return 2;
116141
- if (text[0] !== "<")
116142
- return 0;
116143
- let brackets2 = 0;
116144
- let i = 0;
116145
- while (i < text.length) {
116146
- if (text[i] === "<")
116147
- brackets2++;
116148
- if (text[i] === ">")
116149
- brackets2--;
116150
- i++;
116151
- if (!brackets2)
116152
- return i;
116199
+ if (text.charAt(0) === "<") {
116200
+ let brackets2 = 0;
116201
+ let i = 0;
116202
+ while (i < text.length) {
116203
+ if (text[i] === "<")
116204
+ brackets2++;
116205
+ if (text[i] === ">")
116206
+ brackets2--;
116207
+ i++;
116208
+ if (!brackets2)
116209
+ return i;
116210
+ }
116153
116211
  }
116154
116212
  return 0;
116155
116213
  }
@@ -117796,7 +117854,7 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span)
117796
117854
  pushClassification(start2, width, 1 /* comment */);
117797
117855
  }
117798
117856
  function classifyJSDocComment(docComment) {
117799
- var _a2, _b, _c, _d, _e, _f, _g;
117857
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
117800
117858
  let pos = docComment.pos;
117801
117859
  if (docComment.tags) {
117802
117860
  for (const tag of docComment.tags) {
@@ -117850,6 +117908,11 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span)
117850
117908
  case 332 /* JSDocImplementsTag */:
117851
117909
  commentStart = tag.class.end;
117852
117910
  break;
117911
+ case 351 /* JSDocThrowsTag */:
117912
+ processElement(tag.typeExpression);
117913
+ pos = tag.end;
117914
+ commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart;
117915
+ break;
117853
117916
  }
117854
117917
  if (typeof tag.comment === "object") {
117855
117918
  pushCommentRange(tag.comment.pos, tag.comment.end - tag.comment.pos);
@@ -120837,7 +120900,7 @@ var NodeObject = class {
120837
120900
  if (!children.length) {
120838
120901
  return void 0;
120839
120902
  }
120840
- const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 350 /* LastJSDocNode */);
120903
+ const child = find(children, (kid) => kid.kind < 312 /* FirstJSDocNode */ || kid.kind > 351 /* LastJSDocNode */);
120841
120904
  return child.kind < 163 /* FirstNode */ ? child : child.getFirstToken(sourceFile);
120842
120905
  }
120843
120906
  getLastToken(sourceFile) {
@@ -120904,7 +120967,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) {
120904
120967
  }
120905
120968
  }
120906
120969
  function createSyntaxList(nodes, parent2) {
120907
- const list = createNode(351 /* SyntaxList */, nodes.pos, nodes.end, parent2);
120970
+ const list = createNode(352 /* SyntaxList */, nodes.pos, nodes.end, parent2);
120908
120971
  list._children = [];
120909
120972
  let pos = nodes.pos;
120910
120973
  for (const node of nodes) {
@@ -131905,6 +131968,9 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con
131905
131968
  addClassElement(method);
131906
131969
  }
131907
131970
  function createName(node) {
131971
+ if (isIdentifier(node) && node.escapedText === "constructor") {
131972
+ return factory.createComputedPropertyName(factory.createStringLiteral(idText(node), quotePreference === 0 /* Single */));
131973
+ }
131908
131974
  return getSynthesizedDeepClone(node, false);
131909
131975
  }
131910
131976
  function createBody(block, quotePreference2, ambient2) {
@@ -135025,6 +135091,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
135025
135091
  case 344 /* JSDocReturnTag */:
135026
135092
  case 346 /* JSDocTypeTag */:
135027
135093
  case 348 /* JSDocTypedefTag */:
135094
+ case 351 /* JSDocThrowsTag */:
135028
135095
  return true;
135029
135096
  case 347 /* JSDocTemplateTag */:
135030
135097
  return !!tag.constraint;
@@ -136226,7 +136293,7 @@ function getPropertiesForCompletion(type, checker) {
136226
136293
  }
136227
136294
  function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
136228
136295
  switch (location.kind) {
136229
- case 351 /* SyntaxList */:
136296
+ case 352 /* SyntaxList */:
136230
136297
  return tryCast(location.parent, isObjectTypeDeclaration);
136231
136298
  case 1 /* EndOfFileToken */:
136232
136299
  const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration);
@@ -140262,6 +140329,9 @@ function getCommentDisplayParts(tag, checker) {
140262
140329
  const { comment, kind } = tag;
140263
140330
  const namePart = getTagNameDisplayPart(kind);
140264
140331
  switch (kind) {
140332
+ case 351 /* JSDocThrowsTag */:
140333
+ const typeExpression = tag.typeExpression;
140334
+ return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker);
140265
140335
  case 332 /* JSDocImplementsTag */:
140266
140336
  return withNode(tag.class);
140267
140337
  case 331 /* JSDocAugmentsTag */:
@@ -163730,6 +163800,7 @@ start(initializeNodeSystem(), require("os").platform());
163730
163800
  isJSDocNode,
163731
163801
  isJSDocNonNullableType,
163732
163802
  isJSDocNullableType,
163803
+ isJSDocOptionalParameter,
163733
163804
  isJSDocOptionalType,
163734
163805
  isJSDocOverrideTag,
163735
163806
  isJSDocParameterTag,
@@ -163745,6 +163816,7 @@ start(initializeNodeSystem(), require("os").platform());
163745
163816
  isJSDocTag,
163746
163817
  isJSDocTemplateTag,
163747
163818
  isJSDocThisTag,
163819
+ isJSDocThrowsTag,
163748
163820
  isJSDocTypeAlias,
163749
163821
  isJSDocTypeAssertion,
163750
163822
  isJSDocTypeExpression,
@@ -163875,6 +163947,7 @@ start(initializeNodeSystem(), require("os").platform());
163875
163947
  isOmittedExpression,
163876
163948
  isOptionalChain,
163877
163949
  isOptionalChainRoot,
163950
+ isOptionalDeclaration,
163878
163951
  isOptionalJSDocPropertyLikeTag,
163879
163952
  isOptionalTypeNode,
163880
163953
  isOuterExpression,