UNPKG

react-formawesome-core

Version:
17 lines (16 loc) 721 B
import * as React from "react"; import { UncertainObject } from "../../Validators"; export interface FormContextInterface<ModelI = UncertainObject> { modelErrors: UncertainObject<string>; modelValues: ModelI; loading: boolean; unparsedError?: any; registeredElements: UncertainObject; hasErrors: boolean; onSubmit: () => Promise<void>; onValidate: (groups?: Array<string>) => Promise<void>; setModelValue: (attribute: string, value: any) => void; unregisterElement: (attribute: string) => void; registerElement: (attribute: string, element: any) => boolean | never; } export declare const FormContext: React.Context<FormContextInterface<UncertainObject<any>>>;