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

When the same `infer` variable appears in two function-parameter positions, what is the type of `R`?

type BothParams<T> = T extends (a: infer P, b: infer P) => void ? P : never; type R = BothParams<(a: string, b: number) => void>;