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

Repeating an `infer` variable across two function-parameter positions changes the rule. What is `Result`?

type Merge<T> = T extends { a: (x: infer U) => void; b: (x: infer U) => void; } ? U : never; type Result = Merge<{ a: (x: string) => void; b: (x: number) => void }>;