D
Deno

help

Support for auto-accessors

Dduncanmak1/28/2024
I'm playing around with Decorators, it seems like with "experimentalDecorators": false, there's a problem with the generated JS if I include the new accessor keyword. It doesn't get down-leveled in the generated code, which is what I want to see (since I'm targetting the browser).
DAHDeno AI Helper1/28/2024
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like you might be encountering an issue with TypeScript configuration or behavior. If you're using the accessor keyword, which is a part of the more recent TypeScript features, and you have "experimentalDecorators": false, it's possible that TypeScript isn't processing decorators at all, since you've explicitly set the flag to false. This could be why you're not seeing the expected down-leveled JavaScript. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. Make sure that your TypeScript configuration is set up correctly to handle decorators and that you're using a TypeScript version that supports the accessor keyword if it's a newer feature. Additionally, ensure that your target configuration in tsconfig.json is set to a version of ECMAScript that is compatible with the browsers you're targeting.
Bbartlomieju1/29/2024
Could you open an issue about it please? We might need to bump our transpiler (or open an issue with them)
Dduncanmak1/29/2024
GitHub
Support auto-accessors · Issue #22173 · denoland/deno
Version: Deno 1.40.2 I'm trying to use Deno as my complete toolchain for writing a component using Lit. I'm trying out the new Stage 3 decorators. When I compile using "experimentalDec...

Looking for more? Join the community!