You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
606 B

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<S = LocationState>(
options?: MemoryHistoryBuildOptions,
): MemoryHistory<S>;