u/vitalytom

Issue with esnext and decorators

I have a project upgrdaded to TypeScript v6.0.3, and ES2025 set as the target, and everything works as expected. Now I am trying to add Temporal usage to the project, and got stuck with that...

In order to access Temporal, the target needs to be esnext. However, target esnext produces native-syntax code for all my use of decorators, which NodeJS doesn't support. I tried to figure out how to make the latest (v26.4.0) NodeJS recognize decorators, but no luck.

How to solve this? Any help is much appreciated!

i.e. how to start using extra features of TypeScript 6.x, such as Temporal, without breaking all code that uses decorators?

reddit.com
u/vitalytom — 8 days ago