Answers for "Create Type from String Enum"

0

Create Type from String Enum

const GENDERS = ["MALE", "FEMALE", "DIVERSE"] as const;
type Gender = typeof GENDERS[number];
Posted by: Guest on September-15-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language