UNPKG

315 BTypeScriptView Raw
1export default function useHistoryTravel<T>(initialValue?: T, maxLength?: number): {
2 value: T | undefined;
3 backLength: number;
4 forwardLength: number;
5 setValue: (val: T) => void;
6 go: (step: number) => void;
7 back: () => void;
8 forward: () => void;
9 reset: (...params: any[]) => void;
10};