Skip to content

[I] EmitContext

Per-emitter compilation context supplied to $onEmit, including options and performance reporting.

Type ParameterDefault type
TOptions extends objectRecord<string, never>
PropertyModifierTypeDescription
emitterOutputDirpublicstringResolved output directory for this emitter, including its configured override if any. Emit all output beneath this directory rather than the program’s shared output directory.
optionspublicTOptionsCustom options configured for this emitter, validated when the library declares an options schema. The compiler’s emitter-output-dir option is removed and exposed as emitterOutputDir instead.
perfreadonlyPerfReporterPerformance measurement utilities. Use this to report performance of areas of your emitter. The information will be displayed when the compiler is run with --stats flag.
programpublicProgramChecked program being emitted. Use its reporting APIs to report emitter diagnostics.