source: imaps-frontend/node_modules/react-use/lib/useMap.d.ts

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

Update repo after prototype presentation

  • Property mode set to 100644
File size: 441 bytes
Line 
1export interface StableActions<T extends object> {
2 set: <K extends keyof T>(key: K, value: T[K]) => void;
3 setAll: (newMap: T) => void;
4 remove: <K extends keyof T>(key: K) => void;
5 reset: () => void;
6}
7export interface Actions<T extends object> extends StableActions<T> {
8 get: <K extends keyof T>(key: K) => T[K];
9}
10declare const useMap: <T extends object = any>(initialMap?: T) => [T, Actions<T>];
11export default useMap;
Note: See TracBrowser for help on using the repository browser.