@duplojs/zod-accelerator
Version:
[](https://www.npmjs.com/package/@duplojs/zod-accelerator)
26 lines (25 loc) • 840 B
TypeScript
import type { AnyFunction } from "@utils/types";
export interface AcceleratorParams {
path: string | null;
input: string;
output: string;
}
export type AcceleratorContentType = (string | {
message?: string;
if?: string;
content?: string;
ctx?: Record<keyof any, any>;
} | [ZodAcceleratorContent, AcceleratorParams] | null | undefined | boolean)[];
export declare class ZodAcceleratorContent {
private static readonly replacerList;
private static inc;
readonly id: string;
content: string[];
readonly ctx: Record<keyof any, any>;
addContent(...content: AcceleratorContentType): void;
addContext(ctx: Record<string, any>): void;
exportContent(params: AcceleratorParams): string;
toFunction(): AnyFunction;
replacer(content: string): string;
private static generateId;
}