Closed
Description
For example, UInt8Array.find
// currently:
find(
predicate: (value: number, index: number, obj: Array<number>) => boolean,
thisArg?: any): number | undefined;
// better:
find<Z = undefined>(
predicate: (this: Z, value: number, index: number, obj: this) => boolean,
thisArg?: Z): number | undefined;
All the variants have the same issues. It seems like it would be a good idea to refactor them to:
interface TypedArray<ArrType> {
// find etc
}
interface UInt8Array extends TypedArray<UInt8Array> {}
interface UInt16Array extends TypedArray<UInt16Array> {}
// etc