Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptconditional typesSingle-choice MCQ

`f` is an overloaded function. Using a conditional type with `infer` on its type, what is `R`?

declare function f(x: string): number; declare function f(x: number): string; type R = typeof f extends (...args: any[]) => infer Ret ? Ret : never;