We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04a3512 commit 1df7997Copy full SHA for 1df7997
src/compiler/utilities.ts
@@ -3114,9 +3114,9 @@ namespace ts {
3114
}
3115
3116
export function getJSDocTypeParameterDeclarations(node: DeclarationWithTypeParameters): ReadonlyArray<TypeParameterDeclaration> {
3117
- const tags = filter(getJSDocTags(node), isJSDocTemplateTag);
3118
// template tags are only available when a typedef isn't already using them
3119
- const tag = find(tags, tag => !(tag.parent.kind === SyntaxKind.JSDocComment && find(tag.parent.tags, isJSDocTypeAlias)));
+ const tag = find(getJSDocTags(node), (tag): tag is JSDocTemplateTag =>
+ isJSDocTemplateTag(tag) && !(tag.parent.kind === SyntaxKind.JSDocComment && tag.parent.tags!.some(isJSDocTypeAlias)));
3120
return (tag && tag.typeParameters) || emptyArray;
3121
3122
0 commit comments