Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for decorators syntax #48

Open
HairyRabbit opened this issue Jan 4, 2018 · 0 comments · May be fixed by #53
Open

support for decorators syntax #48

HairyRabbit opened this issue Jan 4, 2018 · 0 comments · May be fixed by #53

Comments

@HairyRabbit
Copy link
Owner

HairyRabbit commented Jan 4, 2018

link examples

typescript/decorators
tc39/proposal-decorators

syntax

basic syntax

@a @1+1 @c(d) class Foo {}
// or
@a
@1+1
@c(d)
class Foo {}

class decorators

@a class Foo {}

class method decorators

class Foo {
  @a
  b() {}
  @c
  get d() {}
}

class prop decorators

class Foo {
  @a
  b: number = 42
}

class method params decorators (maybe not easy to implement)

class Foo {
  @a
  b(@c d, e) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant