diff --git a/native/chat/chat-router.js b/native/chat/chat-router.js --- a/native/chat/chat-router.js +++ b/native/chat/chat-router.js @@ -1,8 +1,6 @@ // @flow import type { - StackNavigationProp, - ParamListBase, StackAction, Route, Router, @@ -62,11 +60,7 @@ | ClearThreadsAction | PushNewThreadAction; -export type ChatRouterNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: string = string, -> = { - ...StackNavigationProp, +export type ChatRouterNavigationHelpers = { +clearScreens: (routeNames: $ReadOnlyArray) => void, +replaceWithThread: (threadInfo: ThreadInfo) => void, +clearThreads: (threadIDs: $ReadOnlyArray) => void, diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js --- a/native/chat/chat.react.js +++ b/native/chat/chat.react.js @@ -13,6 +13,9 @@ type StackNavigatorProps, type ExtraStackNavigatorProps, type StackHeaderProps as CoreStackHeaderProps, + type StackNavigationProp, + type StackNavigationHelpers, + type ParamListBase, } from '@react-navigation/native'; import { StackView, type StackHeaderProps } from '@react-navigation/stack'; import invariant from 'invariant'; @@ -47,7 +50,7 @@ import { useColors, useStyles } from '../themes/colors'; import BackgroundChatThreadList from './background-chat-thread-list.react'; import ChatHeader from './chat-header.react'; -import ChatRouter, { type ChatRouterNavigationProp } from './chat-router'; +import ChatRouter, { type ChatRouterNavigationHelpers } from './chat-router'; import ComposeSubchannel from './compose-subchannel.react'; import ComposeThreadButton from './compose-thread-button.react'; import HomeChatThreadList from './home-chat-thread-list.react'; @@ -131,7 +134,12 @@ ); } -type ChatNavigatorProps = StackNavigatorProps>; +export type ChatNavigationHelpers = { + ...$Exact>, + ...ChatRouterNavigationHelpers, +}; + +type ChatNavigatorProps = StackNavigatorProps>; function ChatNavigator({ initialRouteName, children, @@ -174,7 +182,7 @@ StackNavigationState, StackOptions, StackNavigationEventMap, - ChatRouterNavigationProp<>, + ChatNavigationHelpers<>, ExtraStackNavigatorProps, >(ChatNavigator); @@ -248,12 +256,15 @@ export type ChatNavigationProp< RouteName: $Keys = $Keys, -> = ChatRouterNavigationProp; +> = { + ...StackNavigationProp, + ...ChatRouterNavigationHelpers, +}; const Chat = createChatNavigator< ScreenParamList, ChatParamList, - ChatNavigationProp<>, + ChatNavigationHelpers, >(); // eslint-disable-next-line no-unused-vars export default function ChatComponent(props: { ... }): React.Node { 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 @@ -855,7 +855,7 @@ >, ) => void; - declare type NavigationHelpers< + declare type CoreNavigationHelpers< ParamList: ParamListBase, State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, EventMap: EventMapBase = EventMapCore, @@ -887,6 +887,19 @@ ... }; + declare export type NavigationHelpers< + ParamList: ParamListBase, + State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, + EventMap: EventMapBase = EventMapCore, + > = { + ...$Exact>, + ... + }; + declare type SetParamsInput< ParamList: ParamListBase, RouteName: $Keys = $Keys, @@ -903,7 +916,7 @@ ScreenOptions: {...} = {...}, EventMap: EventMapBase = EventMapCore, > = { - ...$Exact, + StackNavigationHelpers<>, StackOptions, >; @@ -1263,7 +1276,7 @@ +insets: EdgeInsets, +scene: Scene>, +previous?: Scene>, - +navigation: StackNavigationProp, + +navigation: StackNavigationHelpers, +styleInterpolator: StackHeaderStyleInterpolator, |}; @@ -1354,23 +1367,25 @@ +gestureCancel: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactStackNavigationProp< + declare type StackExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +replace: SimpleNavigate, + +push: SimpleNavigate, + +pop: (count?: number) => void, + +popToTop: () => void, + |}; + + declare export type StackNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, > = { - ...$Exact>, - +replace: SimpleNavigate, - +push: SimpleNavigate, - +pop: (count?: number) => void, - +popToTop: () => void, + ...StackExtraNavigationHelpers, ... }; @@ -1379,12 +1394,16 @@ RouteName: $Keys = $Keys, Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...StackExtraNavigationHelpers, + |}; /** * Miscellaneous stack exports @@ -1404,10 +1423,10 @@ |}; declare export type StackNavigatorProps< - NavProp: InexactStackNavigationProp<> = StackNavigationProp<>, + NavHelpers: StackNavigationHelpers<> = StackNavigationHelpers<>, > = {| ...ExtraStackNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** 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 @@ -855,7 +855,7 @@ >, ) => void; - declare type NavigationHelpers< + declare type CoreNavigationHelpers< ParamList: ParamListBase, State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, EventMap: EventMapBase = EventMapCore, @@ -887,6 +887,19 @@ ... }; + declare export type NavigationHelpers< + ParamList: ParamListBase, + State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, + EventMap: EventMapBase = EventMapCore, + > = { + ...$Exact>, + ... + }; + declare type SetParamsInput< ParamList: ParamListBase, RouteName: $Keys = $Keys, @@ -903,7 +916,7 @@ ScreenOptions: {...} = {...}, EventMap: EventMapBase = EventMapCore, > = { - ...$Exact, + StackNavigationHelpers<>, StackOptions, >; @@ -1263,7 +1276,7 @@ +insets: EdgeInsets, +scene: Scene>, +previous?: Scene>, - +navigation: StackNavigationProp, + +navigation: StackNavigationHelpers, +styleInterpolator: StackHeaderStyleInterpolator, |}; @@ -1354,23 +1367,25 @@ +gestureCancel: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactStackNavigationProp< + declare type StackExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +replace: SimpleNavigate, + +push: SimpleNavigate, + +pop: (count?: number) => void, + +popToTop: () => void, + |}; + + declare export type StackNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, > = { - ...$Exact>, - +replace: SimpleNavigate, - +push: SimpleNavigate, - +pop: (count?: number) => void, - +popToTop: () => void, + ...StackExtraNavigationHelpers, ... }; @@ -1379,12 +1394,16 @@ RouteName: $Keys = $Keys, Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...StackExtraNavigationHelpers, + |}; /** * Miscellaneous stack exports @@ -1404,10 +1423,10 @@ |}; declare export type StackNavigatorProps< - NavProp: InexactStackNavigationProp<> = StackNavigationProp<>, + NavHelpers: StackNavigationHelpers<> = StackNavigationHelpers<>, > = {| ...ExtraStackNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** 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 @@ -855,7 +855,7 @@ >, ) => void; - declare type NavigationHelpers< + declare type CoreNavigationHelpers< ParamList: ParamListBase, State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, EventMap: EventMapBase = EventMapCore, @@ -887,6 +887,19 @@ ... }; + declare export type NavigationHelpers< + ParamList: ParamListBase, + State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, + EventMap: EventMapBase = EventMapCore, + > = { + ...$Exact>, + ... + }; + declare type SetParamsInput< ParamList: ParamListBase, RouteName: $Keys = $Keys, @@ -903,7 +916,7 @@ ScreenOptions: {...} = {...}, EventMap: EventMapBase = EventMapCore, > = { - ...$Exact, + StackNavigationHelpers<>, StackOptions, >; @@ -1263,7 +1276,7 @@ +insets: EdgeInsets, +scene: Scene>, +previous?: Scene>, - +navigation: StackNavigationProp, + +navigation: StackNavigationHelpers, +styleInterpolator: StackHeaderStyleInterpolator, |}; @@ -1354,23 +1367,25 @@ +gestureCancel: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactStackNavigationProp< + declare type StackExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +replace: SimpleNavigate, + +push: SimpleNavigate, + +pop: (count?: number) => void, + +popToTop: () => void, + |}; + + declare export type StackNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, > = { - ...$Exact>, - +replace: SimpleNavigate, - +push: SimpleNavigate, - +pop: (count?: number) => void, - +popToTop: () => void, + ...StackExtraNavigationHelpers, ... }; @@ -1379,12 +1394,16 @@ RouteName: $Keys = $Keys, Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...StackExtraNavigationHelpers, + |}; /** * Miscellaneous stack exports @@ -1404,10 +1423,10 @@ |}; declare export type StackNavigatorProps< - NavProp: InexactStackNavigationProp<> = StackNavigationProp<>, + NavHelpers: StackNavigationHelpers<> = StackNavigationHelpers<>, > = {| ...ExtraStackNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** 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 @@ -855,7 +855,7 @@ >, ) => void; - declare type NavigationHelpers< + declare type CoreNavigationHelpers< ParamList: ParamListBase, State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, EventMap: EventMapBase = EventMapCore, @@ -887,6 +887,19 @@ ... }; + declare export type NavigationHelpers< + ParamList: ParamListBase, + State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, + EventMap: EventMapBase = EventMapCore, + > = { + ...$Exact>, + ... + }; + declare type SetParamsInput< ParamList: ParamListBase, RouteName: $Keys = $Keys, @@ -903,7 +916,7 @@ ScreenOptions: {...} = {...}, EventMap: EventMapBase = EventMapCore, > = { - ...$Exact, + StackNavigationHelpers<>, StackOptions, >; @@ -1263,7 +1276,7 @@ +insets: EdgeInsets, +scene: Scene>, +previous?: Scene>, - +navigation: StackNavigationProp, + +navigation: StackNavigationHelpers, +styleInterpolator: StackHeaderStyleInterpolator, |}; @@ -1354,23 +1367,25 @@ +gestureCancel: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactStackNavigationProp< + declare type StackExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +replace: SimpleNavigate, + +push: SimpleNavigate, + +pop: (count?: number) => void, + +popToTop: () => void, + |}; + + declare export type StackNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, > = { - ...$Exact>, - +replace: SimpleNavigate, - +push: SimpleNavigate, - +pop: (count?: number) => void, - +popToTop: () => void, + ...StackExtraNavigationHelpers, ... }; @@ -1379,12 +1394,16 @@ RouteName: $Keys = $Keys, Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...StackExtraNavigationHelpers, + |}; /** * Miscellaneous stack exports @@ -1404,10 +1423,10 @@ |}; declare export type StackNavigatorProps< - NavProp: InexactStackNavigationProp<> = StackNavigationProp<>, + NavHelpers: StackNavigationHelpers<> = StackNavigationHelpers<>, > = {| ...ExtraStackNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** 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 @@ -855,7 +855,7 @@ >, ) => void; - declare type NavigationHelpers< + declare type CoreNavigationHelpers< ParamList: ParamListBase, State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, EventMap: EventMapBase = EventMapCore, @@ -887,6 +887,19 @@ ... }; + declare export type NavigationHelpers< + ParamList: ParamListBase, + State: PossiblyStaleNavigationState = PossiblyStaleNavigationState, + EventMap: EventMapBase = EventMapCore, + > = { + ...$Exact>, + ... + }; + declare type SetParamsInput< ParamList: ParamListBase, RouteName: $Keys = $Keys, @@ -903,7 +916,7 @@ ScreenOptions: {...} = {...}, EventMap: EventMapBase = EventMapCore, > = { - ...$Exact, + StackNavigationHelpers<>, StackOptions, >; @@ -1263,7 +1276,7 @@ +insets: EdgeInsets, +scene: Scene>, +previous?: Scene>, - +navigation: StackNavigationProp, + +navigation: StackNavigationHelpers, +styleInterpolator: StackHeaderStyleInterpolator, |}; @@ -1354,23 +1367,25 @@ +gestureCancel: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactStackNavigationProp< + declare type StackExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +replace: SimpleNavigate, + +push: SimpleNavigate, + +pop: (count?: number) => void, + +popToTop: () => void, + |}; + + declare export type StackNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, > = { - ...$Exact>, - +replace: SimpleNavigate, - +push: SimpleNavigate, - +pop: (count?: number) => void, - +popToTop: () => void, + ...StackExtraNavigationHelpers, ... }; @@ -1379,12 +1394,16 @@ RouteName: $Keys = $Keys, Options: {...} = StackOptions, EventMap: EventMapBase = StackNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...StackExtraNavigationHelpers, + |}; /** * Miscellaneous stack exports @@ -1404,10 +1423,10 @@ |}; declare export type StackNavigatorProps< - NavProp: InexactStackNavigationProp<> = StackNavigationProp<>, + NavHelpers: StackNavigationHelpers<> = StackNavigationHelpers<>, > = {| ...ExtraStackNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -2139,7 +2158,7 @@ declare export var StackView: React$ComponentType<{| ...StackNavigationConfig, +state: StackNavigationState, - +navigation: StackNavigationProp<>, + +navigation: StackNavigationHelpers<>, +descriptors: {| +[key: string]: StackDescriptor |}, |}>; diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js --- a/native/navigation/app-navigator.react.js +++ b/native/navigation/app-navigator.react.js @@ -30,7 +30,10 @@ import { waitForInteractions } from '../utils/timers'; import ActionResultModal from './action-result-modal.react'; import { createOverlayNavigator } from './overlay-navigator.react'; -import type { OverlayRouterNavigationProp } from './overlay-router'; +import type { + OverlayNavigationProp, + OverlayNavigationHelpers, +} from './overlay-navigator.react'; import type { RootNavigationProp } from './root-navigator.react'; import { CalendarRouteName, @@ -147,12 +150,12 @@ export type AppNavigationProp< RouteName: $Keys = $Keys, -> = OverlayRouterNavigationProp; +> = OverlayNavigationProp; const App = createOverlayNavigator< ScreenParamList, OverlayParamList, - AppNavigationProp<>, + OverlayNavigationHelpers, >(); type AppNavigatorProps = { navigation: RootNavigationProp<'App'>, diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js --- a/native/navigation/overlay-navigator.react.js +++ b/native/navigation/overlay-navigator.react.js @@ -5,6 +5,9 @@ NavigatorPropsBase, ExtraNavigatorPropsBase, CreateNavigator, + StackNavigationProp, + ParamListBase, + StackNavigationHelpers, } from '@react-navigation/native'; import { useNavigationBuilder, @@ -22,14 +25,30 @@ import { isMessageTooltipKey } from '../chat/utils'; import { OverlayContext } from './overlay-context'; import OverlayRouter from './overlay-router'; -import type { OverlayRouterNavigationProp } from './overlay-router'; +import type { OverlayRouterExtraNavigationHelpers } from './overlay-router'; import { scrollBlockingModals, TabNavigatorRouteName } from './route-names'; +export type OverlayNavigationHelpers< + ParamList: ParamListBase = ParamListBase, +> = { + ...$Exact>, + ...OverlayRouterExtraNavigationHelpers, + ... +}; + +export type OverlayNavigationProp< + ParamList: ParamListBase = ParamListBase, + RouteName: $Keys = $Keys, +> = { + ...StackNavigationProp, + ...OverlayRouterExtraNavigationHelpers, +}; + /* eslint-disable import/no-named-as-default-member */ const { Value, timing, cond, call, lessOrEq, block } = Animated; /* eslint-enable import/no-named-as-default-member */ -type Props = $Exact>>; +type Props = $Exact>>; const OverlayNavigator = React.memo( ({ initialRouteName, children, screenOptions }: Props) => { const { state, descriptors, navigation } = useNavigationBuilder( @@ -463,7 +482,7 @@ StackNavigationState, {}, {}, - OverlayRouterNavigationProp<>, + OverlayNavigationHelpers<>, ExtraNavigatorPropsBase, >(OverlayNavigator); diff --git a/native/navigation/overlay-router.js b/native/navigation/overlay-router.js --- a/native/navigation/overlay-router.js +++ b/native/navigation/overlay-router.js @@ -1,8 +1,6 @@ // @flow import type { - StackNavigationProp, - ParamListBase, StackAction, Route, Router, @@ -25,11 +23,7 @@ | StackAction | ClearOverlayModalsAction; -export type OverlayRouterNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: string = string, -> = { - ...StackNavigationProp, +export type OverlayRouterExtraNavigationHelpers = { +clearOverlayModals: (keys: $ReadOnlyArray) => void, +goBackOnce: () => void, }; diff --git a/native/navigation/root-navigator.react.js b/native/navigation/root-navigator.react.js --- a/native/navigation/root-navigator.react.js +++ b/native/navigation/root-navigator.react.js @@ -8,6 +8,9 @@ type StackNavigationEventMap, type StackNavigatorProps, type ExtraStackNavigatorProps, + type ParamListBase, + type StackNavigationHelpers, + type StackNavigationProp, } from '@react-navigation/native'; import { StackView, TransitionPresets } from '@react-navigation/stack'; import * as React from 'react'; @@ -25,7 +28,9 @@ import AppNavigator from './app-navigator.react'; import { defaultStackScreenOptions } from './options'; import { RootNavigatorContext } from './root-navigator-context'; -import RootRouter, { type RootRouterNavigationProp } from './root-router'; +import RootRouter, { + type RootRouterExtraNavigationHelpers, +} from './root-router'; import { LoggedOutModalRouteName, AppRouteName, @@ -42,7 +47,13 @@ enableScreens(); -type RootNavigatorProps = StackNavigatorProps>; +export type RootNavigationHelpers = { + ...$Exact>, + ...RootRouterExtraNavigationHelpers, + ... +}; + +type RootNavigatorProps = StackNavigatorProps>; function RootNavigator({ initialRouteName, children, @@ -80,7 +91,7 @@ StackNavigationState, StackOptions, StackNavigationEventMap, - RootRouterNavigationProp<>, + RootNavigationHelpers<>, ExtraStackNavigatorProps, >(RootNavigator); @@ -121,14 +132,25 @@ cardOverlayEnabled: true, }; +export type RootRouterNavigationProp< + ParamList: ParamListBase = ParamListBase, + RouteName: $Keys = $Keys, +> = { + ...StackNavigationProp, + ...RootRouterExtraNavigationHelpers, +}; + export type RootNavigationProp< RouteName: $Keys = $Keys, -> = RootRouterNavigationProp; +> = { + ...StackNavigationProp, + ...RootRouterExtraNavigationHelpers, +}; const Root = createRootNavigator< ScreenParamList, RootParamList, - RootNavigationProp<>, + RootNavigationHelpers, >(); function RootComponent(): React.Node { return ( diff --git a/native/navigation/root-router.js b/native/navigation/root-router.js --- a/native/navigation/root-router.js +++ b/native/navigation/root-router.js @@ -1,8 +1,6 @@ // @flow import type { - StackNavigationProp, - ParamListBase, NavigationState, StackAction, PossiblyStaleRoute, @@ -56,11 +54,7 @@ | ClearRootModalsAction | SetNavStateAction; -export type RootRouterNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: string = string, -> = { - ...StackNavigationProp, +export type RootRouterExtraNavigationHelpers = { +logIn: () => void, +logOut: () => void, +clearRootModals: (keys: $ReadOnlyArray) => void, diff --git a/native/profile/profile.react.js b/native/profile/profile.react.js --- a/native/profile/profile.react.js +++ b/native/profile/profile.react.js @@ -3,6 +3,7 @@ import { createStackNavigator, type StackNavigationProp, + type StackNavigationHelpers, type StackHeaderProps, } from '@react-navigation/stack'; import * as React from 'react'; @@ -56,7 +57,7 @@ const Profile = createStackNavigator< ScreenParamList, ProfileParamList, - ProfileNavigationProp<>, + StackNavigationHelpers, >(); // eslint-disable-next-line no-unused-vars function ProfileComponent(props: { ... }): React.Node {