client-ts
client-ts copied to clipboard
Variadic types for return vs create
When we add Dates support we can consider:
ColumnType<Date, Date | string>
Where we type on fn returns Date. But also accept strings in create/update.
Similarly we can have a third generic for the update:
ColumnType<string, string, never>
Which is useful for IDs or protected fields. Ie. when we add multi field primary identifiers.
The spec would be:
ColumnType<Return, Create = Return, Update = Create>
@SferaDev has this already been done. If not I've marked as P2 - please feel free to change it if that's not right.