typescript 5.1.0-dev.20230427 → 5.1.0-dev.20230428

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
@@ -2303,7 +2303,7 @@ module.exports = __toCommonJS(server_exports);
2303
2303
 
2304
2304
  // src/compiler/corePublic.ts
2305
2305
  var versionMajorMinor = "5.1";
2306
- var version = `${versionMajorMinor}.0-dev.20230427`;
2306
+ var version = `${versionMajorMinor}.0-dev.20230428`;
2307
2307
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2308
2308
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2309
2309
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -17584,6 +17584,7 @@ function canHaveJSDoc(node) {
17584
17584
  case 171 /* PropertyDeclaration */:
17585
17585
  case 170 /* PropertySignature */:
17586
17586
  case 252 /* ReturnStatement */:
17587
+ case 239 /* SemicolonClassElement */:
17587
17588
  case 177 /* SetAccessor */:
17588
17589
  case 303 /* ShorthandPropertyAssignment */:
17589
17590
  case 304 /* SpreadAssignment */:
@@ -35486,11 +35487,11 @@ var Parser;
35486
35487
  }
35487
35488
  function parseClassElement() {
35488
35489
  const pos = getNodePos();
35490
+ const hasJSDoc = hasPrecedingJSDocComment();
35489
35491
  if (token() === 27 /* SemicolonToken */) {
35490
35492
  nextToken();
35491
- return finishNode(factory2.createSemicolonClassElement(), pos);
35493
+ return withJSDoc(finishNode(factory2.createSemicolonClassElement(), pos), hasJSDoc);
35492
35494
  }
35493
- const hasJSDoc = hasPrecedingJSDocComment();
35494
35495
  const modifiers = parseModifiers(
35495
35496
  /*allowDecorators*/
35496
35497
  true,
@@ -48291,13 +48292,14 @@ function createTypeChecker(host) {
48291
48292
  return diagnostic;
48292
48293
  }
48293
48294
  function isDeprecatedSymbol(symbol) {
48294
- if (length(symbol.declarations) > 1) {
48295
- const parentSymbol = getParentOfSymbol(symbol);
48296
- if (parentSymbol && parentSymbol.flags & 64 /* Interface */) {
48297
- return some(symbol.declarations, (d) => !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */));
48298
- }
48295
+ const parentSymbol = getParentOfSymbol(symbol);
48296
+ if (parentSymbol && length(symbol.declarations) > 1) {
48297
+ return parentSymbol.flags & 64 /* Interface */ ? some(symbol.declarations, isDeprecatedDeclaration2) : every(symbol.declarations, isDeprecatedDeclaration2);
48299
48298
  }
48300
- return !!(getDeclarationNodeFlagsFromSymbol(symbol) & 268435456 /* Deprecated */);
48299
+ return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2);
48300
+ }
48301
+ function isDeprecatedDeclaration2(declaration) {
48302
+ return !!(getCombinedNodeFlags(declaration) & 268435456 /* Deprecated */);
48301
48303
  }
48302
48304
  function addDeprecatedSuggestion(location, declarations, deprecatedEntity) {
48303
48305
  const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity);
@@ -70457,7 +70459,7 @@ function createTypeChecker(host) {
70457
70459
  markAliasReferenced(symbol, node);
70458
70460
  }
70459
70461
  const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
70460
- const targetSymbol = checkDeprecatedAliasedSymbol(localOrExportSymbol, node);
70462
+ const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node);
70461
70463
  if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
70462
70464
  addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
70463
70465
  }
@@ -73461,8 +73463,9 @@ function createTypeChecker(host) {
73461
73463
  addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText);
73462
73464
  }
