import { type FixDeepFunctionInfer, type NeverCoalescing } from "../../common"; import { type DataParserDefinition } from "../base"; import { type DataParserError, type SymbolDataParserError } from "../../dataParser/error"; import { type DataParserChecker } from "../baseChecker"; import { type ApplyRefinementOfDefinition, type AddCheckersToDefinition, type GetEligibleChecker, type MergeDefinition, type Output, type PrepareDataParserDefinition } from "../types"; export type DataParserBooleanCheckers = GetEligibleChecker; export interface DataParserDefinitionBoolean extends DataParserDefinition { readonly coerce: boolean; } export declare const booleanKind: import("../../common").KindHandler>; declare const DataParserBoolean_base: import("..").DataParserBaseInit>>; export declare class DataParserBoolean extends DataParserBoolean_base, ApplyRefinementOfDefinition> { get classConstructor(): typeof DataParserBoolean & import("..").CheckedConstructorKind; addChecker: >, ...DataParserChecker>[] ]>(...args: FixDeepFunctionInfer>, ...DataParserChecker>[] ], GenericChecker>) => DataParserBoolean>; static execParse(self: DataParserBoolean, data: unknown, error: DataParserError): boolean | typeof SymbolDataParserError; static dataParserIsAsynchronous(self: DataParserBoolean): boolean; static prepareDefinition(definition?: Partial): DataParserDefinitionBoolean; /** * Creates a data parser for boolean values. * * **Supported call styles:** * - Classic: `DP.boolean(definition?)` -> returns a boolean parser * - Curried: not available * * Validates that the input is a boolean, optionally applies coerce, and runs the configured checkers. * * ```ts * const parser = DP.boolean(); * const result = parser.parse(true); * if (E.isRight(result)) { * const value = unwrap(result); * // value: boolean * } * * const onlyTrue = DP.boolean({ * checkers: [DP.checkerRefine((value) => value === true)], * }); * * const coerceParser = DP.coerce.boolean(); * const coerceResult = coerceParser.parse("false"); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/boolean * * @namespace DP * */ static create = never>(definition?: FixDeepFunctionInfer, GenericDefinition>): DataParserBoolean>>; } /** * Creates a data parser for boolean values. * * **Supported call styles:** * - Classic: `DP.boolean(definition?)` -> returns a boolean parser * - Curried: not available * * Validates that the input is a boolean, optionally applies coerce, and runs the configured checkers. * * ```ts * const parser = DP.boolean(); * const result = parser.parse(true); * if (E.isRight(result)) { * const value = unwrap(result); * // value: boolean * } * * const onlyTrue = DP.boolean({ * checkers: [DP.checkerRefine((value) => value === true)], * }); * * const coerceParser = DP.coerce.boolean(); * const coerceResult = coerceParser.parse("false"); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/boolean * * @namespace DP * */ export declare const boolean: typeof DataParserBoolean.create; export {};