fix: remove drawer methods from navigation prop

This commit is contained in:
Satyajit Sahoo
2020-01-04 15:41:46 +01:00
parent f21c7004fa
commit 960ce843ae
2 changed files with 7 additions and 4 deletions

View File

@@ -28,7 +28,13 @@ const MyNavScreen = ({
<ScrollView>
<SafeAreaView forceInset={{ top: 'always' }}>
<SampleText>{banner}</SampleText>
<Button onPress={() => navigation.openDrawer()} title="Open drawer" />
<Button
onPress={() => {
// @ts-ignore
navigation.openDrawer();
}}
title="Open drawer"
/>
<Button
onPress={() => navigation.navigate('Email')}
title="Open other screen"

View File

@@ -582,9 +582,6 @@ declare module 'react-navigation' {
params?: NavigationParams,
action?: NavigationAction
): boolean;
openDrawer: () => any;
closeDrawer: () => any;
toggleDrawer: () => any;
getParam<T extends keyof P>(
param: T,
fallback: NonNullable<P[T]>