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', +type: 'Navigation/TOGGLE_DRAWER',
+key?: string, +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 = declare export type NavigationAction =
| NavigationBackAction | NavigationBackAction
@ -157,7 +165,9 @@ declare module 'react-navigation' {
| NavigationCompleteTransitionAction | NavigationCompleteTransitionAction
| NavigationOpenDrawerAction | NavigationOpenDrawerAction
| NavigationCloseDrawerAction | NavigationCloseDrawerAction
| NavigationToggleDrawerAction; | NavigationToggleDrawerAction
| NavigationDrawerOpenedAction
| NavigationDrawerClosedAction;
/** /**
* NavigationState is a tree of routes for a single navigator, where each * NavigationState is a tree of routes for a single navigator, where each
@ -395,6 +405,7 @@ declare module 'react-navigation' {
headerMode?: HeaderMode, headerMode?: HeaderMode,
headerTransitionPreset?: 'fade-in-place' | 'uikit', headerTransitionPreset?: 'fade-in-place' | 'uikit',
headerLayoutPreset?: 'left' | 'center', headerLayoutPreset?: 'left' | 'center',
headerBackTitleVisible?: boolean,
cardStyle?: ViewStyleProp, cardStyle?: ViewStyleProp,
transitionConfig?: () => TransitionConfig, transitionConfig?: () => TransitionConfig,
onTransitionStart?: () => void, onTransitionStart?: () => void,
@ -814,6 +825,8 @@ declare module 'react-navigation' {
OPEN_DRAWER: 'Navigation/OPEN_DRAWER', OPEN_DRAWER: 'Navigation/OPEN_DRAWER',
CLOSE_DRAWER: 'Navigation/CLOSE_DRAWER', CLOSE_DRAWER: 'Navigation/CLOSE_DRAWER',
TOGGLE_DRAWER: 'Navigation/TOGGLE_DRAWER', TOGGLE_DRAWER: 'Navigation/TOGGLE_DRAWER',
DRAWER_OPENED: 'Navigation/DRAWER_OPENED',
DRAWER_CLOSED: 'Navigation/DRAWER_CLOSED',
openDrawer: (payload: { openDrawer: (payload: {
key?: string, key?: string,