svelte-navigator-history
Version:
History module for svelte-navigator
12 lines (11 loc) • 719 B
TypeScript
import type { KeyedState, StateContainer, NavigatorLocation, Subscribable, HistoryContainer } from "./types";
export declare const getBrowserStateAndKey: <State = unknown>(history: History) => KeyedState<State>;
export declare const createState: <State = unknown>(state?: State | null | undefined) => StateContainer<State>;
export declare function createSubscribable<StoreValue = undefined>({ getState, onInit, onDestroy, }?: {
getState?: () => StoreValue;
onInit?: () => void;
onDestroy?: () => void;
}): Subscribable<StoreValue>;
export declare function createHistoryContainer<State = unknown>({ initialLocation, }: {
initialLocation: NavigatorLocation<State>;
}): HistoryContainer<State>;