Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript get all enum values

enum Food {
    Banana,
    Orange,
    Lemon,
}

const allFoods = Object.keys(Food).filter(f => isNaN(f));
 
PREVIOUS NEXT
Tagged: #typescript #enum #values
ADD COMMENT
Topic
Name
7+4 =