import { NavigationProp, ParamListBase, StackActionHelpers } from '@react-navigation/native'; import { FlowCommonArgs } from '@shopify/react-native-performance'; declare type StartTimerArgs = Omit; declare const PROFILED_APIS: readonly ["navigate", "push", "replace"]; declare type ProfiledAPISType = typeof PROFILED_APIS[number]; /** * Getting the ParamList of CompositeNavigationProp would not work without inferring State and Options, even though they are not used. */ declare type GetParamListType> = T extends NavigationProp ? ParamList : unknown; interface BaseNavigationSignatures> { navigate>(...args: undefined extends GetParamListType[TRouteName] ? [TRouteName] | [TRouteName, GetParamListType[TRouteName]] : [TRouteName, GetParamListType[TRouteName]]): void; navigate>(route: { key: string; params?: GetParamListType[TRouteName]; } | { name: TRouteName; key?: string; params: GetParamListType[TRouteName]; }): void; navigate>(startTimerArgs: StartTimerArgs, ...args: undefined extends GetParamListType[TRouteName] ? [TRouteName] | [TRouteName, GetParamListType[TRouteName]] : [TRouteName, GetParamListType[TRouteName]]): void; navigate>(startTimerArgs: StartTimerArgs, route: { key: string; params?: GetParamListType[TRouteName]; } | { name: TRouteName; key?: string; params: GetParamListType[TRouteName]; }): void; } declare type StackNavigationSignatures> = T extends StackActionHelpers ? { replace>(...args: undefined extends GetParamListType[TRouteName] ? [TRouteName] | [TRouteName, GetParamListType[TRouteName]] : [TRouteName, GetParamListType[TRouteName]]): void; replace>(startTimerArgs: StartTimerArgs, ...args: undefined extends GetParamListType[TRouteName] ? [TRouteName] | [TRouteName, GetParamListType[TRouteName]] : [TRouteName, GetParamListType[TRouteName]]): void; push>(...args: undefined extends GetParamListType[TRouteName] ? [TRouteName] | [TRouteName, GetParamListType[TRouteName]] : [TRouteName, GetParamListType[TRouteName]]): void; push>(startTimerArgs: StartTimerArgs, ...args: undefined extends GetParamListType[TRouteName] ? [TRouteName] | [TRouteName, GetParamListType[TRouteName]] : [TRouteName, GetParamListType[TRouteName]]): void; } : { replace?: never; push?: never; }; export declare type ProfiledNavigator> = Omit & BaseNavigationSignatures & StackNavigationSignatures; declare const useProfiledNavigation: & Readonly<{ params?: Readonly; }> & { state?: Readonly | import("@react-navigation/native").PartialState> | undefined; })[]; type: string; stale: false; }>, {}, {}>>() => ProfiledNavigator; export default useProfiledNavigation; //# sourceMappingURL=useProfiledNavigation.d.ts.map