Skip to content
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

[WIP] Add support for decorators with private properties #8248

Closed

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Jul 1, 2018

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? 👍
Tests Added + Pass? Yes
Documentation PR
Any Dependency Changes?
License MIT

I opened this PR before getting the other one merged because I wanted to test what decorated private fields are capable of in the repl 😝

Example: repl

As usual, I will slit this PR in multiple smaller ones. This is mainly to show how things work together and how @babel/plugin-proposal-enhanced-classes (from #8130) is useful.

Depends on #7976 and #8130 (many commits in this PR are actually from those PRs).

@babel-bot
Copy link
Collaborator

babel-bot commented Jul 1, 2018

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8720/

@littledan
Copy link

Great work! You might want to change the repl link in the description above to point to the newer build at https://babeljs.io/repl/build/8593/ .

This has a few advantages:
1) GitHub highlights the helper code, making it easier to review
2) ESLint <3 (it caught an undeclared variable)
I also added flow types to help understanding what the functions do.

Thanks @Kovensky for the idea!
NOTE: This doesn't work for decorators inside the class body, like in
      babel#8300
@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Nov 8, 2018
5 tasks
@nicolo-ribaudo nicolo-ribaudo added this to To do in Class features Nov 21, 2018
@nicolo-ribaudo
Copy link
Member Author

nicolo-ribaudo commented Dec 9, 2018

This PR is too outdated, I will open a new one

@nicolo-ribaudo nicolo-ribaudo deleted the decorators-private-properties branch December 9, 2018 11:28
@nicolo-ribaudo nicolo-ribaudo removed this from To do in Class features Dec 9, 2018
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue Priority: Low Spec: Decorators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants