Skip to content

Commit

Permalink
Fixed flow error
Browse files Browse the repository at this point in the history
  • Loading branch information
erikras committed Aug 23, 2018
1 parent c4d8fe0 commit 82cf85e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,19 @@ const customer = form.mutators.pop('customers')
## Table of Contents

<!-- START doctoc generated TOC please keep comment here to allow auto update -->

<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [🏁 Final Form Arrays](#%F0%9F%8F%81-final-form-arrays)
- [Installation](#installation)
- [Usage](#usage)
- [Table of Contents](#table-of-contents)
- [Mutators](#mutators)
- [`form.mutators.insert(name: string, index: number, value: any) => undefined`](#formmutatorsinsertname-string-index-number-value-any--undefined)
- [`form.mutators.move(name: string, from: number, to: number) => undefined`](#formmutatorsmovename-string-from-number-to-number--undefined)
- [`form.mutators.pop(name: string) => any`](#formmutatorspopname-string--any)
- [`form.mutators.push(name: string, value: any) => void`](#formmutatorspushname-string-value-any--void)
- [`form.mutators.remove(name: string, index: number) => any`](#formmutatorsremovename-string-index-number--any)
- [`form.mutators.shift(name: string) => any`](#formmutatorsshiftname-string--any)
- [`form.mutators.swap(name: string, indexA: number, indexB: number) => void`](#formmutatorsswapname-string-indexa-number-indexb-number--void)
- [`form.mutators.update(name: string, index: number, value: any) => void`](#formmutatorsupdatename-string-index-number-value-any--void)
- [`form.mutators.unshift(name: string, value: any) => void`](#formmutatorsunshiftname-string-value-any--void)
- [Mutators](#mutators)
- [`form.mutators.insert(name: string, index: number, value: any) => undefined`](#formmutatorsinsertname-string-index-number-value-any--undefined)
- [`form.mutators.move(name: string, from: number, to: number) => undefined`](#formmutatorsmovename-string-from-number-to-number--undefined)
- [`form.mutators.pop(name: string) => any`](#formmutatorspopname-string--any)
- [`form.mutators.push(name: string, value: any) => void`](#formmutatorspushname-string-value-any--void)
- [`form.mutators.remove(name: string, index: number) => any`](#formmutatorsremovename-string-index-number--any)
- [`form.mutators.shift(name: string) => any`](#formmutatorsshiftname-string--any)
- [`form.mutators.swap(name: string, indexA: number, indexB: number) => void`](#formmutatorsswapname-string-indexa-number-indexb-number--void)
- [`form.mutators.update(name: string, index: number, value: any) => void`](#formmutatorsupdatename-string-index-number-value-any--void)
- [`form.mutators.unshift(name: string, value: any) => void`](#formmutatorsunshiftname-string-value-any--void)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down
4 changes: 1 addition & 3 deletions src/update.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// @flow
import type { MutableState, Mutator, Tools } from 'final-form'

type Args = [string, number, any]

const update: Mutator = (
[name, index, value]: Args,
[name, index, value]: any[],
state: MutableState,
{ changeValue }: Tools
) => {
Expand Down

0 comments on commit 82cf85e

Please sign in to comment.