Cell API
    Preparing search index...

    Class EventBus

    Dispatches toolchain events by the fixed rule of each event (docs/design/modules.md §3.2). Handlers run one after another in registration order; a dispatch works on a snapshot of the handlers.

    Index
    • Parameters

      • OptionalonNotifyError: (error: CellError) => void

        where failures of notification handlers go instead of failing the dispatch: cell dev keeps running (docs/design/modules.md §3.4); builds leave it unset and fail.

      Returns EventBus

    handlers: Map<CellEventName, Subscription[]> = ...
    onNotifyError?: (error: CellError) => void

    where failures of notification handlers go instead of failing the dispatch: cell dev keeps running (docs/design/modules.md §3.4); builds leave it unset and fail.

    • Notification and mutation events: every handler runs; the first failure stops the dispatch.

      Type Parameters

      • E extends object

      Parameters

      • event: CellEventName
      • payload: E

      Returns Promise<E>

    • Gate events: the first handler returning { cancel: true } or throwing (fail closed) stops the operation.

      Parameters

      • event: CellEventName
      • payload: object

      Returns Promise<any>

    • Cell errors keep their code; anything else becomes CELL_MODULE_ERROR naming the source.

      Parameters

      • event: CellEventName
      • source: string
      • error: unknown

      Returns CellError