Revert "perf(compiler): skip type check and emit in bazel in some cases. (#19646)"

This reverts commit a22121d65d.
This commit is contained in:
Chuck Jazdzewski
2017-10-12 10:26:53 -07:00
parent 055b802713
commit 94a925a1b0
21 changed files with 297 additions and 596 deletions

View File

@ -39,7 +39,7 @@ export function main(
return reportErrorsAndExit(options, compileDiags, consoleError);
}
function createEmitCallback(options: api.CompilerOptions): api.EmitCallback|undefined {
function createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback|undefined {
const transformDecorators = options.annotationsAs !== 'decorators';
const transformTypesToClosure = options.annotateForClosureCompiler;
if (!transformDecorators && !transformTypesToClosure) {
@ -58,30 +58,20 @@ function createEmitCallback(options: api.CompilerOptions): api.EmitCallback|unde
return ({
program,
targetSourceFiles,
targetSourceFile,
writeFile,
cancellationToken,
emitOnlyDtsFiles,
customTransformers = {},
host,
options
}) => {
if (targetSourceFiles) {
return tsickle.mergeEmitResults(targetSourceFiles.map(
targetSourceFile => tsickle.emitWithTsickle(
program, tsickleHost, host, options, targetSourceFile, writeFile, cancellationToken,
emitOnlyDtsFiles, {
beforeTs: customTransformers.before,
afterTs: customTransformers.after,
})));
}
return tsickle.emitWithTsickle(
program, tsickleHost, host, options, /*targetSourceFile*/ undefined, writeFile,
cancellationToken, emitOnlyDtsFiles, {
beforeTs: customTransformers.before,
afterTs: customTransformers.after,
});
};
}) =>
tsickle.emitWithTsickle(
program, tsickleHost, host, options, targetSourceFile, writeFile,
cancellationToken, emitOnlyDtsFiles, {
beforeTs: customTransformers.before,
afterTs: customTransformers.after,
});
}
export interface NgcParsedConfiguration extends ParsedConfiguration { watch?: boolean; }