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

When a single `infer` variable appears in a covariant position inside a tuple element and the conditional is matched against a union, how does the compiler ultimately combine candidates? Consider how `R` resolves here.

type Element<T> = T extends readonly (infer U)[] ? U : never; type R = Element<(string[] | number[])>;