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, +params: $ElementType, + +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, +params: $ElementType, + +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, +params: $ElementType, + +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, +params: $ElementType, + +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, +params: $ElementType, + +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> = { - ...LeafRoute, - +params: $ElementType, -}; +export type NavigationRoute< + RouteName: string = $Keys, +> = RouteProp; 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, }; -export type TooltipRoute> = { - ...LeafRoute, - +params: $ElementType, -}; +export type TooltipRoute> = RouteProp< + TooltipModalParamList, + RouteName, +>; export type BaseTooltipProps = { +navigation: AppNavigationProp,