Learn that NonNullable strips null and undefined from a single type.
type MaybeName = string | null | undefined; type Name = NonNullable<MaybeName, string>;
What is the bug in this code?