File tree Expand file tree Collapse file tree 4 files changed +15
-8
lines changed Expand file tree Collapse file tree 4 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -16383,14 +16383,11 @@ namespace ts {
1638316383 function checkSourceFileWorker(node: SourceFile) {
1638416384 const links = getNodeLinks(node);
1638516385 if (!(links.flags & NodeCheckFlags.TypeChecked)) {
16386- // Check whether the file has declared it is the default lib,
16387- // and whether the user has specifically chosen to avoid checking it.
16388- if (compilerOptions.skipDefaultLibCheck) {
16389- // If the user specified '--noLib' and a file has a '/// <reference no-default-lib="true"/>',
16390- // then we should treat that file as a default lib.
16391- if (node.hasNoDefaultLib) {
16392- return;
16393- }
16386+ // If skipLibCheck is enabled, skip type checking if file is a declaration file.
16387+ // If skipDefaultLibCheck is enabled, skip type checking if file contains a
16388+ // '/// <reference no-default-lib="true"/>' directive.
16389+ if (compilerOptions.skipLibCheck && node.isDeclarationFile || compilerOptions.skipDefaultLibCheck && node.hasNoDefaultLib) {
16390+ return;
1639416391 }
1639516392
1639616393 // Grammar checking
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ namespace ts {
139139 name : "skipDefaultLibCheck" ,
140140 type : "boolean" ,
141141 } ,
142+ {
143+ name : "skipLibCheck" ,
144+ type : "boolean" ,
145+ description : Diagnostics . Skip_type_checking_of_declaration_files ,
146+ } ,
142147 {
143148 name : "out" ,
144149 type : "string" ,
Original file line number Diff line number Diff line change 23482348 "category" : " Message" ,
23492349 "code" : 6011
23502350 },
2351+ "Skip type checking of declaration files." : {
2352+ "category" : " Message" ,
2353+ "code" : 6012
2354+ },
23512355 "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" : {
23522356 "category" : " Message" ,
23532357 "code" : 6015
Original file line number Diff line number Diff line change @@ -2505,6 +2505,7 @@ namespace ts {
25052505 allowJs ?: boolean ;
25062506 noImplicitUseStrict ?: boolean ;
25072507 strictNullChecks ?: boolean ;
2508+ skipLibCheck ?: boolean ;
25082509 listEmittedFiles ?: boolean ;
25092510 lib ?: string [ ] ;
25102511 /* @internal */ stripInternal ?: boolean ;
You can’t perform that action at this time.
0 commit comments