mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
Merge branch 'skipLibCheck'
This commit is contained in:
commit
ec92f7eb4d
@ -16383,14 +16383,11 @@ namespace ts {
|
||||
function checkSourceFileWorker(node: SourceFile) {
|
||||
const links = getNodeLinks(node);
|
||||
if (!(links.flags & NodeCheckFlags.TypeChecked)) {
|
||||
// Check whether the file has declared it is the default lib,
|
||||
// and whether the user has specifically chosen to avoid checking it.
|
||||
if (compilerOptions.skipDefaultLibCheck) {
|
||||
// If the user specified '--noLib' and a file has a '/// <reference no-default-lib="true"/>',
|
||||
// then we should treat that file as a default lib.
|
||||
if (node.hasNoDefaultLib) {
|
||||
return;
|
||||
}
|
||||
// If skipLibCheck is enabled, skip type checking if file is a declaration file.
|
||||
// If skipDefaultLibCheck is enabled, skip type checking if file contains a
|
||||
// '/// <reference no-default-lib="true"/>' directive.
|
||||
if (compilerOptions.skipLibCheck && node.isDeclarationFile || compilerOptions.skipDefaultLibCheck && node.hasNoDefaultLib) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Grammar checking
|
||||
|
||||
@ -139,6 +139,11 @@ namespace ts {
|
||||
name: "skipDefaultLibCheck",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
name: "skipLibCheck",
|
||||
type: "boolean",
|
||||
description: Diagnostics.Skip_type_checking_of_declaration_files,
|
||||
},
|
||||
{
|
||||
name: "out",
|
||||
type: "string",
|
||||
|
||||
@ -2348,6 +2348,10 @@
|
||||
"category": "Message",
|
||||
"code": 6011
|
||||
},
|
||||
"Skip type checking of declaration files.": {
|
||||
"category": "Message",
|
||||
"code": 6012
|
||||
},
|
||||
"Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'": {
|
||||
"category": "Message",
|
||||
"code": 6015
|
||||
|
||||
@ -2505,6 +2505,7 @@ namespace ts {
|
||||
allowJs?: boolean;
|
||||
noImplicitUseStrict?: boolean;
|
||||
strictNullChecks?: boolean;
|
||||
skipLibCheck?: boolean;
|
||||
listEmittedFiles?: boolean;
|
||||
lib?: string[];
|
||||
/* @internal */ stripInternal?: boolean;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user