Skip to content

Commit 3b24fba

Browse files
committed
Single boolean expression
1 parent 64bbf5e commit 3b24fba

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/compiler/utilities.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -491,13 +491,7 @@ namespace ts {
491491
}
492492

493493
function isJSDocTypeExpressionOrChild(node: Node): boolean {
494-
if (node.kind === SyntaxKind.JSDocTypeExpression) {
495-
return true;
496-
}
497-
if (node.parent) {
498-
return isJSDocTypeExpressionOrChild(node.parent);
499-
}
500-
return false;
494+
return node.kind === SyntaxKind.JSDocTypeExpression || (node.parent && isJSDocTypeExpressionOrChild(node.parent));
501495
}
502496

503497
export function getTextOfNodeFromSourceText(sourceText: string, node: Node, includeTrivia = false): string {

0 commit comments

Comments
 (0)