The compiler and tooling

This part takes the compiler from the command line: its flags, the deeper tsconfig.json fields, the strict family with source maps and declaration files, then ESLint, Prettier and a debugger. The part ends with project references and with a package that ships its types.

41 tsc CLI compile one file, watch it, and type check a whole project from the command line Open 42 tsconfig deep dive include, target, module and paths, and how each one changes the output Open 43 Strict mode the strict flags that catch null and unsafe indexing, adopted file by file Open 44 Source maps map the emitted JavaScript back to the TypeScript file a debugger shows Open 45 Declaration files declare the types of a package, generated or written by hand Open 46 Linting ESLint and the type-aware rules that catch what types alone do not Open 47 Formatting Prettier, one formatted file, and format on save Open 48 Debugging source maps, a launch config, logging, and halving the code around a bug Open 49 Project references split a large build into linked projects and build them in order Open 50 Publishing packages ship compiled output with its types, a version and a README that starts with use Open

Lessons