Third party libraries when writing code help us add functionality and details that let's our code do what we want it to do. Within this Repo, I will be exploring Normal libraries that are able to be used in JavaScript & TypeScript and TypeScript-Specific libraries.
To utilize any JavaScript normal library there are added dependencies to make sure TypeScript can read the file.
Normal JavaScript libraries require @types to be defined to be read and compiled by TypeScript. In some cases, these are not available. When that happens declare is utilized. This allows a user to force TypeScript to recognize variables or features that exist.
Lodash is a JavaScript library that helps with managing methods that utilize priminitive and non-primitive data types.
Required
Type package that will indicate to TypeScript how to read the installed library.
npm i --save-dev @types/lodash
These installations includ d.ts files that contain how file works and how TS will read it.
Class transformer is a third party library that targets classes.
Required
npm i class-transformer --save-dev
npm i reflect-metadata --save
Builds up on TypeScript Decorators. Adds validation rules within a class and will automatically validate.
npm i class-validator --save