sveltekit-superforms
Version:
Making SvelteKit validation and displaying of forms easier than ever!
18 lines (17 loc) • 560 B
TypeScript
/// <reference types="svelte" />
import type { AnyZodObject } from 'zod';
import type { FormOptions } from './index.js';
import type { Writable } from 'svelte/store';
/**
* @DCI-context
*/
export declare function Form<T extends AnyZodObject, M>(formEl: HTMLFormElement, timers: {
submitting: Writable<boolean>;
delayed: Writable<boolean>;
timeout: Writable<boolean>;
}, options: FormOptions<T, M>): {
submitting: () => void;
completed: (cancelled: boolean) => void;
scrollToFirstError: () => void;
isSubmitting: () => boolean;
};