perf(compiler): skip type check and emit in bazel in some cases. (#19646)
If no user files changed: - only type check the changed generated files Never emit non changed generated files - we still calculate them, but don’t send them through TypeScript to emit them but cache the written files instead. PR Close #19646
This commit is contained in:

committed by
Chuck Jazdzewski

parent
3acf9c7063
commit
a22121d65d
@ -11,6 +11,7 @@ import * as ts from 'typescript';
|
||||
import {DEFAULT_ERROR_CODE, Diagnostic, SOURCE} from './api';
|
||||
|
||||
export const GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
|
||||
export const EXT = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
|
||||
|
||||
export const enum StructureIsReused {Not = 0, SafeModules = 1, Completely = 2}
|
||||
|
||||
@ -29,3 +30,7 @@ export function createMessageDiagnostic(messageText: string): ts.Diagnostic&Diag
|
||||
source: SOURCE,
|
||||
};
|
||||
}
|
||||
|
||||
export function isGeneratedFile(fileName: string): boolean {
|
||||
return GENERATED_FILES.test(fileName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user