mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 17:23:42 +08:00
[flow] Update withNavigation and withNavigationFocus to support defaultProps (#5398)
This commit is contained in:
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Update flow definition for `withNavigation` and `withNavigationFocus` to support `defaultProps`
|
||||
|
||||
## [3.0.9] - [2018-12-19](https://github.com/react-navigation/react-navigation/releases/tag/3.0.9)
|
||||
|
||||
## Fixed
|
||||
|
||||
@@ -1208,19 +1208,19 @@ declare module 'react-navigation' {
|
||||
};
|
||||
declare export var TabBarBottom: React$ComponentType<_TabBarBottomProps>;
|
||||
|
||||
declare export function withNavigation<Props: {}>(
|
||||
Component: React$ComponentType<Props>
|
||||
declare export function withNavigation<Props: {}, ComponentType: React$ComponentType<Props>>(
|
||||
Component: ComponentType
|
||||
): React$ComponentType<
|
||||
$Diff<
|
||||
Props,
|
||||
React$ElementConfig<ComponentType>,
|
||||
{
|
||||
navigation: NavigationScreenProp<NavigationStateRoute> | void,
|
||||
}
|
||||
>
|
||||
>;
|
||||
declare export function withNavigationFocus<Props: {}>(
|
||||
Component: React$ComponentType<Props>
|
||||
): React$ComponentType<$Diff<Props, { isFocused: boolean | void }>>;
|
||||
declare export function withNavigationFocus<Props: {}, ComponentType: React$ComponentType<Props>>(
|
||||
Component: ComponentType
|
||||
): React$ComponentType<$Diff<React$ElementConfig<ComponentType>, { isFocused: boolean | void }>>;
|
||||
|
||||
declare export function getNavigation<State: NavigationState, Options: {}>(
|
||||
router: NavigationRouter<State, Options>,
|
||||
|
||||
Reference in New Issue
Block a user