Loading topic
tsconfig.json file tells the TypeScript compiler (tsc) three things. It says which files to read, which JavaScript to produce, and which checks to run. The file also marks a directory as the root of a TypeScript project, so editors and build tools use it as well.5 min readtsconfig.json and know that tsc finds it by walking up from the current directory. You should also be comfortable with glob patterns such as src/**/*.ts. Here you will learn how include, exclude, and files decide which source files enter a compil5 min readtsconfig.json, know what tsc does, and have written TypeScript with interfaces and functions. It covers two options that decide which JavaScript your compiler emits and which built-in APIs it knows about: target and lib.5 min readmodule, which controls what JavaScript the compiler emits for import and export, and moduleResolution, which controls how the compiler finds the file behind an import path. It assumes you can read a tsconfig.json, know what `include4 min readnpx tsc and read a basic tsconfig.json. It also assumes you know which files include selects. Here you will control what the compiler writes and where it writes it.5 min readtsconfig.json, know what compilerOptions is, and have run npx tsc before. You should also be comfortable with type annotations, classes, and union types such as string | null.4 min readtsconfig.json with "strict": true or are about to add one. The previous chapter showed that strict is an umbrella option. This chapter covers its most important member, noImplicitAny.5 min read"strict": true does in tsconfig.json. It covers one flag from that group, strictNullChecks, and the code patterns it requires.4 min readstrictPropertyInitialization flag. It assumes you know class syntax, union types such as string | undefined, and that strictNullChecks is on. You should also know that "strict": true turns on a family of flags, which the earlier chapter on the strict umbrella covered.4 min read"strict": true turns on: strictFunctionTypes, strictBindCallApply and noImplicitThis. All three concern functions. They decide when one function type can replace another, whether call, apply and bind are checked, and whether this can silently be `4 min read"strict": true turns on and that are easy to overlook: useUnknownInCatchVariables and alwaysStrict. It assumes you can read a tsconfig.json. It also assumes you know that strict is an umbrella option that switches on a group of flags, as the earlier chapt5 min readtsconfig.json, know that "strict": true is an umbrella option, and can fix basic noImplicitAny and strictNullChecks errors. Those flags are covered in earlier chapters.4 min readtsconfig.json, know what strict turns on, and have run tsc in a terminal. You will learn how one config file inherits from another, which parts are merged and which are replaced, and which mistakes cause surprises in multi-package repositories.5 min readesModuleInterop controls how your code imports older CommonJS packages. skipLibCheck trades some checking for compile speed. isolatedModules makes sure each file can be com5 min readtsconfig.json, you know what "strict": true bundles, and you can run npx tsc in a Node.js project. It covers how to adopt strict mode in a codebase that already compiles without it.5 min readtsconfig.json, know what include, exclude, extends and strict do, and can run npx tsc from a terminal. The goal is to stop guessing which settings and files the compiler uses, and to read that from the compiler itself.4 min readtsconfig.json, understand outDir, rootDir, and declaration, and know how extends shares settings. It also assumes you have used npm workspaces or a similar monorepo layout. Here you will split one repository into several TypeScript projects that b5 min read