-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
TypedArrays: fixed find and findIndex callback param obj type. #18493
Conversation
@NaridaL, |
@@ -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: Int16Array) => boolean, thisArg?: any): number | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uint16Array ?
@@ -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: Int16Array) => boolean, thisArg?: any): number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uint16Array
@@ -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: Int32Array) => boolean, thisArg?: any): number | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uint32Array
@@ -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: Int32Array) => boolean, thisArg?: any): number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uint32Array
Yeah... sorry about that. BTW, I tried it with the separate TypedArray interface, and it seems to be an improvement... previous:
now:
... not sure if those statistics are the only relevant thing though. |
Oh yeah, the issues with U/Intarray should be fixed now, because it's not immediately obvious from the code reviews^^. |
We should be moving them out of es5.d.ts anyways. #15780 should be in first though. |
Fixes #18425.