TypeScript - Emit Decorator Metadata - emitDecoratorMetadata
Emit Decorator Metadata - emitDecoratorMetadata Enables experimental support for emitting type metadata for decorators which works with the module reflect-metadata. For example, here is the JavaScript function LogMethod( target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor ) { console.log(target); console.log(propertyKey); console.log(descriptor); } class Demo { @LogMethod public foo(bar: number) { // do nothing } } const demo = new Demo();Try With emitDecoratorMetadata not set to true (default): "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate...