Check out example codes for "add module tslib". It will help you in understanding the concepts better.

Code Example 1

// TypeScript 3.9.2 or later
npm install tslib
// TypeScript 3.8.4 or earlier
npm install [email protected]^1 
// TypeScript 2.3.2 or earlier 
npm install [email protected]

Learn ReactJs, React Native from akashmittal.com