diff --git a/src/immer.js.flow b/src/immer.js.flow index 1916a1be..8778be2c 100644 --- a/src/immer.js.flow +++ b/src/immer.js.flow @@ -1,3 +1,5 @@ +// @flow + declare export function extendShallowObservable(target: any): any /** @@ -12,21 +14,21 @@ declare export function extendShallowObservable(target: any): any * @param thunk - function that receives a proxy of the current state as first argument and which can be freely modified * @returns The next state: a new state, or the current state if nothing was modified */ -declare export default function( +declare export default function produce( currentState: S, recipe: (draftState: S) => void ): S // curried invocations -declare export default function( +declare export default function produce( recipe: (draftState: S, a: A, b: B, c: C) => void ): (currentState: S, a: A, b: B, c: C) => S -declare export default function( +declare export default function produce( recipe: (draftState: S, a: A, b: B) => void ): (currentState: S, a: A, b: B) => S -declare export default function( +declare export default function produce( recipe: (draftState: S, a: A) => void ): (currentState: S) => S -declare export default function( +declare export default function produce( recipe: (draftState: S, ...extraArgs: any[]) => void ): (currentState: S, ...extraArgs: any[]) => S