Answers for "merge enum typescript"

0

merge enum typescript

enum Mammals {
    Humans = 'Humans',
    Bats = 'Bats',
    Dolphins = 'Dolphins',
}

enum Reptiles {
  Snakes = 'Snakes',
  Alligators = 'Alligators',
  Lizards = 'Lizards',
}

const Animals = {
   ...Mammals,
   ...Reptiles,
}

type Animals = Mammals | Reptiles
Posted by: Guest on August-05-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language