Suppose I have two enums as described below in Typescript, then How do I merge them
enum Mammals { Humans, Bats, Dolphins } enum Reptiles {
I'd say the proper way to do it would be defining a new type:
enum Mammals { Humans = 'Humans', Bats = 'Bats', Dolphins = 'Dolphins', } enum Reptiles { Snakes = 'Snakes', Alligators = 'Alligators', Lizards = 'Lizards', } type Animals = Mammals | Reptiles;