Skip to Content
Mastering TypeScript - Fourth Edition
book

Mastering TypeScript - Fourth Edition

by Nathan Rozentals
April 2021
Beginner content levelBeginner
538 pages
12h 18m
English
Packt Publishing
Content preview from Mastering TypeScript - Fourth Edition

8

Strict Compiler Options

The TypeScript compiler uses the tsconfig.json file to specify a number of compilation options. These options include what version of JavaScript we would like to generate for, what the output directory should be, and whether or not to allow JavaScript source files within the project directory. We have already discussed a few of these compiler options on our journey with TypeScript so far.

One of the most important options is simply named strict, and this single option turns on a group of other compiler options. The purpose of the strict compiler options is to apply a number of checks to our code and determine whether any of these checks fail. As an example, these strict options can determine if a variable could be undefined ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

TypeScript for Beginners

TypeScript for Beginners

Bharath Thippireddy
Learning TypeScript

Learning TypeScript

Josh Goldberg

Publisher Resources

ISBN: 9781800564732Supplemental Content