@metreeca/flow - v0.9.21
    Preparing search index...

    Interface Sink<V, R>

    Terminal operation applied to a feed.

    A sink consumes the items of a Feed, driving the pipe that feeds it and resolving to the final result; one able to decide its outcome early may stop consuming before the source runs dry.

    Type Parameters

    • V

      The type of input values, never undefined, as feeds never carry it

    • R = V

      The type of result, defaulting to V for sinks resolving to a feed item

    • Consumes the feed.

      Parameters

      • values: AsyncIterable<V>

        The source values to consume

      Returns Promise<R>

      A promise resolving to the final result