Speed up tests by not type-checking lib.d.ts unless the test asks for that.

This commit is contained in:
Cyrus Najmabadi committed 2015-06-04 01:03:02 -07:00
1 parent 343a923a35
commit 2bf19e80c3
25 files changed
+139 -106

No files matched your search

+6 -2
View File
@@ -11368,6 +11368,12 @@ module ts {
function checkSourceFileWorker(node: SourceFile) {
let links = getNodeLinks(node);
if (!(links.flags & NodeCheckFlags.TypeChecked)) {
links.flags |= NodeCheckFlags.TypeChecked;
if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) {
return;
}
// Grammar checking
checkGrammarSourceFile(node);
@@ -11399,8 +11405,6 @@ module ts {
if (emitParam) {
links.flags |= NodeCheckFlags.EmitParam;
}
links.flags |= NodeCheckFlags.TypeChecked;
}
}
+1
View File
@@ -391,6 +391,7 @@ module ts {
processImportedModules(file, basePath);
}
if (isDefaultLib) {
file.isDefaultLib = true;
files.unshift(file);
}
else {
+3 -1
View File
@@ -1143,7 +1143,8 @@ module ts {
// The first node that causes this file to be an external module
/* @internal */ externalModuleIndicator: Node;
/* @internal */ isDefaultLib: boolean;
/* @internal */ identifiers: Map<string>;
/* @internal */ nodeCount: number;
/* @internal */ identifierCount: number;
@@ -1823,6 +1824,7 @@ module ts {
experimentalDecorators?: boolean;
emitDecoratorMetadata?: boolean;
/* @internal */ stripInternal?: boolean;
/* @internal */ skipDefaultLibCheck?: boolean;
[option: string]: string | number | boolean;
}