Improve types of mobx-react-form

This commit is contained in:
Eric Schultz 2018-10-01 14:55:05 -05:00
parent a282e12c64
commit 2b5b4b40c1

View file

@ -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
}