perf(compiler): speed up watch mode (#19275)
- don’t regenerate code for .d.ts files when an oldProgram is passed to `createProgram` - cache `fileExists` / `getSourceFile` / `readFile` in watch mode - refactor tests to share common code in `test_support` - support `—diagnostic` command line to print total time used per watch mode compilation. PR Close #19275
This commit is contained in:
@ -66,8 +66,9 @@ export interface CompilerHost extends ts.CompilerHost {
|
||||
export enum EmitFlags {
|
||||
DTS = 1 << 0,
|
||||
JS = 1 << 1,
|
||||
Codegen = 1 << 4,
|
||||
|
||||
Default = DTS | JS
|
||||
Default = DTS | JS | Codegen
|
||||
}
|
||||
|
||||
export interface CustomTransformers {
|
||||
@ -106,6 +107,7 @@ export interface Program {
|
||||
customTransformers?: CustomTransformers,
|
||||
emitCallback?: TsEmitCallback
|
||||
}): ts.EmitResult;
|
||||
getLibrarySummaries(): {fileName: string, content: string}[];
|
||||
}
|
||||
|
||||
// Wrapper for createProgram.
|
||||
|
Reference in New Issue
Block a user