February 2019
Beginner
694 pages
18h 4m
English
The TypeScript compiler also includes experimental support for something called decorator metadata. Decorator metadata is metadata that is generated on class definitions in order to supplement the information that is passed into decorators. This option is called emitDecoratorMetadata, and can be added to the tsconfig.json file, as follows:
{
"compilerOptions": {
// other options
"experimentalDecorators": true
,"emitDecoratorMetadata": true
}
}
With this compile option in place, the TypeScript compiler will generate extra information relating to our class definitions. To see the results of this compile option, we will need to take a closer look at the generated JavaScript. Consider the following parameter decorator and ...
Read now
Unlock full access