recoil
Version:
Recoil - A state management library for React
29 lines (28 loc) • 594 B
Flow
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+recoil
* @flow strict
* @format
*/
;
type Options<K> = {
mapKey: (K) => mixed
};
declare class MapCache<K, V> {
_map: Map<mixed, V>,
_keyMapper: (K) => mixed,
constructor(options?: Options<K>): any,
size(): number,
has(key: K): boolean,
get(key: K): ?V,
set(key: K, val: V): void,
delete(key: K): void,
clear(): void,
}
module.exports = {
MapCache
};