Type of simple enum or labeled enum.
const STATUSES = Enum(['on', 'off']);
type Status = InferValue<typeof STATUSES>; // Status is 'on' | 'off'
const LOCALES = Enum({ English: 'en', Czech: 'cs', Slovak: 'sk' });
type Locale = InferValue<typeof LOCALES>; // Locale is 'en' | 'cs' | 'sk'
Generated using TypeDoc
Utility type to infer type of value for a simple or labeled enum.