DefinitelyTyped/types/array.prototype.flatmap/implementation.d.ts
Jesse Hallett 1899725695 Type definitions for array.prototype.flatmap (#29437)
* Type definitions for array.prototype.flatmap

* array.prototype.flatmap: importing "/auto" extends the Array prototype
2018-10-08 10:36:07 -07:00

8 lines
282 B
TypeScript

// This is the same type as the callable signature in `FlatMap` in `index.d.ts`.
declare function flatMap<A, B, T extends object | undefined = undefined>(
xs: ReadonlyArray<A>,
fn: (this: T, x: A, index: number, array: A[]) => B[],
thisArg?: T
): B[];
export = flatMap;