UNPKG

@piiano/forms

Version:
7 lines (6 loc) 433 B
import type { Result, ResultType, SubmitOptions } from './options'; import type { VaultClient } from '@piiano/vault-client'; export type SubmitRequest<T extends ResultType = ResultType> = SubmitOptions<T> & { client: VaultClient; }; export declare function applyStrategy<T extends ResultType = 'fields'>(object: Record<string, FormDataEntryValue>, { strategy, ...options }: Omit<SubmitRequest<T>, 'object'>): Promise<Result<T>>;