Dont ignore libs since that could result in unexpected error

This commit is contained in:
Sheetal Nandi 2018-10-31 15:41:07 -07:00
parent 78174657e7
commit 851f739c82
2 changed files with 7 additions and 2 deletions

View file

@ -726,7 +726,7 @@ namespace ts {
// - The '--noLib' flag is used.
// - A 'no-default-lib' reference comment is encountered in
// processing the root files.
if (rootNames.length && !skipDefaultLib) {
if (!skipDefaultLib) {
// If '--lib' is not specified, include default library file according to '--target'
// otherwise, using options specified in '--lib' instead of '--target' default library file
const defaultLibraryFileName = getDefaultLibraryFileName();

View file

@ -10521,7 +10521,12 @@ declare class TestLib {
assert.deepEqual(semanticDiagnostics, []);
});
const containerProject = service.configuredProjects.get(containerConfig.path)!;
checkProjectActualFiles(containerProject, [containerConfig.path]);
checkProjectActualFiles(containerProject, [containerConfig.path, libFile.path]);
const optionsDiagnostics = session.executeCommandSeq<protocol.CompilerOptionsDiagnosticsRequest>({
command: protocol.CommandTypes.CompilerOptionsDiagnosticsFull,
arguments: { projectFileName: containerProject.projectName }
}).response;
assert.deepEqual(optionsDiagnostics, []);
});
});