tamda
Version:
Practical functional programming library for TypeScript
21 lines (20 loc) • 975 B
TypeScript
import { Predicate } from '../operators';
/**
* Filters the members of an `array` so that only those who match the criteria specified in a `predicate` will be kept.
* @param array Array to filter.
* @param predicate Function that determines whether or not an item is kept in the resulting array.
*/
export declare function filter<T>(array: T[], predicate: Predicate<T>): T[];
/**
* Returns a function that
* filters the members of an `array` so that only those who match the criteria specified in a `predicate` will be kept.
* @param predicate Function that determines whether or not an item is kept in the resulting array.
*/
export declare function filter<T>(predicate: Predicate<T>): typeof deferred;
/**
* Filters the members of an `array` so that
* only those who match the criteria specified in a previously specified `predicate` will be kept.
* @param array Array to filter.
*/
declare function deferred<T>(array: T[]): T[];
export {};