Revert "Revert "Revert "perf(compiler): skip type check and emit in bazel in some cases. (#19646)"""
This reverts commit 6b7cead0c5
.
This commit is contained in:
@ -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; }
|
||||
|
Reference in New Issue
Block a user