Decorators are a stage 2 proposal for JavaScript already available as an experimental feature in TypeScript.
A decorator is a function that applie...
For further actions, you may consider blocking this person and/or reporting abuse
This was a nice introduction to the new syntax! Really excited for decorators to finally become part of the JS spec (hopefully) soon.
One note - I believe you only need the
emitDecoratorMetadata
option if you want to use TypeScript's reflection API, which isn't currently part of the stage 2 proposal. For the examples you gave, I think turning onexperimentalDecorators
is all you need :)You're absolutely right, I copied/pasted that config from one of my project. I'll update the article ;)