Skip to content

add wavy dot#216

Open
JLHwung wants to merge 1 commit intoestree:masterfrom
JLHwung:add-wavy-dot
Open

add wavy dot#216
JLHwung wants to merge 1 commit intoestree:masterfrom
JLHwung:add-wavy-dot

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.

3 participants