The TypeScript compiler allows for the configuration of a number of compiler options. These options can be grouped into five main groups, as follows:
- Basic options
- Strict type-checking options
- Module resolution options
- Source map options
- Experimental options
We have already been exposed to a few of these options, including the use of source maps, and the experimental options related to decorators. In this section, however, we will focus on the strict type-checking options that affect the way that we write our TypeScript code. These options provide us with a compile-time check to ensure that we are not breaking certain basic TypeScript rules, and help us to write more hardened code. Specifically, we will focus on the following options:
- noImplicitAny
- strictNullChecks
- strictPropertyInitialization
- noImplicitThis
- noUnusedLocals
- noUnusedParameters
- noImplicitReturns...