UNPKG

@svelte-navigator/history

Version:
15 lines (14 loc) 563 B
import type { HashHistory } from "./types"; export interface HashHistoryOptions { window?: Window; } /** * Use the hash fragment of the url to simulate routing via url. * This approach is great if you want to get started quickly or if * you don't have access to your server's configuration. * * @param {HashHistoryOptions} [options] Supply a custom window object * * @returns {HashHistory} The history object */ export default function createHashHistory<State = unknown>({ window: windowArg, }?: HashHistoryOptions): HashHistory<State>;