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 on experimentalDecorators is all you need :)
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 ;)