UNPKG

351 BTypeScriptView Raw
1declare function useMap<K, T>(initialValue?: Iterable<readonly [K, T]>): readonly [Map<K, T>, {
2 readonly set: (key: K, entry: T) => void;
3 readonly setAll: (newMap: Iterable<readonly [K, T]>) => void;
4 readonly remove: (key: K) => void;
5 readonly reset: () => void;
6 readonly get: (key: K) => T | undefined;
7}];
8export default useMap;