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

Inference collects candidates per type parameter. For the call below, why is the second argument rejected rather than `T` being inferred as `1 | 2`?

declare function pick<T>(a: T, b: T): T; const r = pick(1, "x");