VSCode displays TypeScript errors in two places: inline and in the Problems panel. Viewing an error inline is convenient while coding, whereas the problems panel shows many problems at once.
We can run TypeScript’s CLI with the tsc
command. tsc
can type check and transpile TypeScript files.
TypeScript’s tsc
can command takes command line flags to alter its behavior. For instance, if we pass a flag like --noUnusedLocals
, tsc
will ensure that all defined variables are used.
Installing TypeScript in a project as a dependency allows the project to rely on a specific version of TypeScript.
After initializing a new TypeScript project with the --init
flag, a tsconfig.json
file will be created.
The tsconfig.json
file contains options that control how TypeScript behaves when type checking and transpiling TypeScript.
The top-level tsconfig.json
option extends
allows using another TypeScript configuration as a base, which can be overridden by options defined in tsconfig.json
.