import { type PropType } from "./shared"; export type PushToOption = string | (Omit & ({ url: string; } | { path: string; query?: Record; })); export type ReplaceToOption = string | (Omit & ({ url: string; } | { path: string; query?: Record; })); export type BackToOption = WechatMiniprogram.NavigateBackOption; export type SwitchTabOption = string | (Omit & ({ url: string; } | { path: string; query?: Record; })); export type ReLaunchToOption = string | (Omit & ({ url: string; } | { path: string; query?: Record; })); type PageQueryValue = T extends PropType ? U : T extends null ? any : undefined; export type PageQuery = { [K in keyof T]?: PageQueryValue; }; type PageQueriesValue = T extends { type: PropType; } ? { type: PropType; formatter?: (value: string) => U; } : T extends PropType ? PropType : undefined; export type PageQueries = { [K in keyof T]?: PageQueriesValue; }; export declare const useRouter: () => { push: (to: PushToOption) => Promise; replace: (to: ReplaceToOption) => Promise; go: (steps: number) => Promise | undefined; back: (to: BackToOption) => Promise; switchTab: (to: SwitchTabOption) => Promise; reLaunch: (to: ReLaunchToOption) => Promise; }; export declare const useRoute: () => { path: string; query: Record | PageQuery>; }; export declare let _queries: PageQuery<{}>; export declare const setQueries: >(queries: TQueries) => void; export declare const createQuery: >(query: Record, queries?: TQueries) => Record | PageQuery; export {};