From 50320bf0d940b4872ceb22e7e41ec50c23d62027 Mon Sep 17 00:00:00 2001 From: Tom Spencer Date: Tue, 4 Sep 2018 18:44:02 +0100 Subject: [PATCH] Add missing types (#4836) * Add missing types * Added missing types to DrawerActions --- flow/react-navigation.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/flow/react-navigation.js b/flow/react-navigation.js index b336c33..907f467 100644 --- a/flow/react-navigation.js +++ b/flow/react-navigation.js @@ -143,6 +143,14 @@ declare module 'react-navigation' { +type: 'Navigation/TOGGLE_DRAWER', +key?: string, |}; + declare export type NavigationDrawerOpenedAction = {| + +type: 'Navigation/DRAWER_OPENED', + +key?: string, + |}; + declare export type NavigationDrawerClosedAction = {| + +type: 'Navigation/DRAWER_CLOSED', + +key?: string, + |}; declare export type NavigationAction = | NavigationBackAction @@ -157,7 +165,9 @@ declare module 'react-navigation' { | NavigationCompleteTransitionAction | NavigationOpenDrawerAction | NavigationCloseDrawerAction - | NavigationToggleDrawerAction; + | NavigationToggleDrawerAction + | NavigationDrawerOpenedAction + | NavigationDrawerClosedAction; /** * NavigationState is a tree of routes for a single navigator, where each @@ -395,6 +405,7 @@ declare module 'react-navigation' { headerMode?: HeaderMode, headerTransitionPreset?: 'fade-in-place' | 'uikit', headerLayoutPreset?: 'left' | 'center', + headerBackTitleVisible?: boolean, cardStyle?: ViewStyleProp, transitionConfig?: () => TransitionConfig, onTransitionStart?: () => void, @@ -814,6 +825,8 @@ declare module 'react-navigation' { OPEN_DRAWER: 'Navigation/OPEN_DRAWER', CLOSE_DRAWER: 'Navigation/CLOSE_DRAWER', TOGGLE_DRAWER: 'Navigation/TOGGLE_DRAWER', + DRAWER_OPENED: 'Navigation/DRAWER_OPENED', + DRAWER_CLOSED: 'Navigation/DRAWER_CLOSED', openDrawer: (payload: { key?: string,