We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64bbf5e commit 3b24fbaCopy full SHA for 3b24fba
src/compiler/utilities.ts
@@ -491,13 +491,7 @@ namespace ts {
491
}
492
493
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;
+ return node.kind === SyntaxKind.JSDocTypeExpression || (node.parent && isJSDocTypeExpressionOrChild(node.parent));
501
502
503
export function getTextOfNodeFromSourceText(sourceText: string, node: Node, includeTrivia = false): string {
0 commit comments