Skip to content

[FEATURE REQUEST] Support typescript decorators #138

Description

@coderjinhui

In ts config

...
"experimentalDecorators": true,
...

in ts code

class BigButton extends Button {
...
    @someDecorator()
    fun1() {}
...
}

What to expect:

We hope the decorator will be compiled in target js file

Current:

In js file, the decorator only imported but not used

More info:

I try to write a babel plugin to handle the decorator, but when the babel visit the ClassMethod node, what I found:

  1. node.decorators is null
  2. the function name should be fun1, but what I get is _fun1

But when I remove the transform-ui5 preset, all information is correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions