import { type FixDeepFunctionInfer, type NeverCoalescing } from "../../common"; import { type AddCheckersToDefinition, type Output, type MergeDefinition, type PrepareDataParserDefinition, type Input } from "../types"; import * as dataParsers from "../parsers"; import { type DataParserChecker } from "../baseChecker"; declare const DataParserTemplateLiteralExtended_base: import("..").DataParserExtendedBaseInit; export declare class DataParserTemplateLiteralExtended extends DataParserTemplateLiteralExtended_base>, Input>> { get classConstructor(): typeof DataParserTemplateLiteralExtended & import("..").CheckedConstructorKind; addChecker: >, ...DataParserChecker>[] ]>(...args: FixDeepFunctionInfer>, ...DataParserChecker>[] ], GenericChecker>) => DataParserTemplateLiteralExtended>; refine: (theFunction: (input: Output) => boolean, definition?: Partial>) => DataParserTemplateLiteralExtended>]>>; /** * Creates an extended data parser for deterministic template literal strings. * * **Supported call styles:** * - Method: `DPE.templateLiteral(template, definition?)` -> returns a template literal parser * * Validates that the input matches the provided template literal shape. Nested sub-parsers must not include their own checkers; add template-level refine rules when needed. * * ```ts * const parser = DPE.templateLiteral(["user-", DPE.number()]); * const result = parser.parse("user-42"); * if (E.isRight(result)) { * const value = unwrap(result); * // value: string * } * * const orderParser = DPE.templateLiteral(["order-", DPE.literal("vip"), "-", DPE.number()]); * const orderResult = orderParser.parse("order-vip-12"); * * const withLiteral = DPE.templateLiteral([DPE.literal("id-"), DPE.number()]); * const literalResult = withLiteral.parse("id-1"); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/templateLiteral * * @namespace DPE * */ static create>, "template" | "pattern"> = never>(template: GenericTemplate, definition?: FixDeepFunctionInfer>, "template" | "pattern">, GenericDefinition>): DataParserTemplateLiteralExtended & { template: GenericTemplate; }>>; } /** * Creates an extended data parser for deterministic template literal strings. * * **Supported call styles:** * - Method: `DPE.templateLiteral(template, definition?)` -> returns a template literal parser * * Validates that the input matches the provided template literal shape. Nested sub-parsers must not include their own checkers; add template-level refine rules when needed. * * ```ts * const parser = DPE.templateLiteral(["user-", DPE.number()]); * const result = parser.parse("user-42"); * if (E.isRight(result)) { * const value = unwrap(result); * // value: string * } * * const orderParser = DPE.templateLiteral(["order-", DPE.literal("vip"), "-", DPE.number()]); * const orderResult = orderParser.parse("order-vip-12"); * * const withLiteral = DPE.templateLiteral([DPE.literal("id-"), DPE.number()]); * const literalResult = withLiteral.parse("id-1"); * ``` * * @see https://utils.duplojs.dev/en/v1/api/dataParser/templateLiteral * * @namespace DPE * */ export declare const templateLiteral: typeof DataParserTemplateLiteralExtended.create; export {};