type Defaulted<T extends TraitDefinition, D extends Record<string, any>> =
{ [P in keyof T as IsKeyOf<P, D, P> | IfUndefined<T[P], P>]?: T[P] | undefined; } &
{ [P in keyof T as IsNotKeyOf<P, D, IfDefined<T[P], P>>]: T[P]; }
packages / traits / src / types.ts