MakeUndefinedPropertiesOptional
typetype MakeUndefinedPropertiesOptional = {
[K in keyof (Partial<Pick<T, UndefinedKeys<T>>> &
Pick<T, DefinedKeys<T>>)]: (Partial<Pick<T, UndefinedKeys<T>>> &
Pick<T, DefinedKeys<T>>)[K];
};Makes properties whose type includes undefined optional.
This allows omitting properties like { foo?: string | undefined } from object literals
instead of requiring { foo: undefined }.
Uses Pick to avoid producing empty {} intersection members in TypeDoc output.
When one side has no matching keys, Pick<T, never> collapses to {} inside a
two-part & {} — the mapped type wrapper { [K in keyof ...]: ... } forces
TypeScript to flatten the intersection into a single object type, eliminating
the empty half entirely and keeping tooltips clean.