For those who do need a type also filtering out properties that can be explicitly undefined
, there is a simpler solution than the one suggested in the comments:
type PickDefined<T> = {
[K in keyof T as undefined extends T[K] ? never : K]: T[K];
};