12.8 NonNullable<T>, Exclude<T, U>, and Extract<T, U>
Right, let’s talk about the TypeScript janitors: NonNullable<T>, Exclude<T, U>, and Extract<T, U>. These are the utility types you call in when you’ve got a mess of possible types and you need to clean house, removing the junk and keeping only what you actually want. They’re the foundation for writing type logic that feels intelligent, rather than just descriptive. What They Do (The Short Version) Think of these three as a set of filtering operations for types.