jsconfig.json option

skipLibCheck

  • Default false
  • true in jsconfig.json
  • Since TypeScript 2.0

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

globals.d.ts Error confirmed 5.9.3 TypeScript 5.9.3, run 21 October 2026: globals.d.ts(3,27): error TS2552: Cannot find name 'Dat'. Did you mean 'Date'? 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. globals.d.ts(3,27): error TS2552: Cannot find name 'Dat'. Did you mean 'Date'? 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. globals.d.ts(3,27): error TS2552: Cannot find name 'Dat'. Did you mean 'Date'? checked 21 October 2026
/** Set by the build script. */
declare const BUILD_DATE: Dat;error TS2552: Cannot find name 'Dat'. Did you mean 'Date'?
skipLibCheck off: a typo in your own .d.ts is reported.
jsconfig.json for this example
{
  "compilerOptions": {
    "checkJs": true,
    "noEmit": true,
    "strict": true,
    "target": "es2022",
    "module": "nodenext",
    "types": [],
    "skipLibCheck": false
  },
  "include": [
    "*.js",
    "*.d.ts"
  ]
}
globals.d.ts TypeScript 5.9.3 TypeScript 5.9.3, run 21 October 2026: No errors. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. No errors. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. No errors. checked 21 October 2026
/** Set by the build script. */
declare const BUILD_DATE: Dat;
skipLibCheck on (the jsconfig.json default): the same typo goes unreported.
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 .js files are always checked in full; skipLibCheck only concerns .d.ts files.
  • A .d.ts file that TypeScript writes for you (see declaration) 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

Last reviewed 20 October 2026.