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 DataParserEmptyCheckers = GetEligibleChecker; export interface DataParserDefinitionEmpty extends DataParserDefinition { readonly coerce: boolean; } export declare const emptyKind: import("../../common").KindHandler>; declare const DataParserEmpty_base: import("..").DataParserBaseInit>>; export declare class DataParserEmpty extends DataParserEmpty_base, ApplyRefinementOfDefinition> { get classConstructor(): typeof DataParserEmpty & import("..").CheckedConstructorKind; addChecker: >, ...DataParserChecker>[] ]>(...args: FixDeepFunctionInfer>, ...DataParserChecker>[] ], GenericChecker>) => DataParserEmpty>; static execParse(self: DataParserEmpty, data: unknown, error: DataParserError): undefined | typeof SymbolDataParserError; static dataParserIsAsynchronous(self: DataParserEmpty): boolean; static prepareDefinition(definition?: Partial): DataParserDefinitionEmpty; /** * Creates a data parser that accepts undefined. * * **Supported call styles:** * - Classic: `DP.empty(definition?)` -> returns an empty parser * - Curried: not available * * Accepts undefined (or the string "undefined" when coerce is enabled) and rejects other inputs. * * ```ts * const parser = DP.empty(); * const result = parser.parse(undefined); * if (E.isRight(result)) { * // E.Success * } * * const withCheckers = DP.empty({ * checkers: [DP.checkerRefine((value) => value === undefined)], * }); * * const coerceParser = DP.coerce.empty(); * const coerceResult = coerceParser.parse("undefined"); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/empty * * @namespace DP * */ static create = never>(definition?: FixDeepFunctionInfer, GenericDefinition>): DataParserEmpty>>; } /** * Creates a data parser that accepts undefined. * * **Supported call styles:** * - Classic: `DP.empty(definition?)` -> returns an empty parser * - Curried: not available * * Accepts undefined (or the string "undefined" when coerce is enabled) and rejects other inputs. * * ```ts * const parser = DP.empty(); * const result = parser.parse(undefined); * if (E.isRight(result)) { * // E.Success * } * * const withCheckers = DP.empty({ * checkers: [DP.checkerRefine((value) => value === undefined)], * }); * * const coerceParser = DP.coerce.empty(); * const coerceResult = coerceParser.parse("undefined"); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/empty * * @namespace DP * */ export declare const empty: typeof DataParserEmpty.create; export {};