You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example code below the arrow function has correct type inference while the function example is unable to infer the parameter type and falls back to any.
declarefunctionmonitor<Textends(...args: any)=>any>(extractor: (...args: Parameters<T>)=>Record<string,unknown>,executor: T,): (...args: Parameters<T>)=>ReturnType<T>;monitor((p)=>({ p }),(p: number)=>p);monitor((p)=>({ p }),function(p: number){returnp;});
The text was updated successfully, but these errors were encountered:
In the example code below the arrow function has correct type inference while the function example is unable to infer the parameter type and falls back to
any
.The text was updated successfully, but these errors were encountered: