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 GetEligibleChecker, type AddCheckersToDefinition, type MergeDefinition, type Output, type PrepareDataParserDefinition, type ApplyRefinementOfDefinition } from "../../types"; export * from "./checkers"; export type DataParserStringCheckers = GetEligibleChecker; export interface DataParserDefinitionString extends DataParserDefinition { readonly coerce: boolean; } export declare const stringKind: import("../../../common").KindHandler>; declare const DataParserString_base: import("../..").DataParserBaseInit>>; export declare class DataParserString extends DataParserString_base, ApplyRefinementOfDefinition> { get classConstructor(): typeof DataParserString & import("../..").CheckedConstructorKind; addChecker: >, ...DataParserChecker>[] ]>(...args: FixDeepFunctionInfer>, ...DataParserChecker>[] ], GenericChecker>) => DataParserString>; static execParse(self: DataParserString, data: unknown, error: DataParserError): (string | typeof SymbolDataParserError); static dataParserIsAsynchronous(self: DataParserString): boolean; static prepareDefinition(definition?: Partial): DataParserDefinitionString; /** * Creates a data parser for strings. * * **Supported call styles:** * - Classic: `DP.string(definition?)` -> returns a string parser * - Curried: not available * * Validates that the input is a string, optionally applies coerce, and runs the configured checkers. * * ```ts * const parser = DP.string(); * const result = parser.parse("DuploJS"); * if (E.isRight(result)) { * const value = unwrap(result); * // value: string * } * * const withCheckers = DP.string({ * checkers: [DP.checkerStringMin(3), DP.checkerStringMax(10)], * }); * * const coerceParser = DP.coerce.string(); * const coerceResult = coerceParser.parse(123); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/string * * @namespace DP * */ static create = never>(definition?: FixDeepFunctionInfer, GenericDefinition>): DataParserString>>; } /** * Creates a data parser for strings. * * **Supported call styles:** * - Classic: `DP.string(definition?)` -> returns a string parser * - Curried: not available * * Validates that the input is a string, optionally applies coerce, and runs the configured checkers. * * ```ts * const parser = DP.string(); * const result = parser.parse("DuploJS"); * if (E.isRight(result)) { * const value = unwrap(result); * // value: string * } * * const withCheckers = DP.string({ * checkers: [DP.checkerStringMin(3), DP.checkerStringMax(10)], * }); * * const coerceParser = DP.coerce.string(); * const coerceResult = coerceParser.parse(123); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/string * * @namespace DP * */ export declare const string: typeof DataParserString.create;