8000 Upgrade to latest, stage 2 spec · Issue #84 · jayphelps/core-decorators · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 29, 2020. It is now read-only.

Upgrade to latest, stage 2 spec #84

Open
jayphelps opened this issue Jul 29, 2016 · 5 comments
Open
< 8000 div class="mb-2 flex-shrink-0">

Upgrade to latest, stage 2 spec #84

jayphelps opened this issue Jul 29, 2016 · 5 comments

Comments

@jayphelps
Copy link
Owner

Latest spec was just approved to stage 2: http://tc39.github.io/proposal-decorators/

Babel may or may not start supporting this spec. It's a non-trivial change and compared to most specs to date, fairly complicated, so I wouldn't be surprised if they continue to be too scared of churn to implement it. https://phabricator.babeljs.io/T2645

That said, I think I'll start trying to implement this anyway mostly so I can see if I can support both the old and new specs in the same library. I'm skeptical that I can.

@jayphelps jayphelps mentioned this issue Aug 5, 2016
18 tasks
@jkrems
Copy link
jkrems commented Aug 19, 2016

If you're just looking to play around / test out how it might work against the stage-2 spec, I did an initial implementation of a transform for babel 6 here: https://github.com/jkrems/babel-plugin-transform-decorators-stage-2-initial

(Note: class decorators are only partially implemented but method decorators should work mostly according to spec.)

@jayphelps
Copy link
Owner Author

@jkrems that's sweet! I will indeed take a look. Thanks for letting me know.

@kevinSuttle
Copy link

@jayphelps Seems they moved back to GitHub: babel/babel#2645

@peey
Copy link
peey commented Jun 9, 2017

@jayphelps Babel has begun work on upgrading to stage 2 spec. We may not support the older spec in next major release. Would you like to join the discussion on Babel's slack? I've sent you an invite. (To anyone else who wants to join, you can get a slack invite from here and the discussion channel is #proposal-decorators)

As a decorators library author it'd be useful to get your thoughts on migration from stage 0 spec to stage 2 spec.

@jayphelps
Copy link
Owner Author

@peey thanks! Sorry I forgot to comment here, but I did visit the channel and do still plan to update core-decorators to be stage-2 compliant when a compiler (babel or TS) supports it 👍

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

No branches or pull requests

4 participants
0