Skip to content
Typecorev0.10.0

EventDispatchResult

An event middleware's after() receives this once the event finishes. outcome reports the middleware chain alone. handlers holds one entry per handler that ran. A stopped chain runs none.

type EventDispatchResult =
    | {
          readonly outcome: "refused" | "failed";
          readonly caught: unknown;
          readonly handlers: readonly [];
      }
    | {
          readonly outcome: "handled";
          readonly handlers: readonly HandlerResult[];
      };