Merge pull request #9176 from Microsoft/Fix9173-2

Clear out unused compiler options when transpiling
This commit is contained in:
Mohamed Hegazy
2016-06-20 09:54:58 -07:00
committed by GitHub
50 changed files with 370 additions and 34 deletions

View File

@@ -2002,9 +2002,17 @@ namespace ts {
// so pass --noLib to avoid reporting a file not found error.
options.noLib = true;
// Clear out the lib and types option as well
// Clear out other settings that would not be used in transpiling this module
options.lib = undefined;
options.types = undefined;
options.noEmit = undefined;
options.noEmitOnError = undefined;
options.paths = undefined;
options.rootDirs = undefined;
options.declaration = undefined;
options.declarationDir = undefined;
options.out = undefined;
options.outFile = undefined;
// We are not doing a full typecheck, we are not resolving the whole context,
// so pass --noResolve to avoid reporting missing file errors.