refactor(compiler): introduce EmitFlags.CodeGen
(#19275)
This flag controls whether the compiler emits generated files. It is initially calculated via `skipTemplateCodegen` from the compiler options. Also: - adds a small performance improvement to not generate the files at all if we don’t emit generated code. - removes `EmitFlags.Summaries` as we never used it. PR Close #19275
This commit is contained in:
@ -101,6 +101,9 @@ export function readConfiguration(
|
||||
if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
|
||||
emitFlags |= api.EmitFlags.Metadata;
|
||||
}
|
||||
if (options.skipTemplateCodegen) {
|
||||
emitFlags = emitFlags & ~api.EmitFlags.Codegen;
|
||||
}
|
||||
return {project: projectFile, rootNames, options, errors: parsed.errors, emitFlags};
|
||||
} catch (e) {
|
||||
const errors: Diagnostics = [{
|
||||
|
Reference in New Issue
Block a user