73463
73465
  } else {
73464
- if (isDeprecatedSymbol(prop) && isUncalledFunctionReference(node, prop) && prop.declarations) {
73465
- addDeprecatedSuggestion(right, prop.declarations, right.escapedText);
73466
+ const targetPropSymbol = resolveAliasWithDeprecationCheck(prop, right);
73467
+ if (isDeprecatedSymbol(targetPropSymbol) && isUncalledFunctionReference(node, targetPropSymbol) && targetPropSymbol.declarations) {
73468
+ addDeprecatedSuggestion(right, targetPropSymbol.declarations, right.escapedText);
73466
73469
  }
73467
73470
  checkPropertyNotUsedBeforeDeclaration(prop, node, right);
73468
73471
  markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol));
@@ -83738,19 +83741,17 @@ function createTypeChecker(host) {
83738
83741
  }
83739
83742
  }
83740
83743
  if (isImportSpecifier(node)) {
83741
- const targetSymbol = checkDeprecatedAliasedSymbol(symbol, node);
83742
- if (isDeprecatedAliasedSymbol(targetSymbol) && targetSymbol.declarations) {
83744
+ const targetSymbol = resolveAliasWithDeprecationCheck(symbol, node);
83745
+ if (isDeprecatedSymbol(targetSymbol) && targetSymbol.declarations) {
83743
83746
  addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName);
83744
83747
  }
83745
83748
  }
83746
83749
  }
83747
83750
  }
