Fix doc comment template on assignment expressions (#38032)

This commit is contained in:
Andrew Branch
2020-04-20 10:15:12 -08:00
committed by GitHub
parent 5d78cbdbbd
commit 547fd12c2f
2 changed files with 17 additions and 0 deletions

View File

@@ -363,6 +363,8 @@ namespace ts.JsDoc {
// want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'.
return commentOwner.parent.kind === SyntaxKind.ModuleDeclaration ? undefined : { commentOwner };
case SyntaxKind.ExpressionStatement:
return getCommentOwnerInfoWorker((commentOwner as ExpressionStatement).expression);
case SyntaxKind.BinaryExpression: {
const be = commentOwner as BinaryExpression;
if (getAssignmentDeclarationKind(be) === AssignmentDeclarationKind.None) {