UNPKG

@astro-utils/forms

Version:

Server component for Astro (call server functions from client side with validation and state management)

13 lines (12 loc) 515 B
import { type AstroLinkHTTP } from '../utils.js'; export type CSRFSettings = { formFiled: string; sessionFiled: string; }; export declare const DEFAULT_SETTINGS: CSRFSettings; export declare function ensureValidationSecret(astro: AstroLinkHTTP, formOptions?: import("../settings.js").FormsSettings): Promise<any>; export declare function validateFrom(astro: AstroLinkHTTP): Promise<boolean>; export declare function createFormToken(astro: AstroLinkHTTP): Promise<{ token: string; filed: string; }>;