83748
- function isDeprecatedAliasedSymbol(symbol) {
83749
- return !!symbol.declarations && every(symbol.declarations, (d) => !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */));
83750
- }
83751
- function checkDeprecatedAliasedSymbol(symbol, location) {
83752
- if (!(symbol.flags & 2097152 /* Alias */))
83751
+ function resolveAliasWithDeprecationCheck(symbol, location) {
83752
+ if (!(symbol.flags & 2097152 /* Alias */) || isDeprecatedSymbol(symbol) || !getDeclarationOfAliasSymbol(symbol)) {
83753
83753
  return symbol;
83754
+ }
83754
83755
  const targetSymbol = resolveAlias(symbol);
83755
83756
  if (targetSymbol === unknownSymbol)
83756
83757
  return targetSymbol;
@@ -83760,7 +83761,7 @@ function createTypeChecker(host) {
83760
83761
  if (target === targetSymbol)
83761
83762
  break;
83762
83763
  if (target.declarations && length(target.declarations)) {
83763
- if (isDeprecatedAliasedSymbol(target)) {
83764
+ if (isDeprecatedSymbol(target)) {
83764
83765
  addDeprecatedSuggestion(location, target.declarations, target.escapedName);
83765
83766
  break;
83766
83767
  } else {
@@ -106233,12 +106234,56 @@ function transformModule(context) {
106233
106234
  return visitExportDeclaration(node);
106234
106235
  case 276 /* ExportAssignment */:
106235
106236
  return visitExportAssignment(node);
106237
+ case 261 /* FunctionDeclaration */:
106238
+ return visitFunctionDeclaration(node);
106239
+ case 262 /* ClassDeclaration */:
106240
+ return visitClassDeclaration(node);
106241
+ default:
106242
+ return topLevelNestedVisitor(node);
106243
+ }
106244
+ }
106245
+ function topLevelNestedVisitor(node) {
106246
+ switch (node.kind) {
106236
106247
  case 242 /* VariableStatement */:
106237
106248
  return visitVariableStatement(node);
106238
106249
  case 261 /* FunctionDeclaration */:
106239
106250
  return visitFunctionDeclaration(node);
106240
106251
  case 262 /* ClassDeclaration */:
106241
106252
  return visitClassDeclaration(node);
106253
+ case 247 /* ForStatement */:
106254
+ return visitForStatement(
106255
+ node,
106256
+ /*isTopLevel*/
106257
+ true
106258
+ );
106259
+ case 248 /* ForInStatement */:
106260
+ return visitForInStatement(node);
106261
+ case 249 /* ForOfStatement */:
106262
+ return visitForOfStatement(node);
106263
+ case 245 /* DoStatement */:
106264
+ return visitDoStatement(node);
106265
+ case 246 /* WhileStatement */:
106266
+ return visitWhileStatement(node);
106267
+ case 255 /* LabeledStatement */:
106268
+ return visitLabeledStatement(node);
106269
+ case 253 /* WithStatement */:
106270
+ return visitWithStatement(node);
106271
+ case 244 /* IfStatement */:
106272
+ return visitIfStatement(node);
106273
+ case 254 /* SwitchStatement */:
106274
+ return visitSwitchStatement(node);
106275
+ case 268 /* CaseBlock */:
106276
+ return visitCaseBlock(node);
106277
+ case 295 /* CaseClause */:
106278
+ return visitCaseClause(node);
106279
+ case 296 /* DefaultClause */:
106280
+ return visitDefaultClause(node);
106281
+ case 257 /* TryStatement */:
106282
+ return visitTryStatement(node);
106283
+ case 298 /* CatchClause */:
106284
+ return visitCatchClause(node);
106285
+ case 240 /* Block */:
106286
+ return visitBlock(node);
106242
106287
  default:
106243
106288
  return visitor(node);
106244
106289
  }
@@ -106249,7 +106294,11 @@ function transformModule(context) {
106249
106294
  }
106250
106295
  switch (node.kind) {
106251
106296
  case 247 /* ForStatement */:
106252
- return visitForStatement(node);
106297
+ return visitForStatement(
106298
+ node,
106299
+ /*isTopLevel*/
106300
+ false
106301
+ );
106253
106302
  case 243 /* ExpressionStatement */:
106254
106303
  return visitExpressionStatement(node);
106255
106304
  case 216 /* ParenthesizedExpression */:
@@ -106334,15 +106383,177 @@ function transformModule(context) {
106334
106383
  }
106335
106384
  return visitEachChild(node, visitor, context);
106336
106385
  }
106337
- function visitForStatement(node) {
106386
+ function visitForStatement(node, isTopLevel) {
106387
+ if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) {
106388
+ const exportStatements = appendExportsOfVariableDeclarationList(
106389
+ /*statements*/
106390
+ void 0,
106391
+ node.initializer,
106392
+ /*isForInOrOfInitializer*/
106393
+ false
106394
+ );
106395
+ if (exportStatements) {
106396
+ const statements = [];
106397
+ const varDeclList = visitNode(node.initializer, discardedValueVisitor, isVariableDeclarationList);
106398
+ const varStatement = factory2.createVariableStatement(
106399
+ /*modifiers*/
106400
+ void 0,
106401
+ varDeclList
106402
+ );
106403
+ statements.push(varStatement);
106404
+ addRange(statements, exportStatements);
106405
+ const condition = visitNode(node.condition, visitor, isExpression);
106406
+ const incrementor = visitNode(node.incrementor, discardedValueVisitor, isExpression);
106407
+ const body = visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context);
106408
+ statements.push(factory2.updateForStatement(
106409
+ node,
106410
+ /*initializer*/
106411
+ void 0,
106412
+ condition,
106413
+ incrementor,
106414
+ body
106415
+ ));
106416
+ return statements;
106417
+ }
106418
+ }
106338
106419
  return factory2.updateForStatement(
106339
106420
  node,
106340
106421
  visitNode(node.initializer, discardedValueVisitor, isForInitializer),
106341
106422
  visitNode(node.condition, visitor, isExpression),
106342
106423
  visitNode(node.incrementor, discardedValueVisitor, isExpression),
106343
- visitIterationBody(node.statement, visitor, context)
106424
+ visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context)
106344
106425
  );
106345
106426
  }
106427
+ function visitForInStatement(node) {
106428
+ if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) {
106429
+ const exportStatements = appendExportsOfVariableDeclarationList(
106430
+ /*statements*/
106431
+ void 0,
106432
+ node.initializer,
106433
+ /*isForInOrOfInitializer*/
106434
+ true
106435
+ );
106436
+ if (some(exportStatements)) {
106437
+ const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer);
106438
+ const expression = visitNode(node.expression, visitor, isExpression);
106439
+ const body = visitIterationBody(node.statement, topLevelNestedVisitor, context);
106440
+ const mergedBody = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock(
106441
+ [...exportStatements, body],
106442
+ /*multiLine*/
106443
+ true
106444
+ );
106445
+ return factory2.updateForInStatement(node, initializer, expression, mergedBody);
106446
+ }
106447
+ }
106448
+ return factory2.updateForInStatement(
106449
+ node,
106450
+ visitNode(node.initializer, discardedValueVisitor, isForInitializer),
106451
+ visitNode(node.expression, visitor, isExpression),
106452
+ visitIterationBody(node.statement, topLevelNestedVisitor, context)
106453
+ );
106454
+ }
106455
+ function visitForOfStatement(node) {
106456
+ if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) {
106457
+ const exportStatements = appendExportsOfVariableDeclarationList(
106458
+ /*statements*/
106459
+ void 0,
106460
+ node.initializer,
106461
+ /*isForInOrOfInitializer*/
106462
+ true
106463
+ );
106464
+ const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer);
106465
+ const expression = visitNode(node.expression, visitor, isExpression);
106466
+ let body = visitIterationBody(node.statement, topLevelNestedVisitor, context);
106467
+ if (some(exportStatements)) {
106468
+ body = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock(
106469
+ [...exportStatements, body],
106470
+ /*multiLine*/
106471
+ true
106472
+ );
106473
+ }
106474
+ return factory2.updateForOfStatement(node, node.awaitModifier, initializer, expression, body);
106475
+ }
106476
+ return factory2.updateForOfStatement(
106477
+ node,
106478
+ node.awaitModifier,
106479
+ visitNode(node.initializer, discardedValueVisitor, isForInitializer),
106480
+ visitNode(node.expression, visitor, isExpression),
106481
+ visitIterationBody(node.statement, topLevelNestedVisitor, context)
106482
+ );
106483
+ }
106484
+ function visitDoStatement(node) {
106485
+ return factory2.updateDoStatement(
106486
+ node,
106487
+ visitIterationBody(node.statement, topLevelNestedVisitor, context),
106488
+ visitNode(node.expression, visitor, isExpression)
106489
+ );
106490
+ }
106491
+ function visitWhileStatement(node) {
106492
+ return factory2.updateWhileStatement(
106493
+ node,
106494
+ visitNode(node.expression, visitor, isExpression),
106495
+ visitIterationBody(node.statement, topLevelNestedVisitor, context)
106496
+ );
106497
+ }
106498
+ function visitLabeledStatement(node) {
106499
+ return factory2.updateLabeledStatement(
106500
+ node,
106501
+ node.label,
106502
+ Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
106503
+ );
106504
+ }
106505
+ function visitWithStatement(node) {
106506
+ return factory2.updateWithStatement(
106507
+ node,
106508
+ visitNode(node.expression, visitor, isExpression),
106509
+ Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
106510
+ );
106511
+ }
106512
+ function visitIfStatement(node) {
106513
+ return factory2.updateIfStatement(
106514
+ node,
106515
+ visitNode(node.expression, visitor, isExpression),
106516
+ Debug.checkDefined(visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)),
106517
+ visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
106518
+ );
106519
+ }
106520
+ function visitSwitchStatement(node) {
106521
+ return factory2.updateSwitchStatement(
106522
+ node,
106523
+ visitNode(node.expression, visitor, isExpression),
106524
+ Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
106525
+ );
106526
+ }
106527
+ function visitCaseBlock(node) {
106528
+ return factory2.updateCaseBlock(
106529
+ node,
106530
+ visitNodes2(node.clauses, topLevelNestedVisitor, isCaseOrDefaultClause)
106531
+ );
106532
+ }
106533
+ function visitCaseClause(node) {
106534
+ return factory2.updateCaseClause(
106535
+ node,
106536
+ visitNode(node.expression, visitor, isExpression),
106537
+ visitNodes2(node.statements, topLevelNestedVisitor, isStatement)
106538
+ );
106539
+ }
106540
+ function visitDefaultClause(node) {
106541
+ return visitEachChild(node, topLevelNestedVisitor, context);
106542
+ }
106543
+ function visitTryStatement(node) {
106544
+ return visitEachChild(node, topLevelNestedVisitor, context);
106545
+ }
106546
+ function visitCatchClause(node) {
106547
+ return factory2.updateCatchClause(
106548
+ node,
106549
+ node.variableDeclaration,
106550
+ Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
106551
+ );
106552
+ }
106553
+ function visitBlock(node) {
106554
+ node = visitEachChild(node, topLevelNestedVisitor, context);
106555
+ return node;
106556
+ }
106346
106557
  function visitExpressionStatement(node) {
106347
106558
  return factory2.updateExpressionStatement(
106348
106559
  node,
@@ -107135,25 +107346,33 @@ function transformModule(context) {
107135
107346
  return appendExportsOfDeclaration(statements, decl);
107136
107347
  }
107137
107348
  function appendExportsOfVariableStatement(statements, node) {
107349
+ return appendExportsOfVariableDeclarationList(
107350
+ statements,
107351
+ node.declarationList,
107352
+ /*isForInOrOfInitializer*/
107353
+ false
107354
+ );
107355
+ }
107356
+ function appendExportsOfVariableDeclarationList(statements, node, isForInOrOfInitializer) {
107138
107357
  if (currentModuleInfo.exportEquals) {
107139
107358
  return statements;
107140
107359
  }
107141
- for (const decl of node.declarationList.declarations) {
107142
- statements = appendExportsOfBindingElement(statements, decl);
107360
+ for (const decl of node.declarations) {
107361
+ statements = appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer);
107143
107362
  }
107144
107363
  return statements;
107145
107364
  }
107146
- function appendExportsOfBindingElement(statements, decl) {
107365
+ function appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer) {
107147
107366
  if (currentModuleInfo.exportEquals) {
107148
107367
  return statements;
107149
107368
  }
107150
107369
  if (isBindingPattern(decl.name)) {
107151
107370
  for (const element of decl.name.elements) {
107152
107371
  if (!isOmittedExpression(element)) {
107153
- statements = appendExportsOfBindingElement(statements, element);
107372
+ statements = appendExportsOfBindingElement(statements, element, isForInOrOfInitializer);
107154
107373
  }
107155
107374
  }
107156
- } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer)) {
107375
+ } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) {
107157
107376
  statements = appendExportsOfDeclaration(statements, decl);
107158
107377
  }
