mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Type definitions for array.prototype.flatmap * array.prototype.flatmap: importing "/auto" extends the Array prototype
8 lines
282 B
TypeScript
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;
|