UNPKG

tamda

Version:

Practical functional programming library for TypeScript

20 lines (19 loc) 755 B
import { Mapper } from '../operators'; /** * Transforms each item in an `array` according to a function `mapFn`. * @param array Array to map over. * @param mapFn A function that projects each member to its new form. */ export declare function map<T, R>(array: T[], mapFn: Mapper<T, R>): R[]; /** * Returns a function that * transforms each item in an `array` according to a function `mapFn`. * @param mapFn A function that projects each member to its new form. */ export declare function map<T, R>(mapFn: Mapper<T, R>): typeof deferred; /** * Transforms each item in an `array` according to a previously specified function `mapFn`. * @param array Array to map. */ declare function deferred<T, R>(array: T[]): R[]; export {};