mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
* array.prototype.flatmap: support ReadonlyArray * array.prototype.flatmap: support readonly result from callback
8 lines
295 B
TypeScript
8 lines
295 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[]) => ReadonlyArray<B>,
|
|
thisArg?: T
|
|
): B[];
|
|
export = flatMap;
|