atom-typescript: Type errors from lib.*.d.ts not always detected
I’ve got some type errors from lib.*.d.ts files (f.e. lib.dom.d.ts). When I run tsc to typecheck from command line, I get the type errors. However atom-typescript will not show any errors unless I open the lib.*.d.ts file in Atom, at which point atom-typescript will notice and begin showing me the type errors now that I have the lib file.
tsconfig:
{
"compilerOptions": {
"target": "es2017",
"lib": ["es6", "es7", "es2016", "es2017", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"emitDecoratorMetadata": true,
"jsx": "react",
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitAny": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveConstEnums": true,
"pretty": true,
"strictNullChecks": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"sourceMap": true,
"outDir": "./dist/out",
"paths": {
"*": ["*"]
},
"baseUrl": "./src"
},
"compileOnSave": true,
"include": ["src/**/*"]
}
Any ideas why this happens?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17
A couple things to check for:
*.d.tsfiles part of your project (viaincludeorfiles)? If not, TypeScript won’t check those as part of your project, obviously.skipLibCheck: truein tsconfig.json? This will prevent TypeScript from checking*.d.tsfilestypescript:check-all-filescommand (bound to F7 by default) – it might take a while depending on the size of your project and whether you’re using any language service plugins.