import type { Iteratee, TypeOfCollection } from '../types'; import type { Collection } from '@sdkset/types'; /** * 数组推荐原生:[Array.prototype.filter](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)。 * 返回一个数组,数组由给定集合中通过`predicate`真值检测的元素组成。 * * @example * filter({ a: 1, b: 2, c: 3, d: 4 }, (val) => val % 2 === 0) * => [2, 4] * * @param list 给定集合 * @param predicate 谓语迭代器函数,通过 iteratee 进行转换,以简化速记语法 * @param context 上下文对象,若传递,则作为谓语迭代器函数的执行上下文 this */ export declare function filter>(list: V, predicate?: I, context?: unknown): TypeOfCollection[];