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

When `infer E` appears inside an array element and the input is a union of arrays, what is `E`?

type ElemOf<T> = T extends (infer E)[] ? E : never; type E = ElemOf<string[] | number[]>;