Skip to content

Commit 851f739

Browse files
committed
Dont ignore libs since that could result in unexpected error
1 parent 7817465 commit 851f739

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ namespace ts {
726726
// - The '--noLib' flag is used.
727727
// - A 'no-default-lib' reference comment is encountered in
728728
// processing the root files.
729-
if (rootNames.length && !skipDefaultLib) {
729+
if (!skipDefaultLib) {
730730
// If '--lib' is not specified, include default library file according to '--target'
731731
// otherwise, using options specified in '--lib' instead of '--target' default library file
732732
const defaultLibraryFileName = getDefaultLibraryFileName();

src/testRunner/unittests/tsserverProjectSystem.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10521,7 +10521,12 @@ declare class TestLib {
1052110521
assert.deepEqual(semanticDiagnostics, []);
1052210522
});
1052310523
const containerProject = service.configuredProjects.get(containerConfig.path)!;
10524-
checkProjectActualFiles(containerProject, [containerConfig.path]);
10524+
checkProjectActualFiles(containerProject, [containerConfig.path, libFile.path]);
10525+
const optionsDiagnostics = session.executeCommandSeq<protocol.CompilerOptionsDiagnosticsRequest>({
10526+
command: protocol.CommandTypes.CompilerOptionsDiagnosticsFull,
10527+
arguments: { projectFileName: containerProject.projectName }
10528+
}).response;
10529+
assert.deepEqual(optionsDiagnostics, []);
1052510530
});
1052610531
});
1052710532

0 commit comments

Comments
 (0)