mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 09:08:15 +00:00
[Flow] Some updates, mostly from flow-typed (#3682)
1. Remove `NavigationComponent` from `NavigationScreenRouteConfig`. The only context `NavigationScreenRouteConfig` is used in is as an intersection with an object, and as such the only relevant portions of `NavigationScreenRouteConfig` are the object parts. 2. Add static `HEIGHT` variable to `Header` type. 3. In `NavigationContainerProps`, make `onNavigationStateChange` property value nullable. PS: if in the future you guys would prefer that I separate these sort of PRs into their constituent parts, let me know.
This commit is contained in:
parent
c9b0219cec
commit
b097136f74
5
flow/react-navigation.js
vendored
5
flow/react-navigation.js
vendored
@ -296,7 +296,6 @@ declare module 'react-navigation' {
|
||||
} & NavigationScreenRouteConfig);
|
||||
|
||||
declare export type NavigationScreenRouteConfig =
|
||||
| NavigationComponent
|
||||
| {
|
||||
screen: NavigationComponent,
|
||||
}
|
||||
@ -883,7 +882,9 @@ declare module 'react-navigation' {
|
||||
};
|
||||
declare export var SafeAreaView: React$ComponentType<_SafeAreaViewProps>;
|
||||
|
||||
declare export var Header: React$ComponentType<HeaderProps>;
|
||||
declare export var Header: React$ComponentType<HeaderProps> & {
|
||||
HEIGHT: number,
|
||||
};
|
||||
|
||||
declare type _HeaderTitleProps = {
|
||||
children: React$Node,
|
||||
|
Loading…
x
Reference in New Issue
Block a user