Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript get keys from enum

enum Team {
	Attacker,
  	Defender
}

type TeamKeys = keyof typeof Team; // "Attacker" | "Defender" 
 
PREVIOUS NEXT
Tagged: #typescript #keys #enum
ADD COMMENT
Topic
Name
4+9 =