Interface SupplyOut<TResult>

Sending side of supply.

It informs on supply cut off.

Type Parameters

  • in out TResult = void

    Supply result type.

Hierarchy

Accessors

Methods

  • Creates derived supply depending on this one.

    Parameters

    • Optional derived: undefined

    Returns Supply<TResult>

    New derived supply instance.

  • Makes supply receiver depend on this supply.

    In contrast to alsoOff method, this one returns derived supply receiver.

    Type Parameters

    • TReceiver extends SupplyReceiver<TResult, TReceiver>

      Type of supply receiver.

    Parameters

    • derived: TReceiver

      Derived supply receiver to make dependent on this supply.

    Returns TReceiver

    Derived supply receiver.

  • Creates derived supply depending on this supply.

    If derived supply receiver specified, makes it depend on this supply.

    In contrast to alsoOff method, this one returns derived supply receiver.

    Type Parameters

    • TReceiver extends SupplyReceiver<TResult, TReceiver>

      Type of supply receiver.

    Parameters

    • derived: undefined | TReceiver

      Optional derived supply receiver to make dependent on this supply.

    Returns Supply<TResult> | TReceiver

    Derived supply receiver.

  • Builds a promise that will be resolved once this supply is done. This callback will be called immediately if supply is cut off already.

    Returns Promise<TResult>

    A promise that will be successfully resolved once this supply completes * successfully, or rejected with failure reason.

  • Registers a supply receiver function that will be called as soon as this supply cut off.

    Calling this method is the same as calling this.alsoOff(SupplyReceiver(receiver))

    Parameters

    • receiver: SupplyReceiverFn<TResult>

      Supply receiver function accepting cut off indicator as its only parameter.

    Returns SupplyOut<TResult>

    this instance.

Generated using TypeDoc