Skip to content

Commit 39a7a3f

Browse files
danielnixonerikras
authored andcommitted
Broaden mutator type to any (#40)
This will allow `arrayMutators` to be passed to a strongly typed `mutators` prop (which is coming in final-form/final-form#275 ) without causing a TypeScript compiler error.
1 parent b351811 commit 39a7a3f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/index.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ export const swap: Mutator
1212
export const update: Mutator
1313
export const unshift: Mutator
1414

15-
export interface DefaultType {
16-
insert: Mutator
17-
concat: Mutator
18-
move: Mutator
19-
pop: Mutator
20-
push: Mutator
21-
removeBatch: Mutator
22-
remove: Mutator
23-
shift: Mutator
24-
swap: Mutator
25-
update: Mutator
26-
unshift: Mutator
15+
export interface DefaultType<FormValues = any> {
16+
insert: Mutator<FormValues>
17+
concat: Mutator<FormValues>
18+
move: Mutator<FormValues>
19+
pop: Mutator<FormValues>
20+
push: Mutator<FormValues>
21+
removeBatch: Mutator<FormValues>
22+
remove: Mutator<FormValues>
23+
shift: Mutator<FormValues>
24+
swap: Mutator<FormValues>
25+
update: Mutator<FormValues>
26+
unshift: Mutator<FormValues>
2727
}
2828

2929
declare const d: DefaultType

0 commit comments

Comments
 (0)