DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR TYPESCRIPT
Create Type from String Enum
const
GENDERS
=
[
"MALE"
,
"FEMALE"
,
"DIVERSE"
]
as
const
;
type
Gender
=
typeof
GENDERS
[
number
]
;
Source by localhost #
PREVIOUS
NEXT
Tagged:
#Create
#Type
#String
#Enum
ADD COMMENT
Topic
COMMENT
Name
3+1 =
Submit