typescript-retry-decorator icon indicating copy to clipboard operation
typescript-retry-decorator copied to clipboard

Support "ES Decorators, Stage-3" API

Open ivan-kleshnin opened this issue 1 year ago • 2 comments

ES decorator proposal was updated to Stage-3 with a different internal API

https://medium.com/@aude.lellouche/typescript-decorators-stage-3-technical-challenges-and-tips-for-overcoming-them-8deed94a3de7

To my understanding, the library is based on Stage-2 and using it with Stage-3 (TS5+ without "experimentalDecorators": true) causes errors like:

TS1241: Unable to resolve signature of method decorator when called as an expression.
The runtime will invoke the decorator with 2 arguments, but the decorator expects 3

Any chance this library is updated to support Stage-3? (would require a major version bump)

ivan-kleshnin avatar Jun 02 '24 09:06 ivan-kleshnin

hi @ivan-kleshnin , this is an interesting point, I also looked a bit on this when TS 5 add support for the native decorator. I have not been in nodejs ecosystem for a while, do you see the new ES Decorator been used widely?

I just checked caniuse and it seems no browser supports it native for now. Also in the proposal github issue, there are several issues related to migration guide. Not exactly sure how the community is to handle this transition. do you have any insights? 🤣

vcfvct avatar Jun 02 '24 20:06 vcfvct

Yeah, it seems like we have to wait for some time 😮‍💨

ivan-kleshnin avatar Jun 03 '24 04:06 ivan-kleshnin