engine icon indicating copy to clipboard operation
engine copied to clipboard

Cannot define scriptName when the TS option "useDefineForClassFields" is false

Open d0rianb opened this issue 2 months ago • 0 comments

Some libraries (like lit) require "useDefineForClassFields": false in the tsconfig.json However, it seems to break the Script class :
The following code :

export class Annotation extends Script {
  static scriptName = 'annotation'
  ...

causes the runtime error :

Uncaught TypeError: Cannot set property scriptName of class Script extends EventHandler { ... } which has only a getter ```

d0rianb avatar Nov 19 '25 17:11 d0rianb