mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* array.prototype.flatmap: support ReadonlyArray * array.prototype.flatmap: support readonly result from callback
14 lines
389 B
TypeScript
14 lines
389 B
TypeScript
interface Array<T> {
|
|
flatMap<U, R extends object | undefined = undefined>(
|
|
fn: (this: R, x: T, index: number, array: this) => ReadonlyArray<U>,
|
|
thisArg?: R
|
|
): U[];
|
|
}
|
|
|
|
interface ReadonlyArray<T> {
|
|
flatMap<U, R extends object | undefined = undefined>(
|
|
fn: (this: R, x: T, index: number, array: this) => ReadonlyArray<U>,
|
|
thisArg?: R
|
|
): U[];
|
|
}
|