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

Update Optional Chaining documentation to reflect the return from undefined to true #2142

Open
mpaarating opened this issue Dec 4, 2019 · 5 comments

Comments

@mpaarating
Copy link
Contributor

mpaarating commented Dec 4, 2019

Per babel/babel#10805 and the subsequent PR , When using optional delete to delete a property of a nullish base, the delete operation returns now returns true. Should a distinction be made in the docs to support this change?

If so, I can make the corresponding change to the documentation.

@babel-bot
Copy link
Contributor

Hey @mpaarating! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community
that typically always has someone willing to help. You can sign-up here
for an invite.

@JLHwung
Copy link
Contributor

JLHwung commented Dec 5, 2019

@mpaarating Good catch! PR's welcome!

@mpaarating
Copy link
Contributor Author

Great, I'll start working on this ASAP!

@mpaarating
Copy link
Contributor Author

@JLHwung After looking into the docs for @babel/plugin-proposal-optional-chaining, there isn't a mention of what the current behavior is (undefined return for nullish base). As such, I don't think that additional documentation need to be added. What are your thoughts?

@JLHwung
Copy link
Contributor

JLHwung commented Dec 13, 2019

@mpaarating I think it will be great to add a section like delete nested properties because the behaviour is changed after 7.8 (to be aligned to the spec) and people may reply on the old behaviour. So it should be clarified in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants