proposal-decorators icon indicating copy to clipboard operation
proposal-decorators copied to clipboard

Implementation Status

Open jkrems opened this issue 2 years ago • 13 comments

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?

jkrems avatar Jul 20 '22 14:07 jkrems

I couldn't find a signal from Babel.

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

nicolo-ribaudo avatar Jul 20 '22 14:07 nicolo-ribaudo

@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).

jkrems avatar Jul 20 '22 23:07 jkrems

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

nicolo-ribaudo avatar Aug 08 '22 12:08 nicolo-ribaudo

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

nicolo-ribaudo avatar Aug 08 '22 12:08 nicolo-ribaudo

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.

rektide avatar Sep 06 '22 16:09 rektide

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

trusktr avatar Sep 12 '22 00:09 trusktr

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

JeanMeche avatar Oct 25 '22 15:10 JeanMeche

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

jkrems avatar Oct 25 '22 23:10 jkrems

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

woody-li avatar Nov 24 '23 09:11 woody-li

Anyone know if Chrome or Safari have started implementation?

NullVoxPopuli avatar Aug 30 '24 19:08 NullVoxPopuli

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

justinfagnani avatar Aug 30 '24 20:08 justinfagnani

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.

jkrems avatar Sep 04 '24 14:09 jkrems

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

transitive-bullshit avatar Sep 13 '24 04:09 transitive-bullshit