# Changed: `beforeEmit` -> `tranformProgram`
The mechanism of action for `Program` transformation has been moved from inside
`program.emit()` to `ts.createProgram()`.
In the new methodology, the `Program` instance is transformed at the point of creation _before_ it is returned from the
factory function, which is a far better approach.
While the option name has been updated for clarity, the old `beforeEmit` will still work, so this is not a breaking change.
# Added: Inspect or alter diagnostics
Using the `program` type entry point, the `extras` field has been revised.
| property | status | description |
| -------- | ------ | ----------- |
| diagnostics | _new_ | Reference to `Diagnostic[]` created during `ts.emitFilesAndReportErrors()` (works with tsc also)
| addDiagnostic | _changed_ | Directly add `Diagnostic` to `diagnostics` array |
| removeDiagnostic | _new_ | Directly remove `Diagnostic` from `diagnostics` array (uses splice, for safe removal)
See `README.md` for full detail.