I have similar problems with:
export default class extends Controller {
element: HTMLButtonElement;
}
Which ends in:
TS2564: Property 'element' has no initializer and is not definitely assigned in the constructor.
TS2610: 'element' is defined as an accessor in class 'Controller', but is overridden here in 'default' as an instance property.
By changing to:
export default class extends Controller {
declare element: HTMLButtonElement;
}
I still get then this one:
TS2610: 'element' is defined as an accessor in class 'Controller', but is overridden here in 'default' as an instance property.
If I try to use:
export default class extends Controller {
declare get element(): HTMLButtonElement;
}
It ends in this error:
TS1031: 'declare' modifier cannot appear on class elements of this kind.
Could you solve that problem?