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

[pipeline operator] support await #6889

Closed
xtuc opened this issue Nov 24, 2017 · 9 comments
Closed

[pipeline operator] support await #6889

xtuc opened this issue Nov 24, 2017 · 9 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories Spec: Pipeline Operator

Comments

@xtuc
Copy link
Member

xtuc commented Nov 24, 2017

Choose one: is this a bug report or feature request?

Input Code

promise |> await

which is the equivalent of

await promise

Expected Behavior

var _promise;

_promise = promise, await _promise;

Current Behavior

Parse error: await is a reserved word (1:11)

Possible Solution

Context

Your Environment

software version(s)
Babel
Babylon
node
npm
Operating System

As described in the spec here.

@xtuc xtuc added PR: New Feature 🚀 A type of pull request used for our changelog categories Spec: Pipeline Operator labels Nov 24, 2017
@lijialiang
Copy link

Will not continue to support await ? sorry to disturb.

@xtuc
Copy link
Member Author

xtuc commented Dec 22, 2017

Sorry I don't understand your point @lilijialiang. This is only an addition to the existing support in Babel.

@ksmithbaylor
Copy link

ksmithbaylor commented Jan 4, 2018

Does the spec actually support this? The example in the README only shows

x |> await f

which is an equivalent of

await f

And in the current grammar defined in the spec draft, there is no option for a RHS without a LogicalORExpression expansion.

EDIT:

I just saw the discussion in tc39/proposal-pipeline-operator#66 and corresponding PR tc39/proposal-pipeline-operator#71 which explains that this used to be supported but no longer is.

@mAAdhaTTah
Copy link
Contributor

This is not currently specced yet but will be supported in the parser in #7458 and eventually added as an option in the pipeline plugin.

@thiagoarrais
Copy link
Contributor

Should this be closed?

@mAAdhaTTah
Copy link
Contributor

@thiagoarrais I'll be implementing this as part of the F# parsing. It's not strictly necessary to track but isn't technically "resolved". Up to the maintainers what they want to do here.

@thiagoarrais
Copy link
Contributor

Sorry for the noise. I interpreted that this was already implemented in F#.

@nicolo-ribaudo
Copy link
Member

I added this to https://github.com/babel/babel/projects/9#card-17016058 so we don't forget to close it when it is fixed

@nicolo-ribaudo
Copy link
Member

Supported by #9984

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 23, 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 PR: New Feature 🚀 A type of pull request used for our changelog categories Spec: Pipeline Operator
Projects
None yet
Development

No branches or pull requests

6 participants