TypeScript Snippet
NonNullableKeys Utility Type
Difficulty: Medium
Filtering an object type to only the keys whose values are not nullable comes up everywhere: required-fields lists, mandatory column sets, GraphQL non-null fields. This snippet builds a `NonNullableKeys<T>` that returns just those keys, then layers in a `RequiredFields<T>` that produces a sub-object type, and a runtime helper that strips nullable fields from a value at runtime.
