mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
jsdoc template tags might be unmatched (#32936)
* jsdoc template tags might be unmatched * Update fourslash test
This commit is contained in:
committed by
GitHub
parent
1b46d8fd8f
commit
2b8ccf40ae
@@ -2343,7 +2343,7 @@ namespace ts {
|
||||
export function getTypeParameterFromJsDoc(node: TypeParameterDeclaration & { parent: JSDocTemplateTag }): TypeParameterDeclaration | undefined {
|
||||
const name = node.name.escapedText;
|
||||
const { typeParameters } = (node.parent.parent.parent as SignatureDeclaration | InterfaceDeclaration | ClassDeclaration);
|
||||
return find(typeParameters!, p => p.name.escapedText === name);
|
||||
return typeParameters && find(typeParameters, p => p.name.escapedText === name);
|
||||
}
|
||||
|
||||
export function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean {
|
||||
|
||||
Reference in New Issue
Block a user