Comparing version 2.1.4 to 2.1.5
@@ -14,4 +14,4 @@ import { CancelablePromise } from './util/index'; | ||
}; | ||
declare type State<ValueType> = { | ||
value: ValueType; | ||
export declare type State<Value> = { | ||
value: Value; | ||
error: any; | ||
@@ -18,0 +18,0 @@ isChanged: boolean; |
@@ -10,5 +10,5 @@ import Field, { FieldOpts, Validator } from './Field'; | ||
}; | ||
initialValues?: { | ||
initialValues?: Partial<{ | ||
[K in keyof T]: T[K]; | ||
}; | ||
}>; | ||
}; | ||
@@ -15,0 +15,0 @@ declare type FormFields<T extends {}> = { |
import Form from './Form'; | ||
import Field from './Field'; | ||
import FormGroup from './FormGroup'; | ||
import FieldState from './FieldState'; | ||
import useForm from './useForm'; | ||
@@ -8,2 +9,2 @@ import useFormState from './useFormState'; | ||
import useFieldState from './useFieldState'; | ||
export { Form, Field, FormGroup, useForm, useFormState, useField, useFieldState, }; | ||
export { Form, Field, FormGroup, FieldState, useForm, useFormState, useField, useFieldState, }; |
import Form from './Form'; | ||
import Field from './Field'; | ||
import FormGroup from './FormGroup'; | ||
import FieldState from './FieldState'; | ||
import useForm from './useForm'; | ||
@@ -8,3 +9,3 @@ import useFormState from './useFormState'; | ||
import useFieldState from './useFieldState'; | ||
export { Form, Field, FormGroup, useForm, useFormState, useField, useFieldState, }; | ||
export { Form, Field, FormGroup, FieldState, useForm, useFormState, useField, useFieldState, }; | ||
//# sourceMappingURL=index.js.map |
import Field from './Field'; | ||
declare const useFieldState: <T extends any>(field: Field<T>) => { | ||
value: T; | ||
error: any; | ||
isChanged: boolean; | ||
isValidating: boolean; | ||
isValidated: boolean; | ||
isValid: boolean; | ||
}; | ||
declare const useFieldState: <T extends any>(field: Field<T>) => import("./Field").State<T>; | ||
export default useFieldState; |
{ | ||
"name": "formular", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"author": "Pavel Ivanov", | ||
@@ -5,0 +5,0 @@ "description": "Build forms in React. Easy-Peasy!", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
77933
59
1216
0