source: imaps-frontend/node_modules/react-use/esm/useStateWithHistory.d.ts@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 698 bytes
RevLine 
[d565449]1import { Dispatch } from 'react';
2import { IHookStateInitAction, IHookStateSetAction } from './misc/hookState';
3interface HistoryState<S> {
4 history: S[];
5 position: number;
6 capacity: number;
7 back: (amount?: number) => void;
8 forward: (amount?: number) => void;
9 go: (position: number) => void;
10}
11export declare type UseStateHistoryReturn<S> = [S, Dispatch<IHookStateSetAction<S>>, HistoryState<S>];
12export declare function useStateWithHistory<S, I extends S>(initialState: IHookStateInitAction<S>, capacity?: number, initialHistory?: I[]): UseStateHistoryReturn<S>;
13export declare function useStateWithHistory<S = undefined>(): UseStateHistoryReturn<S | undefined>;
14export {};
Note: See TracBrowser for help on using the repository browser.