futurescript
futurescript copied to clipboard
Add support for ES7 style decorators :)
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?
I have a plan of supporting decorators, but not using @.
In hanoi.fus example it's using radical mode, so @ means arguments[0]. In compatible mode @ means arguments.