Type alias EmptyArrayToNever<T, NeverArrayToNever>
EmptyArrayToNever<T, NeverArrayToNever extends number>:T extends [] ? never : NeverArrayToNever extends 1 ? T extends [never, ...(infer Rest)] ? [EmptyArrayToNever<Rest>] extends [never] ? never : T : T : T