Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptconditional-type distributionSingle-choice MCQ1 views

A distributive conditional type `type ToArray<T> = T extends unknown ? T[] : never` is instantiated as `ToArray<string | number>`. What is the *resolved* type, and why?

type ToArray<T> = T extends unknown ? T[] : never; type R = ToArray<string | number>;