I have 2 categories:
category Main = {
x: boolean;
y: number;
z: string
}
category MainOptions = {
x?: boolean;
y?: number;
z?: string;
}
In this scenario, MainOptions is designed to include some, none, or all of the attributes that belong to Main based on the specific situation, but never to contain an attribute that does not exist in Main.
I am aiming to connect them systematically so that as Main evolves and gains new attributes, I only need to modify the Main type.
What is the best way to accomplish this?