1 | import { History, Location, LocationState } from './index';
|
2 | import { getConfirmation } from './DOMUtils';
|
3 |
|
4 | export interface MemoryHistoryBuildOptions {
|
5 | getUserConfirmation?: typeof getConfirmation | undefined;
|
6 | initialEntries?: string[] | undefined;
|
7 | initialIndex?: number | undefined;
|
8 | keyLength?: number | undefined;
|
9 | }
|
10 |
|
11 | export interface MemoryHistory<HistoryLocationState = LocationState> extends History<HistoryLocationState> {
|
12 | index: number;
|
13 | entries: Location<HistoryLocationState>[];
|
14 | canGo(n: number): boolean;
|
15 | }
|
16 |
|
17 | export default function createMemoryHistory<S = LocationState>(options?: MemoryHistoryBuildOptions): MemoryHistory<S>;
|