@piiano/forms
Version:
Piiano Forms SDK
9 lines (8 loc) • 494 B
TypeScript
import type { ProtectedFormOptions, Result, ResultType } from '../options';
export type { Theme, Style, Variables, Field } from '../common/models';
export type Form<T extends ResultType> = {
submit: () => Promise<Result<T>>;
destroy: () => void;
update: (options: ProtectedFormOptions<T>) => void;
};
export declare function createProtectedForm<T extends ResultType = 'fields'>(containerOrSelector: string | HTMLDivElement, { hooks, ...options }: ProtectedFormOptions<T>): Form<T>;