forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 14
es private fields in in #52
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
Merged
acutmore
merged 30 commits into
bloomberg:private-fields-in-in
from
acutmore:es-private-fields-in-in
Jun 17, 2021
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
306397b
basic parsing of private-id-in-in
acutmore df7e97d
basic type check and narrow
acutmore 219899f
narrow to instanceOf klass not typeof klass
acutmore fa3a4c7
tweaking tests
acutmore 7df6a99
fix emit with type syntax on rhs
acutmore df5a86f
add test case for subclass union narrow
acutmore 3560223
es2020 emit
acutmore 17c95e6
fix linting errors
acutmore ec072dc
mark as used
acutmore 45e1b48
improve error message when inside a class
acutmore 9127d55
respect whitespace and comments in emit
acutmore 4399cf5
dont parse single privateIdentifier to reenable quick fix
acutmore 0462595
remove need for lookupClassForPrivateIdentifierDeclaration
acutmore 23c8f98
add tests for never
acutmore 43a7d9f
give child class different structure from parent
acutmore 170e61b
cleanup testing for unused field
acutmore 7e33365
use isTypeDerivedFrom
acutmore f2efbcf
add TODO for static private field emit
acutmore 598215b
include in find-all-references results
acutmore f7ff235
emit as helper with runtime type check
acutmore f3d1e52
correct issues caused by rebase
acutmore dbd7113
update emit for static fields and methods
acutmore 91cfecb
narrow to class for static field
acutmore 5eead91
tidy up TODOs
acutmore 85a367b
add quickFix
acutmore 02f59a3
update typescript.d.ts baseline
acutmore 8928039
post PR review improvements:
acutmore 211b39e
Merge branch 'main' into es-private-fields-in-in
acutmore a846027
fix linting
acutmore d2bddf3
update .d.ts baselines
acutmore 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
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
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
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
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
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.
Maybe we should think of common parsing mistakes like
if(#prop.a in foo)
. This currently issues the error'in' expected.
. I would argue an error along the lines of: You might have meantthis.#props.a
would be better,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.
Looking into this there are existing errors and quickFixes for 'bare' privateFields but my branch was preventing them from running as I was consuming the field in the parser. I've changed the parser to lookahead and only match when the
in
keyword is present.