Bug Report
typeApplyFn<Fnextends(item: any)=>any,T>=Fnextends(item: T)=> infer R ? R : nevertypeX=ApplyFn<(x: number)=>string,number>
type X is string
typeFn=<T>(item: T)=>{foo: T}typeY=ApplyFn<Fn,string>type Y is {foo: unknown} but I have expected {foo: string}
🔎 Search Terms
infer generic function return type
⏯ Playground Link
Playground link with relevant code
Is there any workaround to solve this problem?
Bug Report
type X is
stringtype Y is
{foo: unknown}but I have expected{foo: string}🔎 Search Terms
infer generic function return type
⏯ Playground Link
Playground link with relevant code
Is there any workaround to solve this problem?