Skip to content

Type Alias: DebugEvent

ts
type DebugEvent = 
  | RouteEvent
  | ValidateEvent
  | MiddlewareEvent
  | ExecuteEvent
  | ErrorEvent
  | GovernanceEvent;

Defined in: packages/core/src/observability/DebugObserver.ts:175

Union of all debug event types.

Use a switch on event.type for exhaustive handling:

typescript
function handle(event: DebugEvent) {
    switch (event.type) {
        case 'route':    // RouteEvent
        case 'validate': // ValidateEvent
        case 'middleware': // MiddlewareEvent
        case 'execute':  // ExecuteEvent
        case 'error':    // ErrorEvent
    }
}