107159
107378
  return statements;
@@ -181544,7 +181763,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181544
181763
  getApplicableRefactors(args) {
181545
181764
  const { file, project } = this.getFileAndProject(args);
181546
181765
  const scriptInfo = project.getScriptInfoForNormalizedPath(file);
181547
- return project.getLanguageService().getApplicableRefactors(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file), args.triggerReason, args.kind);
181766
+ return project.getLanguageService().getApplicableRefactors(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file), args.triggerReason, args.kind, args.includeInteractiveActions);
181548
181767
  }
181549
181768
  getEditsForRefactor(args, simplifiedResult) {
181550
181769
  const { file, project } = this.getFileAndProject(args);
@@ -4597,7 +4597,7 @@ declare namespace ts {
4597
4597
  interface FlowContainer extends Node {
4598
4598
  _flowContainerBrand: any;
4599
4599
  }
4600
- type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
4600
+ type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | SemicolonClassElement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
4601
4601
  type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
4602
4602
  type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
4603
4603
  type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -4876,7 +4876,7 @@ declare namespace ts {
4876
4876
  readonly body?: FunctionBody | undefined;
4877
4877
  }
4878
4878
  /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
4879
- interface SemicolonClassElement extends ClassElement {
4879
+ interface SemicolonClassElement extends ClassElement, JSDocContainer {
4880
4880
  readonly kind: SyntaxKind.SemicolonClassElement;
4881
4881
  readonly parent: ClassLikeDeclaration;
4882
4882
  }