atomic-fns
Version:
Like Lodash, but for ESNext and with types. Stop shipping code built for browsers from 2015.
20 lines (19 loc) • 736 B
TypeScript
/**
* A generic function type with arbitrary arguments and return.
*/
export declare type Function<TReturn = any> = (...args: any) => TReturn;
/**
* An iteratee function used for collection methods.
* @see {@link collections.filter}
* @see {@link collections.find}
* @see {@link collections.forEach}
* @see {@link collections.index}
* @see {@link collections.map}
* @see {@link collections.pick}
* @see {@link collections.omit}
* @see {@link collections.uniq}
* @see {@link collections.sortedUniq}
* @see {@link collections.groupBy}
*/
export declare type Iteratee<T = any, K = any, TResult = any> = (value: T, key?: K, arr?: any) => TResult;
export declare type Predicate<T = any, TReturn = any> = (value: T) => TReturn;