Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptinferSingle-choice MCQ

What is the type of `R`, given that `infer R` appears in the return position of two overload signatures?

type Ret<T> = T extends { (): string; (x: number): infer R; } ? R : never; type R = Ret<{ (): string; (x: number): boolean }>;