

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Install TypeScript
incomplete
2: tsconfig.json
incomplete
3: More tsconfig.json
incomplete
4: Declaration Files
incomplete
5: Using JS Libraries
incomplete
6: TypeScript Language Server
incomplete
7: TypeScript Ignore
incomplete
8: Vanilla Vite
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
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.Run and submit the CLI tests.
The tests are case-sensitive. Make sure the values match exactly.