import { PathConfigMap } from '@react-navigation/native'; import type { NavigationState, PartialState } from '@react-navigation/routers'; import type { ExpoOptions } from './getPathFromState-forks'; export type Options = ExpoOptions & { path?: string; initialRouteName?: string; screens: PathConfigMap; }; export type State = NavigationState | Omit, 'stale'>; export type StringifyConfig = Record string>; /** * Utility to serialize a navigation state object to a path string. * * @example * ```js * getPathFromState( * { * routes: [ * { * name: 'Chat', * params: { author: 'Jane', id: 42 }, * }, * ], * }, * { * screens: { * Chat: { * path: 'chat/:author/:id', * stringify: { author: author => author.toLowerCase() } * } * } * } * ) * ``` * * @param state Navigation state to serialize. * @param options Extra options to fine-tune how to serialize the path. * @returns Path representing the state, e.g. /foo/bar?count=42. */ export declare function getPathFromState(state: State, options?: Options): string; export declare function getPathDataFromState(state: State, options?: Options): { path: string; params: Record; }; export declare function appendBaseUrl(path: string, baseUrl?: string | undefined): string; //# sourceMappingURL=getPathFromState.d.ts.map