Called when the process is going to exit, this hook can only execute synchronous code. - **Type:** ```ts function OnExit(callback: (context: { exitCode: number }) => void): void; ```