Creates a type where each property from Type is now of type boolean:
type OptionsFlags<Type> = {
[Property in keyof Type]: boolean;
};
Now I want to extend this: All properties not in Type, if present, must be of type string. Something like this:
type OptionsFlags<Type> = {
[Property in keyof Type]: boolean;
[Property not in keyof Type]?: string;
};
What is the correct approach to this?