Add missing types (#4836)

* Add missing types

* Added missing types to DrawerActions
This commit is contained in:
Tom Spencer 2018-09-04 18:44:02 +01:00 committed by Brent Vatne
parent 74a04c3ce5
commit 50320bf0d9

View File

@ -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,