property EventsPluginOptions.handlers
Since 0.1.0

Handlers subscribed to the bus at register() time.

The declarative alternative to resolving CAPABILITIES.EVENTS and calling subscribeHandler imperatively — which application code has no phase to do, since IApplication exposes no lifecycle hooks and the bus does not exist until this plugin has registered. Both routes go through the same subscribeHandler, so neither can drift from the other.

The Unsubscribe each subscription returns is deliberately dropped: the bus is cleared on shutdown (onClose), and there is no caller that could hold the handle.

Default: [] (no subscriptions).

Type

Usage

import { type EventsPluginOptions } from "events-plugin/src/index.ts";