UNPKG

expo-router

Version:

Expo Router is a file-based router for React Native and web applications.

26 lines (25 loc) • 1.17 kB
import type { Route } from '../react-navigation/native'; import type { State, StringifyConfig } from './getPathFromState'; export type ExpoOptions = { preserveDynamicRoutes?: boolean; preserveGroups?: boolean; shouldEncodeURISegment?: boolean; }; export type ExpoConfigItem = { initialRouteName?: string; }; export declare function fixCurrentParams(allParams: Record<string, any>, route: Route<string> & { state?: State; }, stringify?: StringifyConfig): { [k: string]: string | string[]; }; export declare function appendQueryAndHash(path: string, { '#': hash, ...focusedParams }: Record<string, string | string[]>): string; export declare function appendBaseUrl(path: string, baseUrl?: string | undefined): string; export declare function getPathWithConventionsCollapsed({ pattern, route, params, preserveGroups, preserveDynamicRoutes, shouldEncodeURISegment, initialRouteName, }: ExpoOptions & { pattern: string; route: Route<any>; params: Record<string, any>; initialRouteName?: string; }): string; export declare const getParamName: (pattern: string) => string; export declare function isDynamicPart(p: string): boolean;