I want to have multiple call signatures in an interface, such that they have different generic arguments
interface GenericIdentityFn {
<T>(arg: T): T;
<T, F>(arg1: T, arg2: F): [T, F];
}
function identity<T>(arg: T): T {
return arg;
}
// error: duplicate definition
function identity<T, F>(arg1: T, arg2: F): [T, F] {
return [arg1, arg2];
}
let myIdentity: GenericIdentityFn = identity;
console.log(myIdentity("hello"));