So I know that keyof typeof <enum>
returns a type of all possible keys of enum, such that given
enum Season{
WINTER = 'winter',
SPRING = 'spring',
SUMMER = 'summer',
AUTUMN = 'autumn',
}
let x: keyof typeof Season;
is equivalent to
let x: 'WINTER' | 'SPRING' | 'SUMMER' | 'AUTUMN';
my question is how do I get a type that will be equivalent to one of the possible values of the enum, for example:
let x: 'winter' | 'spring' | 'summer' | 'autumn';