mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Type definitions for array.prototype.flatmap (#29437)
* Type definitions for array.prototype.flatmap * array.prototype.flatmap: importing "/auto" extends the Array prototype
This commit is contained in:
committed by
Wesley Wigham
parent
aef895f924
commit
1899725695
@@ -0,0 +1,7 @@
|
||||
// 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;
|
||||
Reference in New Issue
Block a user