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

How does TypeScript handle the `never` member when this distributive conditional is applied to a union containing `never`?

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