Skip to content

TypedArrays: fixed find and findIndex callback param obj type. #18493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/lib/es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ interface Int8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -1588,7 +1588,7 @@ interface Int8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -1844,7 +1844,7 @@ interface Uint8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -1855,7 +1855,7 @@ interface Uint8Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -2111,7 +2111,7 @@ interface Uint8ClampedArray {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -2122,7 +2122,7 @@ interface Uint8ClampedArray {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -2377,7 +2377,7 @@ interface Int16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -2388,7 +2388,7 @@ interface Int16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -2644,7 +2644,7 @@ interface Uint16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -2655,7 +2655,7 @@ interface Uint16Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -2911,7 +2911,7 @@ interface Int32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -2922,7 +2922,7 @@ interface Int32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -3178,7 +3178,7 @@ interface Uint32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -3189,7 +3189,7 @@ interface Uint32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -3444,7 +3444,7 @@ interface Float32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -3455,7 +3455,7 @@ interface Float32Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down Expand Up @@ -3712,7 +3712,7 @@ interface Float64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;

/**
* Returns the index of the first element in the array where predicate is true, and -1
Expand All @@ -3723,7 +3723,7 @@ interface Float64Array {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;

/**
* Performs the specified action for each element in an array.
Expand Down