UNPKG

alinea

Version:
26 lines (25 loc) 1.07 kB
export declare const hashAtom: import("jotai").WritableAtom<string, [hash: string], void> & { init: string; }; export declare const locationAtom: import("jotai").WritableAtom<URL, [url: string], void>; interface Matcher { keys: Array<string>; pattern: RegExp; } export declare function createParams(matcher: Matcher, match: RegExpExecArray): Record<string, string>; interface MatchOptions { route: string; loose?: boolean; } export declare const matchAtoms: import("jotai/vanilla/utils/atomFamily").AtomFamily<MatchOptions, import("jotai").Atom<Record<string, string> | undefined>>; export declare function useMatch(route: string, loose?: boolean): [Record<string, string> | undefined, never]; export declare const useHash: () => [string, (hash: string) => void]; export declare function useLocation(): URL; export declare function useSearchParams(): URLSearchParams; export declare function useNavigate(): (url: string) => void; export declare function link(url: string | undefined): { href: string; } | { href?: undefined; }; export {};