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

add wavy dot #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add wavy dot #216

wants to merge 1 commit into from

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented May 5, 2020

View Rendered Text

This PR depends on #204.

The draft extends from the ChainingExpression approach proposed by the ESLint team. I choose this approach as it is more accessible the the other. I will work the other if we decide to use the OptionalCallExpression approach.

Since a~.b() and (a~.b)() have different semantics, we add eventual: boolean to Chain instead of (Member|Call)Expression. I think this PR can offer perspective on how our decision on #204 will affect other proposal designs.

Note that although the examples contain ?~., it should be considered as an experiment of an indeed experimental proposal which has not supported optional chaining yet. Although the optional chaining support can be expected in the near future, I have added a clause that eventual and optional cannot be both true to align to current proposal.

@RReverser
Copy link
Member

I think this needs to be simply updated to use ChainElement.

@michaelfig
Copy link

I think this needs to be simply updated to use ChainElement.

I'd like to pick this up again. Can you please clarify?

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

Successfully merging this pull request may close these issues.

None yet

3 participants