Every .d.ts file in the program is normally checked along with your code: the ones in node_modules, and any you write yourself. skipLibCheck skips checking all of them. Their types are still read and used; only errors inside the .d.ts files go unreported.
A file named jsconfig.json turns it on by default, which saves time and spares you errors in dependencies that you cannot fix. The cost shows up when you write a .d.ts of your own: a mistake in it is skipped too.
At a glance
| Write | "skipLibCheck": true (the jsconfig.json default), and turn it off now and then if you write .d.ts files of your own |
|---|---|
| On the command line | --skipLibCheck |
| Type | boolean |
| Default in TypeScript 5.9 | false |
| Default in a jsconfig.json | true |
| TypeScript's description | Skip type checking all .d.ts files. |
| In the quick-start setups |
|
The description is quoted from TypeScript's own option list (Apache-2.0); see the notices. The setup values are the checked configs on the quick-start pages.
Examples
/** Set by the build script. */
declare const BUILD_DATE: Dat;error TS2552: Cannot find name 'Dat'. Did you mean 'Date'?jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": [],
"skipLibCheck": false
},
"include": [
"*.js",
"*.d.ts"
]
} /** Set by the build script. */
declare const BUILD_DATE: Dat;jsconfig.json for this example
{
"compilerOptions": {
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "nodenext",
"types": [],
"skipLibCheck": true
},
"include": [
"*.js",
"*.d.ts"
]
} Your own .d.ts files are skipped too
The examples declare a global in globals.d.ts and misspell its type. With skipLibCheck off, tsc reports Dat; with it on, the typo goes through, BUILD_DATE quietly becomes any, and BUILD_DATE.getFullYear() in main.js is not checked at all.
If your project has .d.ts files of its own (globals, declare module blocks for untyped packages, CSS module types), run tsc -p jsconfig.json --skipLibCheck false from time to time, or in CI, to check them.
Why skipping dependencies is usually right
Errors inside node_modules/**/*.d.ts usually come from two packages that declare the same global differently, or a types package written for a newer TypeScript. You cannot fix them in your project, and they say nothing about your code. Skipping them also makes every run faster.
Gotchas
- Your
.jsfiles are always checked in full;skipLibCheckonly concerns.d.tsfiles. - A
.d.tsfile that TypeScript writes for you (seedeclaration) is output, not input, so this option does not apply to it.
Questions
Is skipLibCheck safe to turn on?
For dependencies, yes; it is the default in a jsconfig.json and in the config tsc --init writes in TypeScript 5.9. The one risk is your own .d.ts files, which are skipped as well.
Sources
- TSConfig Reference: skipLibCheck · TypeScript
- TypeScript 2.0 release notes · TypeScript handbook
Last reviewed 20 October 2026.