tsconfig

A handful of settings matter; the rest can wait.

strict: true is the one. It turns on null checking and implicit-any checking, which is most of the value. Start with it on, because turning it on later means fixing everything at once.

noEmit when a bundler does the compiling and tsc only checks. skipLibCheck to avoid type-checking your dependencies' definitions, which is almost always what you want. jsx: "react-jsx" for React.

Turning strict off to make errors go away removes most of what you came for and is very hard to reverse: every file written in the meantime assumes the looser rules.

If a specific file is genuinely intractable during a migration, exclude that file rather than lowering the standard for the whole project.

Mark this lesson complete

Signed in, your progress follows you to every device.

Next: Adding Types to an Existing Project →
← Back