ixfx
    Preparing search index...

    Type Alias InitStreamOptions

    type InitStreamOptions = {
        debugLabel: string;
        onDispose: (reason: string) => void;
        onFirstSubscribe: () => void;
        onNoSubscribers: () => void;
    }
    Index

    Properties

    debugLabel: string

    Optional label to associate with this stream. Useful for debugging.

    onDispose: (reason: string) => void

    Called whenever the stream disposes. Useful for cleaning up.

    Type declaration

      • (reason: string): void
      • Parameters

        • reason: string

        Returns void

    onFirstSubscribe: () => void

    Called when there is a subscriber after there were no subscribers. Useful for 'startup' types of things that we want to run only when someone is actually listening.

    During the lifeycle of a stream, this could be called multiple times. Eg if all subscribers are removed next time someone subscribes it will get called again.

    Type declaration

      • (): void
      • Returns void

    onNoSubscribers: () => void

    Called when there are no longer any subscribers. Useful for shutting down activities now that no-one is listening.

    During the lifecycle of a stream, this could be called multiple times.

    Type declaration

      • (): void
      • Returns void