From b4bb4f092b7321fe2f58324ceb039021e3a4dbf6 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Mon, 9 Apr 2018 11:26:37 -0700 Subject: [PATCH] fourslash: Don't parse lib if 'nolib' is set --- src/harness/fourslash.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 8c71a385d581b..26cdd9359c66d 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -328,8 +328,10 @@ namespace FourSlash { this.languageServiceAdapterHost.addScript(fileName, file, /*isRootFile*/ true); } }); - this.languageServiceAdapterHost.addScript(Harness.Compiler.defaultLibFileName, - Harness.Compiler.getDefaultLibrarySourceFile().text, /*isRootFile*/ false); + if (!compilationOptions.noLib) { + this.languageServiceAdapterHost.addScript(Harness.Compiler.defaultLibFileName, + Harness.Compiler.getDefaultLibrarySourceFile().text, /*isRootFile*/ false); + } } for (const file of testData.files) {