fast icon indicating copy to clipboard operation
fast copied to clipboard

fix: JavaScript class fields incompatible with Observable decorator

Open nicholasrice opened this issue 2 years ago • 0 comments

🐛 Bug Report

It appears that the output of TypeScript decorators is incompatible with JavaScript class fields. We should document that using JavaScript class fields is not currently supported, and that anyone compiling projects with TypeScript should ensure that the useDefineForClassFields is set to false. useDefienForClassFields is automatically set to true for target: ES2022 so authors will have to override when using that target.

💻 Repro or Code Sample

Min repro of generic issue : https://stackblitz.com/edit/js-kvjawt?file=index.js

🤔 Expected Behavior

😯 Current Behavior

💁 Possible Solution

🔦 Context

🌍 Your Environment

  • OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
  • Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
  • Version [e.g. 1.8.0]

nicholasrice avatar Sep 14 '22 19:09 nicholasrice