import { BaseLiteralType } from '../base/literal.js'; import { IS_OF_TYPE, SUBTYPE, UNIQUE_NAME } from '../../symbols.js'; import type { FieldOptions, Validation } from '../../types.js'; /** * VineBoolean represents a boolean value in the validation schema. * It accepts boolean, string, and number inputs and converts them to booleans, * with support for both strict and loose type checking. * * @example * const schema = vine.boolean() * * const result = await vine.validate({ * schema, * data: "true" // Will be converted to true * }) */ export declare class VineBoolean extends BaseLiteralType { /** * Static collection of all available validation rules for booleans */ static rules: { boolean: (options: { strict?: boolean; }) => Validation<{ strict?: boolean; }>; }; options: FieldOptions & { strict?: boolean; }; /** * The subtype identifier for the literal schema field */ [SUBTYPE]: string; /** * Unique name identifier for union type resolution */ [UNIQUE_NAME]: string; /** * Type checker function to determine if a value can be converted to a boolean. * Required for "unionOfTypes" functionality. * * @param value - The value to check * @returns True if the value can be converted to a boolean */ [IS_OF_TYPE]: (value: unknown) => boolean; /** * Creates a new VineBoolean instance with optional configuration. * * @param options - Field options like bail mode, nullability and strict mode * @param validations - Initial set of validations to apply */ constructor(options?: Partial & { strict?: boolean; }, validations?: Validation[]); /** * Clones the VineBoolean schema type. The applied options * and validations are copied to the new instance. * * @returns A cloned instance of this VineBoolean schema */ clone(): this; }