TypeScript Compiler Options

skipDefaultLibCheck — TypeScript compiler configuration

Legacy completeness option that skips checking default-library declarations rather than every declaration file. Prefer skipLibCheck when deliberately choosing to skip all declaration checking. The test uses a synthetic declaration marked as a default library, alongside an ordinary vendor declaration; only the ordinary vendor error remains when this flag is enabled. No installed compiler libraries are modified. Baseline: TypeScript 5.8.3. Default: false. Create the labeled files in an isolated project; omit file labels. Run the indicated command.

Formal Syntax & Structure

typescript syntaxtypescript
{  "compilerOptions": {    "skipDefaultLibCheck": true  }}

Parameters & Attributes

NameTypeDescription
skipDefaultLibCheckbooleanCompiler option; default: false.

Working Example

Example Snippettypescript
// File: tsconfig.json (omit this label){  "compilerOptions": {    "target": "ES2022",    "module": "CommonJS",    "strict": true,    "types": [],    "noEmit": true,    "skipDefaultLibCheck": true  },  "include": [    "src/**/*.ts"  ]}// File: src/index.ts (omit this label)export const count: number = 1;// File: src/custom.d.ts (omit this label)/// <reference no-default-lib="true"/>/// <reference lib="es2022"/>declare interface CustomDefault { bad: MissingType; }// File: src/vendor.d.ts (omit this label)declare interface Vendor { bad: MissingVendorType; }
// Run in a temporary project:// tsc -p . --pretty false
TypeScript Reference