1 | import { FormErrors, GetFormState } from "../index";
|
2 |
|
3 | export type DataSelector<FormData = {}, State = {}> = (formName: string, getFormState?: GetFormState) => (state: State) => FormData;
|
4 | export type ErrorSelector<FormData = {}, State = {}, ErrorType = string> = (formName: string, getFormState?: GetFormState) => (state: State) => FormErrors<FormData, ErrorType>;
|
5 | export type BooleanSelector<State = {}> = (formName: string, getFormState?: GetFormState) => (state: State) => boolean;
|
6 | export type NamesSelector<State = {}> = (getFormState?: GetFormState) => (state: State) => string[];
|
7 | export type FormOrFieldsBooleanSelector<State = {}> = (formName: string, getFormState?: GetFormState) => (state: State, ...fields: string[]) => boolean;
|
8 |
|
9 | export const getFormValues: DataSelector;
|
10 | export const getFormInitialValues: DataSelector;
|
11 | export const getFormSyncErrors: ErrorSelector;
|
12 | export const getFormMeta: DataSelector;
|
13 | export const getFormAsyncErrors: ErrorSelector;
|
14 | export const getFormSyncWarnings: ErrorSelector;
|
15 | export const getFormSubmitErrors: ErrorSelector;
|
16 | export const getFormError: ErrorSelector;
|
17 | export const getFormNames: NamesSelector;
|
18 | export const isDirty: FormOrFieldsBooleanSelector;
|
19 | export const isPristine: FormOrFieldsBooleanSelector;
|
20 | export const isValid: BooleanSelector;
|
21 | export const isInvalid: BooleanSelector;
|
22 | export const isSubmitting: BooleanSelector;
|
23 | export const isAsyncValidating: BooleanSelector;
|
24 | export const hasSubmitSucceeded: BooleanSelector;
|
25 | export const hasSubmitFailed: BooleanSelector;
|