February 2019
Beginner
694 pages
18h 4m
English
In order to use this extra information within a decorator, we will need to use a third-party library named reflect-metadata. We will discuss how to use third-party libraries in detail in future chapters, but for the time being, this library can be included in our project by typing the following from the command line:
npm install reflect-metadata --save-dev
Once this has been installed, we will need to reference it in our TypeScript file by including the following line at the top of the file:
import 'reflect-metadata';
Before we attempt to compile any code that is using the reflect-metadata library, we will need to install the declaration file for this library, as follows:
npm install @types/reflect-metadata --save-dev ...
Read now
Unlock full access