Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptinference internalsSingle-choice MCQ

For the call below, the first callback's parameter type wins and the second argument errors. What does this reveal about how `infer`/inference handles multiple contravariant candidates?

type Fn<T> = (x: T) => void; declare function inf<T>(a: Fn<T>, b: Fn<T>): T; const r = inf((x: { a: 1 }) => {}, (x: { b: 2 }) => {});