Flatten an interface

Issue I have a usecase where I want to be able to derive the keys/fields of my type based on generic type. For example: These are the container interface export interface IUser { id: BigInt; name: string; balance: number; address:

Continue reading

typing toPrimitives interface

Issue I have an interface like this: interface AggregateRoot<Primitives> { toPrimitives(): { [key in keyof Primitives]: any } } And I implement it like this: class Person implements AggregateRoot<Person> { public name public age toPrimitives(): { [key in keyof Person]:

Continue reading