Why does a Typescript type conditional on `T extends undefined`, with T instantiated with `boolean`, resolve T to `never`?
As written, type OptionalArgBroken<Arg> = Arg extends undefined ? () => void : (arg: Arg) => void; is a distributive conditional type because the type being checked, Arg, is a naked generic type parameter. “Distributive” means that if the Arg passed in is a union, then the type will be evaluated for each member of … Read more