@types/history
Version:
TypeScript definitions for history
18 lines (14 loc) • 579 B
TypeScript
import { History, Location, LocationState } from './index';
import { getConfirmation } from './DOMUtils';
export interface MemoryHistoryBuildOptions {
getUserConfirmation?: typeof getConfirmation;
initialEntries?: string[];
initialIndex?: number;
keyLength?: number;
}
export interface MemoryHistory<HistoryLocationState = LocationState> extends History<HistoryLocationState> {
index: number;
entries: Location<HistoryLocationState>[];
canGo(n: number): boolean;
}
export default function createMemoryHistory(options?: MemoryHistoryBuildOptions): MemoryHistory;