Open allenbrubaker opened 9 years ago
Cannot apply annotations to function() { @Anno this.method = function(){} }
I have only been able to apply annotations to methods defined in a class. Is there a workaround for this? I noticed in the source code that applying an annotation to a var is not supported yet.
At this point, annotations only work on declarations:
function A() {} @A function B() {}
http://google.github.io/traceur-compiler/demo/repl.html#%2F%2F%20Options%3A%20--annotations%20--script%20--source-maps%20%0A%0Afunction%20A()%20%7B%7D%0A%0A%40A%20function%20B()%20%7B%7D%0A
Cannot apply annotations to function() { @Anno this.method = function(){} }
I have only been able to apply annotations to methods defined in a class. Is there a workaround for this? I noticed in the source code that applying an annotation to a var is not supported yet.