v0.21.2
-
Correct
this
in field and accessor decorators (#3761)This release changes the value of
this
in initializers for class field and accessor decorators from the module-levelthis
value to the appropriatethis
value for the decorated element (either the class or the instance). It was previously incorrect due to lack of test coverage. Here's an example of a decorator that doesn't work without this change:const dec = () => function() { this.bar = true } class Foo { @dec static foo } console.log(Foo.bar) // Should be "true"
-
Allow
es2023
as a target environment (#3762)TypeScript recently added
es2023
as a compilation target, so esbuild now supports this too. There is no difference between a target ofes2022
andes2023
as far as esbuild is concerned since the 2023 edition of JavaScript doesn't introduce any new syntax features.