cytoplasmic
    Preparing search index...

    Class IntervalEmitter

    An emitter that repeatedly emits events with a fixed time delay between each event

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get observed(): boolean

      Returns boolean

      True if this emitter has any observers, false otherwise.

    Methods

    • Filter events emitted by this emitter.

      Parameters

      • f: (event: void) => boolean

        The predicate to apply to each event.

      Returns Emitter<void>

      An emitter than only emits events emitted by this emitter for which f returns true.

    • Creates an emitter that counts events emitted by this emitter.

      Returns Emitter<number>

      An emitter that emits the index, starting at zero, of every event emitted by this emitter.

    • Apply a function to all events and their index (starting at zero) emitted by this emitter.

      Type Parameters

      • TOut

      Parameters

      • f: (event: void, index: number) => TOut

      Returns Emitter<TOut>

      An emitter that applies the function f to all events emitted by this emitter.

    • Apply a function to all events emitted by this emitter.

      Type Parameters

      • TOut

      Parameters

      • f: (event: void) => TOut

        The function to apply to events.

      Returns Emitter<TOut>

      An emitter that applies the function f to all events emitted by this emitter.

    • Create a promise that resolves the next time an event is emitted by this emitter.

      Returns Promise<void>

      A promise that resolves to the next event emitted by this emitter.

    • Start the interval if not already started. If there aren't currently any observers the interval won't start until observed.

      Returns void