@types/array.prototype.flatmap
Version:
TypeScript definitions for array.prototype.flatmap
14 lines (12 loc) • 383 B
TypeScript
interface Array<T> {
flatMap<U, R extends object | undefined = undefined>(
fn: (this: R, x: T, index: number, array: this) => readonly U[],
thisArg?: R,
): U[];
}
interface ReadonlyArray<T> {
flatMap<U, R extends object | undefined = undefined>(
fn: (this: R, x: T, index: number, array: this) => readonly U[],
thisArg?: R,
): U[];
}