Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript value in enum

export enum MESSAGE_TYPE {
    INFO = 1,
    SUCCESS = 2,
    WARNING = 3,
    ERROR = 4,
};

var type = 3;

if (type in MESSAGE_TYPE) {

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #enum
ADD COMMENT
Topic
Name
2+5 =