UNPKG

@beenotung/tslib

Version:
6 lines (5 loc) 199 B
/** * like Array.from(xs).map(f) * but more performant by performing the lookup in one-pass * */ export declare function mapIterableToArray<T, R>(xs: Iterable<T>, f: (x: T, i: number) => R): R[];