fix(48406): resolve JSDoc host of property signature (#48407)

This commit is contained in:
Oleksandr T authored and GitHub committed 2022-04-04 14:42:50 -07:00
1 parent 3b12284fc4
commit e5ca3e4386
3 files changed
+67 -1

No files matched your search

+5 -1
View File
@@ -2825,7 +2825,11 @@ namespace ts {
export function getHostSignatureFromJSDoc(node: Node): SignatureDeclaration | undefined {
const host = getEffectiveJSDocHost(node);
return host && isFunctionLike(host) ? host : undefined;
if (host) {
return isPropertySignature(host) && host.type && isFunctionLike(host.type) ? host.type :
isFunctionLike(host) ? host : undefined;
}
return undefined;
}
export function getEffectiveJSDocHost(node: Node): Node | undefined {