import type { Ref } from 'preact'; import type { Paths, Obj, CreateSubmitHandlerConfig, KnownHelpers, UnknownHelpers, FormConfigWithTransformFn, FormConfigWithoutTransformFn } from '@felte/core'; import type { UnknownStores, KnownStores } from './use-accessor'; /** The return type for the `createForm` function. */ export type Form = { /** Action function to be used with the `use` directive on your `form` elements. */ form: Ref; /** Function to handle submit to be passed to the on:submit event. Not necessary if using the `form` action. */ handleSubmit(e?: Event): void; /** Function that creates a submit handler. If a function is passed as first argument it overrides the default `onSubmit` function set in the `createForm` config object. */ createSubmitHandler(altConfig?: CreateSubmitHandlerConfig): (e?: Event) => void; }; export declare function useForm(config: FormConfigWithTransformFn & Ext): Form & UnknownHelpers> & UnknownStores; export declare function useForm(config?: FormConfigWithoutTransformFn & Ext): Form & KnownHelpers> & KnownStores; //# sourceMappingURL=use-form.d.ts.map