Narrow a union with a type guard Typescript A predicate returning `x is T` teaches the compiler what a runtime check proved. TypeScript types narrowing chris