From ab744a9b6f88ebc5663d4a26052c9a40bd02b351 Mon Sep 17 00:00:00 2001 From: Jonathan Skeate Date: Tue, 27 Feb 2018 22:40:48 -0500 Subject: [PATCH] [recompose] Make StateHandler use Partial The state handlers in withStateHandlers do not need to return the full state every time, since recompose will merge the states together. Their own flow-types specify $Shape, which as far as I can tell is analogous to Partial. --- types/recompose/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/recompose/index.d.ts b/types/recompose/index.d.ts index b6a9f21b14..edff2061b5 100644 --- a/types/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -133,7 +133,7 @@ declare module 'recompose' { >; // withStateHandlers: https://github.com/acdlite/recompose/blob/master/docs/API.md#withstatehandlers - type StateHandler = (...payload: any[]) => TState | undefined; + type StateHandler = (...payload: any[]) => Partial | undefined; type StateHandlerMap = { [updaterName: string]: StateHandler; };