Re:Types as Interfaces
by mamcx on Tuesday July 23, 2024 @10:52AM
(#41046588)
I raise the bar and say the relational model has it and can be made to work at type level.
[ Parent
| on HN ]
Re:Types as Interfaces
by c-hendricks on Tuesday July 23, 2024 @11:17AM
(#41046869)
Something like this in TypeScript:
type Person = Omit<User, 'password'>
type Invoice = Customer & { invoice: Inv }
// or
type Invoice = Inv & { customer: Customer }