Skip to content

Commit

Permalink
Single boolean expression
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Sep 4, 2018
1 parent 64bbf5e commit 3b24fba
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,7 @@ namespace ts {
}

function isJSDocTypeExpressionOrChild(node: Node): boolean {
if (node.kind === SyntaxKind.JSDocTypeExpression) {
return true;
}
if (node.parent) {
return isJSDocTypeExpressionOrChild(node.parent);
}
return false;
return node.kind === SyntaxKind.JSDocTypeExpression || (node.parent && isJSDocTypeExpressionOrChild(node.parent));
}

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

0 comments on commit 3b24fba

Please sign in to comment.