strongbus - v3.0.0
    Preparing search index...

    Interface IntrospectionSurface<TEventMap>

    Inspect listener registrations on a Bus or SubscriptionSurface.

    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 IntrospectionSurface<TEventMap extends EventMap = EventMap> {
        hasListeners(options?: IntrospectionOptions): boolean;
        getListenerCount(options?: IntrospectionOptions): number;
        getListeners(options?: IntrospectionOptions): ReadonlySet<GenericHandler>;
        getEventCount(options?: IntrospectionOptions): number;
        hasListenersFor: (
            event: EventListenerMapKey<TEventMap>,
            options?: IntrospectionOptions,
        ) => boolean;
        getListenerCountFor: (
            event: EventListenerMapKey<TEventMap>,
            options?: IntrospectionOptions,
        ) => number;
        getListenersFor: (
            event: EventListenerMapKey<TEventMap>,
            options?: IntrospectionOptions,
        ) => ListenerSet;
        forEach: <TMap extends { [K in string | number | symbol]: TEventMap[K] }>(
            fn: (event: EventListenerMapKey<TMap>, handlers: ListenerSet) => void,
            options?: IntrospectionOptions,
        ) => void;
    }

    Type Parameters

    Hierarchy (View Summary)

    • IntrospectionSurface

    Implemented by

    Index

    Properties

    hasListenersFor: (
        event: EventListenerMapKey<TEventMap>,
        options?: IntrospectionOptions,
    ) => boolean
    getListenerCountFor: (
        event: EventListenerMapKey<TEventMap>,
        options?: IntrospectionOptions,
    ) => number
    getListenersFor: (
        event: EventListenerMapKey<TEventMap>,
        options?: IntrospectionOptions,
    ) => ListenerSet
    forEach: <TMap extends { [K in string | number | symbol]: TEventMap[K] }>(
        fn: (event: EventListenerMapKey<TMap>, handlers: ListenerSet) => void,
        options?: IntrospectionOptions,
    ) => void

    Methods