import type { brandSymbol } from './util/Brand.js'; type EnumTypeParamShape = { type: 'enum'; values: values; }; /** * Enum type definition content * * @param values - The values of the enum */ export interface EnumType extends EnumTypeParamShape { [brandSymbol]: 'enum'; } function _enum(values: values) { const data: EnumTypeParamShape = { type: 'enum', values, }; return data as EnumType; } /** * this type param pattern allows us to infer literal type values from the array without using the `as const` suffix */ export function enumType( values: values, ) { return _enum(values); }