Decorators are not a new programming concept, but are one of the structural design patterns, along with the facade and flyweight patterns. In JavaScript, we do not have any implementation of the decorator pattern as of now, though currently they are in a stage two proposal. In TypeScript also, decorators are an experimental feature that may end up changing in implementation depending on how ECMA finalizes the implementation in JavaScript.
Let's first look at what the decorator design pattern states and where is it applicable. Following that, we will look at the TypeScript implementation of the decorator pattern. In Angular, we have decorators such as @Component, @NgModel, and @Injectable, which we will take a brief look at.