import { Writable, Readable, Updater, Unsubscriber } from 'svelte/store'; export type ParsableStoreNames = 'path' | 'query' | 'fragment'; export type Hook = ( value: T | null, currValue: T, storeName: ParsableStoreNames ) => boolean | undefined; export interface Parsable extends Readable { set(this: void, value: T | string): void; update(this: void, updater: Updater): void; hook(fn: Hook): Unsubscriber; } export interface SubmitEvent extends Event { submitter: HTMLElement | null; } export interface ParseParamsOptions { loose?: boolean; sensitive?: boolean; blank?: boolean; decode?: typeof decodeURIComponent; } export interface Prefs { array: { separator: string; format: 'bracket' | 'separator'; }; convertTypes: boolean; breakHooks: boolean; hashbang: boolean; anchor: boolean | ScrollIntoViewOptions; scroll: boolean | ScrollIntoViewOptions; focus: boolean; nesting: number; sideEffect: boolean; base: string; } export type Param = string | boolean | number | {} | [] | null | undefined; export type Params = Record; export type State = Record; export declare const prefs: Prefs; export declare const path: Parsable; export declare const query: Parsable; export declare const fragment: Parsable; export declare const state: Writable; export declare const url: Readable; export declare const pattern: Readable< ( pattern?: string | RegExp, options?: ParseParamsOptions ) => T | null >; export declare function goto(url?: string | URL, data?: State): void; export declare function redirect(url?: string | URL, data?: State): void; export declare function back(url?: string | URL): void; export declare function click(e: MouseEvent): void; export declare function submit(e: SubmitEvent): void; export declare function paramable( pattern?: string, options?: ParseParamsOptions ): Writable;