What in the world is that @ symbol doing? I've never seen that in ES6. It makes this thing look horrid and nonidiomatic, unless I'm just ignorant, which I could be, and both could be true.
That is a TypeScript decorator[0]. It's not a Real JavaScript Thing™ in the TC-39 sense, but you can use it if you're willing to put up with more build tools.
Comments
What in the world is that @ symbol doing? I've never seen that in ES6. It makes this thing look horrid and nonidiomatic, unless I'm just ignorant, which I could be, and both could be true.
That is a TypeScript decorator[0]. It's not a Real JavaScript Thing™ in the TC-39 sense, but you can use it if you're willing to put up with more build tools.
[0] http://blogs.msdn.com/b/typescript/archive/2015/04/30/announ...
That's also a Javascript decorator. You can use it with Babel today if you pass in `{stage: 0}`.
https://github.com/wycats/javascript-decorators
http://babeljs.io/docs/usage/experimental/
Huh, wycats finally caved on the syntax, eh? Good to know.
Thanks for educating me!