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
|
Rev | Line | |
---|
[d565449] | 1 | export 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 | }
|
---|
| 7 | export interface Actions<T extends object> extends StableActions<T> {
|
---|
| 8 | get: <K extends keyof T>(key: K) => T[K];
|
---|
| 9 | }
|
---|
| 10 | declare const useMap: <T extends object = any>(initialMap?: T) => [T, Actions<T>];
|
---|
| 11 | export default useMap;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.