UNPKG

@virtualstate/app-history

Version:

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

26 lines (25 loc) 1.32 kB
import { AppHistoryEntry as AppHistoryEntryPrototype, AppHistoryEntryEventMap, AppHistoryEntryInit as AppHistoryEntryInitPrototype, AppHistoryNavigationType } from "./spec/app-history"; import { AppHistoryEventTarget } from "./app-history-event-target"; import { EventTargetListeners } from "./event-target"; export declare const AppHistoryEntryNavigationType: unique symbol; export declare const AppHistoryEntryKnownAs: unique symbol; export declare const AppHistoryEntrySetState: unique symbol; export interface AppHistoryEntryInit<S = unknown> extends AppHistoryEntryInitPrototype<S> { navigationType: AppHistoryNavigationType; [AppHistoryEntryKnownAs]?: Set<string>; } export declare class AppHistoryEntry<S = unknown> extends AppHistoryEventTarget<AppHistoryEntryEventMap> implements AppHistoryEntryPrototype<S> { #private; get index(): number; readonly key: string; readonly id: string; readonly url?: string; readonly sameDocument: boolean; get [AppHistoryEntryNavigationType](): AppHistoryNavigationType; get [AppHistoryEntryKnownAs](): Set<string>; get [EventTargetListeners](): import("./event-target").EventDescriptor[]; constructor(init: AppHistoryEntryInit<S>); getState<ST extends S>(): ST; getState(): S; [AppHistoryEntrySetState](state: S): void; }