Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript enum value to enum

enum Number {
  One,
  Two
}  

const numberOne: Number = "One" as Number;
const otherNumberOne: Number = Number.One;

const stringOne = Number[Number.One];
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #typescript #enum #enum
ADD COMMENT
Topic
Name
9+7 =