-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Fixes #30507 #32100
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
Closed
timsuchanek
wants to merge
15
commits into
microsoft:master
from
timsuchanek:genericObjectExpressionCompletion
Closed
Fixes #30507 #32100
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8e37e0a
fixes #30507
timsuchanek 5c561ea
Add test case for generic Partial type
timsuchanek d674ee0
Fixes #28470
timsuchanek ad166f7
Simplify contextFlags binary check
timsuchanek 50286b9
Add string literal completion test
timsuchanek ba1e478
Fix ContextFlags typings
timsuchanek adf8a54
Speed up inference expression for completion
timsuchanek 25fa027
Fix baseline merge
andrewbranch 7883ec6
Make contextFlags internal
timsuchanek 7e7dc08
Reapply readonly array changes
timsuchanek c1a47a5
accept baselines
timsuchanek 96a782e
Fix generic completion tests
timsuchanek 5ae31ff
Merge master
orta b863e01
Merge branch 'master' into genericObjectExpressionCompletion
andrewbranch d1cb5cb
Re-merge ContextFlags
andrewbranch 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
Fix baseline merge
- Loading branch information
commit 25fa027721d8f3e7451119f0c9ca8ef5d59301cc
There are no files selected for viewing
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
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
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.
I think this as well as new signature need to be internal
Uh oh!
There was an error while loading. Please reload this page.
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.
Do you mean we should use something different than the
ContextFlagswhen calling the code from the completion service to prevent this type being exposed?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.
I think Sheetal means to move
ContextFlagsinto one of thetsnamespaces that’s already marked/** @internal */and then to mark the second parameter ofTypeChecker['getContextualType']as/* @internal */(or declare it as an internal overload, but the linter might call that an unnecessary overload)Uh oh!
There was an error while loading. Please reload this page.
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.
Ok, makes sense! The overload option indeed makes the linter complain:
The non-overload option, which I wrote like this:
spits out an invalid
typescript.d.ts:Is there a way to ignore the linter in this case?
Or what is the right way to add
@internalto a specific argument?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.
Just filed #33350. I think it would be ok to ignore the line from the linter. @sheetalkamat?
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.
Yes in past we have marked the overload internal and disabled the rule for that line.
Uh oh!
There was an error while loading. Please reload this page.
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. Had to adjust the tests because of #32266
Anything else you need from my side to get this merged?
@sheetalkamat @andrewbranch
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.
Cool, this doesn’t even touch the public API baselines now. Would be good to get an approval from another person on the team but I think this is good.