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

For these two extractors, what are `R1` and `R2`?

type Co<T> = T extends { a: infer U; b: infer U } ? U : never; type R1 = Co<{ a: string; b: number }>; type Contra<T> = T extends { a: (x: infer U) => void; b: (x: infer U) => void } ? U : never; type R2 = Contra<{ a: (x: string) => void; b: (x: number) => void }>;