import { navigateToMiniProgram } from '@tarojs/taro'; import type { TRouteInfo, TRecord } from '../type'; export declare type NavigateBackSync = (deltaOrMark?: number | boolean, extraData?: TRecord) => Promise; export interface INavigateToMiniProgramSyncOptions { appId?: string; path?: string; envVersion?: keyof navigateToMiniProgram.envVersion; extraData?: TRecord; } export declare type CommonRouteWithOptionsSync = (url: string, options?: TRecord) => Promise; export declare type NavigateToSync = (urlOrMark: string | boolean, options?: TRecord | INavigateToMiniProgramSyncOptions) => Promise; export interface ResultMethods { switchTab: CommonRouteWithOptionsSync; relaunch: CommonRouteWithOptionsSync; redirectTo: CommonRouteWithOptionsSync; navigateTo: NavigateToSync; navigateBack: NavigateBackSync; } export declare type Result = [TRouteInfo, ResultMethods]; declare function useRouter(): Result; export default useRouter;