UNPKG

recoil

Version:

Recoil - A state management library for React

18 lines (17 loc) 561 B
/** * 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-local * @format */ 'use strict'; /** * Returns a map containing all of the keys + values from the original map where * the given callback returned true. */ declare function filterMap<TKey, TValue>(map: $ReadOnlyMap<TKey, TValue>, callback: (value: TValue, key: TKey) => boolean): Map<TKey, TValue>; module.exports = filterMap;