Result of a TypeScript compilation process
CompilerResult
const compiler = new Compiler(['src/file.ts'], options);const result = compiler.emit();if (result.diagnostics.length > 0) { console.log('Compilation had diagnostics:', result.diagnostics);} Copy
const compiler = new Compiler(['src/file.ts'], options);const result = compiler.emit();if (result.diagnostics.length > 0) { console.log('Compilation had diagnostics:', result.diagnostics);}
Array of diagnostics from the compilation process
The result of the emit process, including any diagnostics
Array of diagnostics collected before emit
The TypeScript Program instance used for compilation
Result of a TypeScript compilation process
CompilerResult
Example