Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.
/ babylon Public archive

Parse parameter decorators#3

Closed
shuhei wants to merge 4 commits intobabel:masterfrom
shuhei:parameter-decorators
Closed

Parse parameter decorators#3
shuhei wants to merge 4 commits intobabel:masterfrom
shuhei:parameter-decorators

Conversation

@shuhei
Copy link
Copy Markdown
Member

@shuhei shuhei commented Mar 10, 2016

Because Method Parameter Decorators is now a TC39 stage 0 proposal, I'd like to propose babylon to parse parameter decorators.

While the actual transform is still being debated, it would be great if babylon only parses the syntax and allows users to transform it with third-party plugins. One concrete use case is Angular 2's decorators.

https://phabricator.babeljs.io/T1301

@shuhei shuhei force-pushed the parameter-decorators branch from f9a6cfb to 23ff430 Compare March 10, 2016 16:00
"name": "x",
"decorators": [
{
"type": "Decorator",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decorator should probably be broken into an alias of many different types.

interface Decorator <: Node {
  expression: Expression;
}

interface ClassDecorator <: Decorator {
  type: "ClassDecorator"
}

interface ParameterDecorator <: Decorator {
  type: "ParameterDecorator"
}

// etc...

@loganfsmyth
Copy link
Copy Markdown
Member

This was auto-closed because this repo has been updated to include the Git history from the main Babel repo. It doesn't actually look like Github will let me re-open it? I can't speak to the validity of this PR, but it appears you'll need to rebase and open a new one.

The new force-pused master branch should be identical to the old one, so you should be able to use rebase --onto or cherry-pick to move your commit over.

@shuhei
Copy link
Copy Markdown
Member Author

shuhei commented Mar 21, 2016

@loganfsmyth Thanks, I'll cherry-pick and reopen it!

@shuhei shuhei mentioned this pull request Mar 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants