Suppose I have two enums as described below in Typescript, then How do I merge them
enum Mammals {
Humans,
Bats,
Dolphins
}
enum Reptiles {
Try this enumerations example ------
Enums or enumerations are a new data type supported in TypeScript
enum PrintMedia {
Newspaper = 1,
Newsletter,
Magazine,
Book
}
function getMedia(mediaName: string): PrintMedia {
if ( mediaName === 'Forbes' || mediaName === 'Outlook') {
return PrintMedia.Magazine;
}
}
let mediaType: PrintMedia = getMedia('Forbes');