Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript type from enum values

enum Weekday {
  MONDAY = 'mon',
  TUESDAY = 'tue',
  WEDNESDAY = 'wed'
}

type WeekdayType = `${Weekday}`;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #type #enum #values
ADD COMMENT
Topic
Name
8+2 =