tc39 / proposal-decorators

Decorators for ES6 classes
https://arai-a.github.io/ecma262-compare/?pr=2417
2.75k stars 106 forks source link

Implementation Status #476

Open jkrems opened 2 years ago

jkrems commented 2 years ago

I checked some of the engine/tool issue trackers and couldn't find any clear signal on what the status of the proposal is when it comes to stage 3 implementations. What I found so far:

Does that reflect the current status?

nicolo-ribaudo commented 2 years ago

I couldn't find a signal from Babel.

https://babeljs.io/blog/2022/02/02/7.17.0

jkrems commented 2 years ago

@nicolo-ribaudo Sorry, should've been more clear. I was thinking specifically about the proposal as it's now in stage 3. E.g. isPrivate is now private in the descriptor but (afaict) babel doesn't support this revision yet and I couldn't find an issue to implement it (see current test that still uses isPrivate).

nicolo-ribaudo commented 2 years ago

Have the isPrivate->private and isStatic->static changes already been presented to the committee for consensus?

nicolo-ribaudo commented 2 years ago

Ok, yes: https://github.com/babel/proposals/issues/81#issuecomment-1083336037

rektide commented 2 years ago

Have the isPrivate->private and isStatic->static changes already been presented to the committee for consensus?

@nicolo-ribaudo tc39/proposal-decorators#467 was merged, resolving.

trusktr commented 2 years ago

For the stumblers, stage 3 decorators landed in Babel on Sep 5th: https://babeljs.io/blog/2022/09/05/7.19.0 🎉 Here's a small guide on how to use them in TypeScript: https://github.com/microsoft/TypeScript/issues/48885#issuecomment-1247431866

JeanMeche commented 2 years ago

It appears the new decorators won't land on TS before 5.0

jkrems commented 2 years ago

Thanks, updated the overview item to "after 4.9".

woody-li commented 11 months ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1435869

NullVoxPopuli commented 2 months ago

Anyone know if Chrome or Safari have started implementation?

justinfagnani commented 2 months ago

Chrome seems to be making progress on auto accessors: https://issues.chromium.org/issues/42202709

jkrems commented 2 months ago

Updated the description with updated status for TypeScript and V8/Chrome. Also made it easier to skim for shipping versions and turned it into a checklist.

transitive-bullshit commented 1 month ago

esbuild also includes support for decorators: https://github.com/evanw/esbuild/releases/tag/v0.21.0 and decorator metadata: https://github.com/evanw/esbuild/releases/tag/v0.21.3