DefinitelyTyped/types/array.prototype.flatmap/auto.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

7 lines
177 B
TypeScript

interface Array<T> {
flatMap<U, R extends object | undefined = undefined>(
fn: (this: R, x: T, index: number, array: this) => U[],
thisArg?: R
): U[];
}