Vinyl
    Preparing search index...

    Interface Signal<T>

    interface Signal<T> {
        empty: boolean;
        listen(handler: EventHandler<T>, options?: SignalOptions): Unsubscribe;
    }

    Type Parameters

    • T

    Implemented by

    Index

    Properties

    Methods

    Properties

    empty: boolean

    Returns true if this signal has no handlers.

    Methods

    • Adds an event handler that will be invoked upon signal dispatch.

      Parameters

      • handler: EventHandler<T>

        The handler to invoke on signal dispatch.

      • Optionaloptions: SignalOptions

        Options for changing listening behavior.

      Returns Unsubscribe

      Unsubscribe - Returns a method where, when invoked, will remove the handler. If the handler has already been removed, Unsubscribe will do nothing.