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

Add support for ES7 style decorators :) #20

Open
kristianmandrup opened this issue Mar 6, 2017 · 2 comments
Open

Add support for ES7 style decorators :) #20

kristianmandrup opened this issue Mar 6, 2017 · 2 comments

Comments

@kristianmandrup
Copy link

kristianmandrup commented Mar 6, 2017

Since our code should be as clear and concise as possible and avoid boilerplate!

So I'd like to use polymer decorators with FutureScript for beautiful, efficient frontend dev.

@customElement('test-element')
export class TestElement extends Polymer.Element {

    @property({notify: true})
    aNum: number = 42;

    @property({notify: true})
    aString: string = 'yes';

I see that @ symbol is already used for args but always on its own or with number coming after, so I don't see a conflict :) Where would I add this?

Oh wait, I see it used in hanoi.fus example?

hanoi: <>
    if @count = 1
        move[@from, @to]

Does it mean this.from I thought that would be me.from according to docs?

@zhanzhenzhen
Copy link
Owner

I have a plan of supporting decorators, but not using @.

@zhanzhenzhen
Copy link
Owner

In hanoi.fus example it's using radical mode, so @ means arguments[0]. In compatible mode @ means arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants