Skip to content

Support for class fields #3278

@LarsDenBakker

Description

@LarsDenBakker

This issue has been reported before with typescript (lit/lit-element#855 and lit/lit-element#878)

With class fields coming to Safari 14, we will start to see more developers using it outside of typescript.

The class field specification changed from using assignment to using defineProperty. This is a problem when using LitElement properties without decorators.

This is a small example: https://jsbin.com/zesedefeqe/1/edit?html,output

Is there any way we can support standard class fields in JS without decorators? Otherwise this will become a common source for confusion for developers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions