Open
Description
TypeScript Version: master
Search Terms:
Code
Our declaration:
export interface JSDocSignature extends JSDocType, Declaration {
kind: SyntaxKind.JSDocSignature;
typeParameters?: ReadonlyArray<JSDocTemplateTag>;
...
}
Attempt to use:
/**
* @callback Cb
* @template T
* @param {T} p
* @return {T}
*/
/** @type {Cb} */
const x = p => p;
Expected behavior:
typeParameters
is set somewhere, and type Cb = <T>(p: T) => T
(or type Cb<T> = (p: T) => T
)
Actual behavior:
typeParameters
is not set.Cb
says that it requires a generic argument, but when provided, there's an error onx
: 'any => any' isn't assignable to 'Cb'.- Requesting quickinfo on
Cb/**/<number>
causes an infinite recursion ingetTypePredicateOfSignature
.