export interface ISchemaValue { [name: string]: any; } export interface ISchemaDirty { [name: string]: boolean; } export interface ISchemaValidate { [name: string]: (data: any) => Promise | any; } export interface ISchemaError { [name: string]: Error; } export interface IuseSchemaOptions { initial?: ISchemaValue; schema: ISchemaValidate; change?: (value: ISchemaValue) => any; } export interface IuseSchemaProperties { value: any; error?: Error; dirty: boolean; advance: boolean; change: (data: any) => void; blur: (status?: boolean) => void; } export interface IuseSchemaProps { properties: { [name: string]: IuseSchemaProperties; }; value: ISchemaValue; error: ISchemaError; dirty: ISchemaDirty; advance: boolean; valid: boolean; invalid: boolean; change: (value: ISchemaValue) => any; override: (value?: ISchemaValue) => void; blur: (override?: boolean) => void; } export declare const useSchema: ({ initial, change, schema, }: IuseSchemaOptions) => IuseSchemaProps;