Creating a Custom Element Decorator Using TypeScript

It’s a known fact that I’m betting on Web Components. The last time that I delivered a session about Web Components, someone in the audience asked me how he can remove some of the boilerplate he needs to write in order to create a custom element. I answered that you can probably use a compiler such as Stencil or a library such as Polymer or even write your own TypeScript decorator to do that.
So… a few days ago I had some spare time to sit and play with both Custom Elements and TypeScript decorators. As a result, I wrote a small code snippet that can help you to get started and build your own custom element decorator.

Link: https://dzone.com/articles/creating-a-custom-element-decorator-using-typescri?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev