type InputTypes<T extends TraitDefinition> =
{ [P in keyof T as IfUndefined<Parameters<T[P]>[0], P>]?: Parameters<T[P]>[0] | undefined; } &
{ [P in keyof T as IfDefined<Parameters<T[P]>[0], P>]: Parameters<T[P]>[0]; }
packages / traits / src / types.ts