Page MenuHomePhabricator

D9997.id33641.diff
No OneTemporary

D9997.id33641.diff

diff --git a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
--- a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
@@ -776,7 +776,7 @@
declare type GlobalEventMap<State: PossiblyStaleNavigationState> = {|
+state: {| +data: {| +state: State |}, +canPreventDefault: false |},
|};
- declare type EventMapCore<State: PossiblyStaleNavigationState> = {|
+ declare export type EventMapCore<State: PossiblyStaleNavigationState> = {|
...GlobalEventMap<State>,
+focus: {| +data: void, +canPreventDefault: false |},
+blur: {| +data: void, +canPreventDefault: false |},
diff --git a/native/flow-typed/npm/@react-navigation/native_v6.x.x.js b/native/flow-typed/npm/@react-navigation/native_v6.x.x.js
--- a/native/flow-typed/npm/@react-navigation/native_v6.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/native_v6.x.x.js
@@ -40,6 +40,8 @@
ScreenParams,
NavigationContainerType,
BaseNavigationContainerInterfaceRef,
+ EventMapBase,
+ EventMapCore,
} from '@react-navigation/core';
/**
@@ -85,9 +87,29 @@
declare export var useNavigationBuilder: UseNavigationBuilder;
- declare export var NavigationHelpersContext: React$Context<
- ?NavigationHelpers<ParamListBase>,
- >;
+ declare export var NavigationHelpersContext: {
+ Provider: <
+ ParamList: ParamListBase,
+ State: PossiblyStaleNavigationState = PossiblyStaleNavigationState,
+ EventMap: EventMapBase = EventMapCore<State>,
+ T: ?NavigationHelpers<ParamList, State, EventMap> = ?NavigationHelpers<ParamList, State, EventMap>,
+ >(props: {
+ +value: T,
+ +children?: React$Node,
+ ...
+ }) => React$Node,
+ Consumer: <
+ ParamList: ParamListBase,
+ State: PossiblyStaleNavigationState = PossiblyStaleNavigationState,
+ EventMap: EventMapBase = EventMapCore<State>,
+ T: ?NavigationHelpers<ParamList, State, EventMap> = ?NavigationHelpers<ParamList, State, EventMap>,
+ >(props: {
+ +children: (value: T) => ?React$Node,
+ ...
+ }) => React$Node,
+ displayName?: string,
+ ...
+ };
/**
* Navigation prop / route accessors

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 8:59 AM (12 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703140
Default Alt Text
D9997.id33641.diff (2 KB)

Event Timeline