Merge pull request #13451 from Microsoft/gulp_tsconfig_inheritance

Fix tsconfig inheritance in gulpfile -- must do it manually
This commit is contained in:
Andy 2017-01-12 13:27:05 -08:00 committed by GitHub
commit 63333b47de
3 changed files with 8 additions and 10 deletions

View File

@ -242,13 +242,14 @@ function needsUpdate(source: string | string[], dest: string | string[]): boolea
return true;
}
// Doing tsconfig inheritance manually. https://github.com/ivogabe/gulp-typescript/issues/459
const tsconfigBase = JSON.parse(fs.readFileSync("src/tsconfig-base.json", "utf-8")).compilerOptions;
function getCompilerSettings(base: tsc.Settings, useBuiltCompiler?: boolean): tsc.Settings {
const copy: tsc.Settings = {};
copy.noEmitOnError = true;
copy.noImplicitAny = true;
copy.noImplicitThis = true;
copy.pretty = true;
copy.types = [];
for (const key in tsconfigBase) {
copy[key] = tsconfigBase[key];
}
for (const key in base) {
copy[key] = base[key];
}
@ -256,9 +257,6 @@ function getCompilerSettings(base: tsc.Settings, useBuiltCompiler?: boolean): ts
if (copy.removeComments === undefined) copy.removeComments = true;
copy.newLine = "lf";
}
else {
copy.preserveConstEnums = true;
}
if (useBuiltCompiler === true) {
copy.typescript = require("./built/local/typescript.js");
}

View File

@ -18,7 +18,7 @@ namespace ts {
getFileSize?(path: string): number;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
/**
* @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that
* @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that
* use native OS file watching
*/
watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number): FileWatcher;

View File

@ -1,6 +1,6 @@
{
"compilerOptions": {
"lib": ["es5"],
"noEmitOnError": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,