Skip to content

Support decorators for typescript applications #892

@wilberforce

Description

@wilberforce

Discussion - #891

I'm trying build Lit Element examples using wmr. The ts examples play nicely - the ts ones fail with the @ of the decorator

https://lit.dev/playground/#sample=examples/full-component

Is your feature request related to a problem? Please describe.

./public\motion-todos.ts - Unexpected character '@' (./motion-todos.ts:26:1)

  24 |
  25 |
> 26 | @customElement('motion-todos')
     | ^
  27 | export class MotionTodos extends LitElement {constructor(...args) { super…
  28 |   static __initStatic() {this.styles = styles}
  29 |

alangpierce/sucrase#330

Work around
Use the long form customElements.define('motion-todos',MotionTodos)

define the properties the old skool js way

Describe the solution you'd like
It would be great it it just worked ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestupstreamRelated to or blocked on an upstream project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions