Merged
Conversation
ahejlsberg
requested changes
Jun 2, 2017
src/lib/es5.d.ts
Outdated
| every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean; | ||
| every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean; | ||
| every<Z>(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean; | ||
| every<Z>(callbackfn: ( value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean; |
Member
There was a problem hiding this comment.
Something isn't right here. All of the native array types still have three overloads per method, all that changed was that the this parameter disappeared from the last overload (and got replaced with a blank).
ahejlsberg
approved these changes
Jun 3, 2017
Member
|
Maybe add a description that explains why we're simplifying this and include links to the issues that introduced the overloads in the first place. |
This was referenced Jul 17, 2017
mhegazy
added a commit
that referenced
this pull request
Aug 30, 2017
* Follow up on #16223, Remove generic signatures from Array, ReadOnlyArray and TypedArrays * Remove test * Accept baselines * Remove invalid `this: void` in callbacks * accept baselines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change unifies ReadOnlyArray and Array interface methods; it also removes generic signatures from both interfaces that were only used to propagate the type of
thisArgparameter. This reverts the changes in #12784, and unfixes #12548; the removal of the generic signatures saves a good chunk of time of building the compiler and some 30 K symbols created.before
after:
Also fixes #13840