Say I have the following type:
type Event = {
name: string;
dateCreated: string;
type: string;
}
I now want to extend this type, i
What you are trying to achieve is equivalent to
interface Event {
name: string;
dateCreated: string;
type: string;
}
interface UserEvent extends Event {
UserId: string;
}
The way you defined the types does not allow for specifying inheritance, however you can achieve something similar using intersection types, as artem pointed out.