Fix #9173: clear out lib and types before creating a program in transpileModule

This commit is contained in:
Mohamed Hegazy
2016-06-14 17:44:57 -07:00
parent 7890fd58b9
commit 784a76530c
2 changed files with 22 additions and 0 deletions

View File

@@ -2001,6 +2001,10 @@ 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
options.lib = undefined;
options.types = undefined;
// We are not doing a full typecheck, we are not resolving the whole context,
// so pass --noResolve to avoid reporting missing file errors.
options.noResolve = true;