strongbus - v3.1.0
    Preparing search index...

    Interface MonitoringSurface<TEventMap>

    Observe Bus lifecycle and active/idle state.

    Event-map typing is bivariant (no in out) so a surface over a wider map is assignable to a narrower view — the same Wide→Narrow shape as Bus.

    interface MonitoringSurface<TEventMap extends EventMap = EventMap> {
        hook: <
            L extends
                | "error"
                | "active"
                | "idle"
                | "willActivate"
                | "willIdle"
                | "willAddListener"
                | "didAddListener"
                | "willRemoveListener"
                | "didRemoveListener"
                | "willDestroy",
        >(
            event: L,
            handler: (payload: Lifecycle.EventMap<TEventMap>[L]) => void,
        ) => Subscription;
        monitor(handler: (activeState: boolean) => void): Subscription;
        active: boolean;
    }

    Type Parameters

    Hierarchy (View Summary)

    • MonitoringSurface

    Implemented by

    Index
    hook: <
        L extends
            | "error"
            | "active"
            | "idle"
            | "willActivate"
            | "willIdle"
            | "willAddListener"
            | "didAddListener"
            | "willRemoveListener"
            | "didRemoveListener"
            | "willDestroy",
    >(
        event: L,
        handler: (payload: Lifecycle.EventMap<TEventMap>[L]) => void,
    ) => Subscription
    active: boolean