UNPKG

sveltekit-superforms-5

Version:

<p align="center"> <img src="https://github.com/ciscoheat/sveltekit-superforms/raw/main/logo.svg" width="150px" align="center" alt="Superforms logo" /> <h1 align="center">Superforms 💥</h1> <p align="center">Making SvelteKit forms a pleasure to use!

20 lines (19 loc) • 698 B
import type { FormOptions } from './superForm.js'; import type { Writable } from 'svelte/store'; /** * @DCI-context */ export declare function Form<T extends Record<string, unknown>, M>(formElement: HTMLFormElement, timers: { submitting: Writable<boolean>; delayed: Writable<boolean>; timeout: Writable<boolean>; }, options: FormOptions<T, M>): { submitting(): void; completed: (opts: { cancelled: boolean; clearAll?: boolean; }) => void; scrollToFirstError(): void; isSubmitting: () => boolean; }; export declare const scrollToFirstError: <T extends Record<string, unknown>, M>(Form: HTMLFormElement, options: FormOptions<T, M>) => Promise<void>;