79647165

Date: 2025-06-01 03:55:39
Score: 0.5
Natty:
Report link

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];
};
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: aweebit