To sum up my problem, I have an interface, User with an 'attributes' object filled with properties. I have another interface SpecialUser in which the 'attributes' object needs to contain properties that are not present on User. Currently, the new attributes object is overwriting the old one. I can get it to work by pasting in all properties from the parent interface and then appending the later ones, but that's not the most ideal solution.
export interface User{
attributes: {
full_name: string;
}
}
export interface SpecialUser extends User {
attributes: {
occupation: string;
}
}
What I want is for SpecialUser's 'attributes' to contain the fields on User's 'attributes' in addition to its new properties (so it would contain both full_name and occupation). The actual result is complete overwrite.