We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

More tsconfig.json

We're not going to poke through every option in the tsconfig.json file... that's what docs are for (it's like really really really long). But let's at least cover some of the most common stuff. From most to least important compiler options (imo):

  • lib: Add dom and dom.iterable (note: lowercase) to the list of libraries to allow all the browser APIs if you're writing front-end code.
  • strict: If true, enables all strict type checking options. I strongly recommend it for new projects. You might need to turn it off if you're migrating an existing JS project.
  • skipLibCheck: If true, skips type checking of all declaration files (which means it won't try to type check your infinitely large node_modules folder). Drastically speeds up compilation time.
  • verbatimModuleSyntax: If true, simplifies some weirdness with importing and exporting types, basically it forces you to import and export types using the import type syntax. I recommend it.
  • moduleDetection: If set to force, will consider everything to be a module, which is what you want in any new project.
  • noUncheckedIndexedAccess: If true, adds undefined to the type of any indexed access, which can prevent some runtime errors. I recommend it.

Assignment

Run and submit the CLI tests.

The tests are case-sensitive. Make sure the values match exactly.