zod-server-actions
Version:
Simple utility library to create server actions in Next.js
14 lines (13 loc) • 581 B
TypeScript
import { RetriesConfig } from ".";
import { Context } from "./context";
export type ContextFn<T> = () => Promise<T>;
export type OnError = (error: any) => Promise<void>;
export declare class Config<T extends object = {}> {
readonly retries?: RetriesConfig;
readonly contextFn?: ContextFn<T>;
readonly context?: Context<T>;
readonly onError?: OnError;
readonly debug?: boolean;
constructor(retries?: RetriesConfig, contextFn?: ContextFn<T>, context?: Context<T>, onError?: OnError, debug?: boolean);
setConfig(config: Omit<Config, "setConfig">): void;
}