diff --git a/types/react-native-navigation/index.d.ts b/types/react-native-navigation/index.d.ts index 3edf071e98..cf2225a0a3 100644 --- a/types/react-native-navigation/index.d.ts +++ b/types/react-native-navigation/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-native-navigation 1.1 // Project: https://github.com/wix/react-native-navigation // Definitions by: Egor Shulga +// Jason Merino // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -119,7 +120,8 @@ export interface LightBox { } export interface NavigatorEvent { - id: 'willAppear' | 'didAppear' | 'willDisappear' | 'didDisappear' | 'willCommitPreview' | 'backPress'; + id: 'willAppear' | 'didAppear' | 'willDisappear' | 'didDisappear' | 'willCommitPreview' | 'backPress' | 'bottomTabSelected' | 'bottomTabReselected' | string; + type: 'NavBarButtonPress' | 'DeepLink'; } export class Navigator { diff --git a/types/react-native-navigation/react-native-navigation-tests.tsx b/types/react-native-navigation/react-native-navigation-tests.tsx index e99bfd47dc..91ab4088e8 100644 --- a/types/react-native-navigation/react-native-navigation-tests.tsx +++ b/types/react-native-navigation/react-native-navigation-tests.tsx @@ -20,6 +20,8 @@ class Screen1 extends React.Component { onNavigatorEvent = (event: NavigatorEvent) => { if (event.id === 'willAppear') { console.log('will appear'); + } else if (event.type === 'NavBarButtonPress' && event.id === 'sideMenu') { + console.log('side menu pressed'); } }