Page MenuHomePhabricator

D5395.diff
No OneTemporary

D5395.diff

diff --git a/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js
@@ -923,6 +923,7 @@
> = {|
...LeafRoute<RouteName>,
+params: $ElementType<ParamList, RouteName>,
+ +path?: string,
|};
declare export type ScreenListeners<
diff --git a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js
@@ -923,6 +923,7 @@
> = {|
...LeafRoute<RouteName>,
+params: $ElementType<ParamList, RouteName>,
+ +path?: string,
|};
declare export type ScreenListeners<
diff --git a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js
@@ -923,6 +923,7 @@
> = {|
...LeafRoute<RouteName>,
+params: $ElementType<ParamList, RouteName>,
+ +path?: string,
|};
declare export type ScreenListeners<
diff --git a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js
@@ -923,6 +923,7 @@
> = {|
...LeafRoute<RouteName>,
+params: $ElementType<ParamList, RouteName>,
+ +path?: string,
|};
declare export type ScreenListeners<
diff --git a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js
--- a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js
@@ -923,6 +923,7 @@
> = {|
...LeafRoute<RouteName>,
+params: $ElementType<ParamList, RouteName>,
+ +path?: string,
|};
declare export type ScreenListeners<
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -1,6 +1,6 @@
// @flow
-import type { LeafRoute } from '@react-navigation/native';
+import type { RouteProp } from '@react-navigation/native';
import type { ThreadPickerModalParams } from '../calendar/thread-picker-modal.react';
import type { ComposeSubchannelParams } from '../chat/compose-subchannel.react';
@@ -144,10 +144,9 @@
...ProfileParamList,
};
-export type NavigationRoute<RouteName: string = $Keys<ScreenParamList>> = {
- ...LeafRoute<RouteName>,
- +params: $ElementType<ScreenParamList, RouteName>,
-};
+export type NavigationRoute<
+ RouteName: string = $Keys<ScreenParamList>,
+> = RouteProp<ScreenParamList, RouteName>;
export const accountModals = [LoggedOutModalRouteName];
diff --git a/native/navigation/tooltip.react.js b/native/navigation/tooltip.react.js
--- a/native/navigation/tooltip.react.js
+++ b/native/navigation/tooltip.react.js
@@ -1,6 +1,6 @@
// @flow
-import type { LeafRoute } from '@react-navigation/native';
+import type { RouteProp } from '@react-navigation/native';
import * as Haptics from 'expo-haptics';
import invariant from 'invariant';
import * as React from 'react';
@@ -82,10 +82,10 @@
+margin?: number,
+visibleEntryIDs?: $ReadOnlyArray<string>,
};
-export type TooltipRoute<RouteName: $Keys<TooltipModalParamList>> = {
- ...LeafRoute<RouteName>,
- +params: $ElementType<TooltipModalParamList, RouteName>,
-};
+export type TooltipRoute<RouteName: $Keys<TooltipModalParamList>> = RouteProp<
+ TooltipModalParamList,
+ RouteName,
+>;
export type BaseTooltipProps<RouteName> = {
+navigation: AppNavigationProp<RouteName>,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 12:50 PM (20 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2497916
Default Alt Text
D5395.diff (3 KB)

Event Timeline