import type { GenericOutput, TypescriptOutput } from '../../cst/cst.js'; import { NodeTrait } from '../../cst/mixin.js'; import type { SchemaOptions } from '../base.js'; export type EnumOptions = object; declare abstract class _EnumType extends NodeTrait { _type: "enum"; _options: EnumOptions; } export declare class EnumType extends _EnumType { _isNamed: false; enum: Values; infer: Values[number]; input: Values[number]; constructor(values: Values, options: SchemaOptions); get _output(): (TypescriptOutput | GenericOutput)[]; } export declare class NativeEnumType = Record> extends _EnumType { _isNamed: true; enum: Enum; infer: Enum[keyof Enum]; input: Enum[keyof Enum]; constructor(values: Enum, options: SchemaOptions); get _output(): (TypescriptOutput | GenericOutput)[]; } /** * Declares an `EnumType`. This is either a list of values, or a dictionary * where the key is the name of value. * * ### Example * ```ts * $enum([1, 3]) * * $enum(["foobar"]) * ``` * * @param values - The values that are allowed on this property. * @param options - Additional options to pass to the enum. * * @group Primitives */ export declare function $enum(values: Values, options?: SchemaOptions): EnumType; export declare function $enum>(values: Values, options?: SchemaOptions): NativeEnumType; export {};