Higher order this parameter inference, like #31116#33139
Closed
jablko wants to merge 2 commits intomicrosoft:mainfrom
Closed
Higher order this parameter inference, like #31116#33139jablko wants to merge 2 commits intomicrosoft:mainfrom
jablko wants to merge 2 commits intomicrosoft:mainfrom
Conversation
88d37ff to
f2ee891
Compare
42363a4 to
1dcdbda
Compare
aadc185 to
4065598
Compare
2154081 to
14d6b45
Compare
8918d43 to
b135f09
Compare
fd96594 to
b2b2bf8
Compare
02c53f0 to
84cb8d9
Compare
Member
|
Unfortunately, we never finished reviewing this PR. It is pretty old now, so I'm going to close it to reduce the number of open PRs. |
Collaborator
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
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.
The following works since #31116/be88d53ab37453585b449b6ab1918134087b03cf
however the following is still
error TS2322: Type 'unknown' is not assignable to type 'number'.Consequently while
works, the following
is
error TS2322: Type 'unknown[]' is not assignable to type 'bigint[]'.(with--strictBindCallApply).The following
is
error TS2571: Object is of type 'unknown'.This PR extends #31116 to the
thisparameter so the second casefunction(this, value)behaves like the firstfunction call(fn, value).This improves type inference for
--strictBindCallApplyand generic functions and resolves the errors in both of the aboveArray.prototype.map.call()examples.