-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
This function types #6739
Merged
Merged
This function types #6739
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
0a968f0
Parse this type using parameter syntax
sandersn d8a77c0
Check this type in functions.
sandersn a639b71
Skip emit of this types as first parameter.
sandersn 9bd7afb
Add new error message and strictThis flag
sandersn ca16209
Make compiler strictThis clean.
sandersn 22e571f
Add services support for this types.
sandersn 5fe8478
Add overloads for Function.apply/call/bind
sandersn 04e7d81
Add tests and baselines for this-function types.
sandersn a4f1154
Fix free function bug in cachingInServerLSHost
sandersn d030889
Update baselines
sandersn 675e081
Make this-type of bind's return explicit
sandersn f6361ce
Undo strictThis-clean changes
sandersn 8032b06
Merge branch 'master' into this-function-types
sandersn 0af56c0
Update error numbers in new tests after merge
sandersn 8c87da5
First round of review comments addressed.
sandersn 2f74da1
Add specific error messages for out-of-place this
sandersn 71488fc
Refactorings from review comments
sandersn 5821b87
Do not contextually type object callee arguments
sandersn 80de700
Get contextual type of this parameter correctly
sandersn fa59875
Improve display and contextual typing of `this`
sandersn 738713b
Improve error reporting
sandersn 41bb446
Revert unioning of this argument types
sandersn a014edf
Address more comments and remove temp test.
sandersn e7aa7e4
Merge branch 'master' into this-function-types
sandersn 482accc
Union this-types of unioned call signatures
sandersn 7b531fc
Check this expressions in object literal methods
sandersn 4012587
Update baselines: 'this' in object literal methods
sandersn 3297824
Add missed update of thisInObjectLiterals baseline
sandersn fa22250
Merge branch 'master' into this-function-types
sandersn 3a46e72
After merge, update error numbers in baselines
sandersn 1032cc5
Rename --strictThis to --strictThisChecks
sandersn c9f5f3d
Remove --strictThisChecks
sandersn a91cdcc
Add --noImplicitThis flag
sandersn 9e5f260
Merge branch 'master' into this-function-types
sandersn f64110a
Update baselines after merging from master
sandersn 0113ad5
Error on all uses of this that are implicitly any
sandersn e4ed7f9
Address PR comments
sandersn 0060b4d
Test that signature help doesn't show 'this'
sandersn da98258
Improve error messages and code style
sandersn ce68932
Merge branch 'master' into this-function-types
sandersn 81f0d86
Fix up baselines and missing , after merge
sandersn 4197a30
Improve error messages and always return any from newed functions
sandersn 9e5fba6
Prepend 'the' to a couple of ambiguous messages.
sandersn 2a9f39b
Forbid ConstructType as part of 'no this in constructors'
sandersn 921d5f8
Fix == typo and add object literal 'this' test
sandersn 6c735b5
Add contextual typing test with `this` specified
sandersn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Please add a description for this one.
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.
done