use the literal amount of the object with the call signature to define the generic function
interface IGenericIdentityFn1 {
}
function identity<T>(arg: T): T {
return arg;
}
const myIdentityFn: {<T>(arg: T): T} = identity;
const myIdentityFn2: IGenericIdentityFn1 = identity;
both of these methods report errors
ERROR:
callable-types: Type literal has only a call signature-use < T > (arg: t) = > T
instead
could you tell me how to solve it?