import { type FixDeepFunctionInfer, type NeverCoalescing } from "../../common"; import { type DataParser, type DataParserDefinition } from "../base"; import { type DataParserError } from "../../dataParser/error"; import { type DataParserChecker } from "../baseChecker"; import { type ApplyRefinementOfDefinition, type AddCheckersToDefinition, type GetEligibleChecker, type Input, type MergeDefinition, type Output, type PrepareDataParserDefinition } from "../types"; export type DataParserPipeCheckers = GetEligibleChecker; export interface DataParserDefinitionPipe extends DataParserDefinition> { readonly input: DataParser; readonly output: DataParser; } export declare const pipeKind: import("../../common").KindHandler>; declare const DataParserPipe_base: import("..").DataParserBaseInit>>; export declare class DataParserPipe extends DataParserPipe_base, GenericDefinition>, ApplyRefinementOfDefinition, GenericDefinition>> { get classConstructor(): typeof DataParserPipe & import("..").CheckedConstructorKind; addChecker: >, ...DataParserChecker>[] ]>(...args: FixDeepFunctionInfer>, ...DataParserChecker>[] ], GenericChecker>) => DataParserPipe>; static execParse(self: DataParserPipe, data: unknown, error: DataParserError): unknown; static dataParserIsAsynchronous(self: DataParserPipe): boolean; static prepareDefinition(input: DataParser, output: DataParser, definition?: Partial>): DataParserDefinitionPipe; /** * Creates a data parser pipeline from an input parser to an output parser. * * **Supported call styles:** * - Classic: `DP.pipe(input, output, definition?)` -> returns a pipe parser * - Curried: not available * * Runs the input parser, then feeds its output to the output parser. * * ```ts * const schema = DP.pipe( * DP.coerce.number(), * DP.transform( * DP.number(), * (value) => value + 1, * ), * ); * * const result = schema.parse("1234"); * * if (E.isRight(result)) { * const value = unwrap(result); * // value: number * } * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/pipe * * @namespace DP * */ static create>, "input" | "output"> = never>(input: GenericInput, output: GenericOutput, definition?: FixDeepFunctionInfer>, "input" | "output">, GenericDefinition>): DataParserPipe & { input: GenericInput; output: GenericOutput; }>>; } /** * Creates a data parser pipeline from an input parser to an output parser. * * **Supported call styles:** * - Classic: `DP.pipe(input, output, definition?)` -> returns a pipe parser * - Curried: not available * * Runs the input parser, then feeds its output to the output parser. * * ```ts * const schema = DP.pipe( * DP.coerce.number(), * DP.transform( * DP.number(), * (value) => value + 1, * ), * ); * * const result = schema.parse("1234"); * * if (E.isRight(result)) { * const value = unwrap(result); * // value: number * } * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/pipe * * @namespace DP * */ export declare const pipe: typeof DataParserPipe.create; export {};