I have a enum like this (just a little bit bigger):
export enum MyTypeEnum {
one = 'one',
two = 'two',
three = 'three',
four = 'four'
}
I use it to define types that need to have those keys in this way:
export type MyTypeKeyFunctionValue = { [key in MyTypeEnum ]?: Function };
export type MyTypeKeyStringValue = { [key in MyTypeEnum ]?: string };
So in my class I can do something like:
private memberWithFunctions: MyTypeKeyFunctionValue;
Now, I have a special situation when some member needs to have all the keys in MyTypeEnum BUT one (lets say two) and I do not know how to define a type that excludes that key but keeps all the other keys.
Is there a way to do this?