Improve types of mobx-react-form
This commit is contained in:
parent
a282e12c64
commit
2b5b4b40c1
1 changed files with 3 additions and 1 deletions
4
types/mobx-react-form/index.d.ts
vendored
4
types/mobx-react-form/index.d.ts
vendored
|
@ -171,7 +171,7 @@ interface FieldHandlers {
|
|||
onError?(e:Field):any
|
||||
}
|
||||
|
||||
interface FieldDefinition {
|
||||
interface FieldDefinition<TInputType=any> {
|
||||
name: string
|
||||
key?: string
|
||||
label?: string
|
||||
|
@ -190,6 +190,8 @@ interface FieldDefinition {
|
|||
rules?: string
|
||||
id?:string,
|
||||
validators?: Validation | Array<Validation>
|
||||
input?: (input:TInputType) => string
|
||||
output?: (value:string) => TInputType
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue