often when I'm writing Typescript I'm running into situations where I have enum of some sort and from this enum I want to generate union type. I tried looking for utility type which would do it for me but I wasn't able to find any. Is there an easier way of doing so?
enum Person {
Name = "Adam",
Age = 32
}
type Something = Person.Name | Person.Age;
I know that this example is rather simple but often I have enums with a tone of entries and doing it by hand is neither enjoyable nor maintainable.