mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-23 08:38:17 +00:00
[flow] Fix type of getCurrentNavigation (#5173)
As of 2.18 we seem to be okay returning `null` here.
This commit is contained in:
parent
352e703ea9
commit
adcb2e5b4a
30
flow/react-navigation.js
vendored
30
flow/react-navigation.js
vendored
@ -535,14 +535,26 @@ declare module 'react-navigation' {
|
||||
) => NavigationEventSubscription,
|
||||
getParam: <ParamName>(
|
||||
paramName: ParamName,
|
||||
fallback?: $ElementType<$PropertyType<{|
|
||||
...{| params: {| [ParamName]: void |} |},
|
||||
...$Exact<S>,
|
||||
|}, 'params'>, ParamName>,
|
||||
) => $ElementType<$PropertyType<{|
|
||||
...{| params: {| [ParamName]: void |} |},
|
||||
...$Exact<S>,
|
||||
|}, 'params'>, ParamName>,
|
||||
fallback?: $ElementType<
|
||||
$PropertyType<
|
||||
{|
|
||||
...{| params: {| [ParamName]: void |} |},
|
||||
...$Exact<S>,
|
||||
|},
|
||||
'params'
|
||||
>,
|
||||
ParamName
|
||||
>
|
||||
) => $ElementType<
|
||||
$PropertyType<
|
||||
{|
|
||||
...{| params: {| [ParamName]: void |} |},
|
||||
...$Exact<S>,
|
||||
|},
|
||||
'params'
|
||||
>,
|
||||
ParamName
|
||||
>,
|
||||
dangerouslyGetParent: () => NavigationScreenProp<*>,
|
||||
isFocused: () => boolean,
|
||||
// Shared action creators that exist for all routers
|
||||
@ -1213,6 +1225,6 @@ declare module 'react-navigation' {
|
||||
dispatch: NavigationDispatch,
|
||||
actionSubscribers: Set<NavigationEventCallback>,
|
||||
getScreenProps: () => {},
|
||||
getCurrentNavigation: () => NavigationScreenProp<State>
|
||||
getCurrentNavigation: () => ?NavigationScreenProp<State>
|
||||
): NavigationScreenProp<State>;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user