forked from final-form/final-form-arrays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js.flow
21 lines (18 loc) · 794 Bytes
/
index.js.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// @flow
import type { Mutator } from 'final-form'
type DefaultType = { [string]: Mutator<any> }
declare export default DefaultType
/** The shape of the mutators once final-form has bound them to state */
export type Mutators = {
insert: (name: string, index: number, value: any) => void,
concat: (name: string, value: Array<any>) => void,
move: (name: string, from: number, to: number) => void,
pop: (name: string) => any,
push: (name: string, value: any) => void,
remove: (name: string, index: number) => any,
removeBatch: (name: string, indexes: Array<number>) => any,
shift: (name: string) => any,
swap: (name: string, indexA: number, indexB: number) => void,
update: (name: string, index: number, value: any) => void,
unshift: (name: string, value: any) => void
}