UNPKG

@virtualstate/app-history

Version:

Native JavaScript [app-history](https://github.com/WICG/app-history) implementation

17 lines (16 loc) 514 B
import { AppHistory } from "../spec/app-history"; export interface AppHistoryAssertFn { (given: unknown): asserts given is () => AppHistory; } declare global { interface History { pushState(data: unknown, unused: string, url?: string | URL): void; } interface AppHistory { } interface Window { readonly history: History; readonly appHistory: AppHistory; } } export declare function assertAppHistory(createAppHistory: () => unknown): Promise<AppHistoryAssertFn>;