@jiminp/tooltool
    Preparing search index...

    Interface AsyncSink<Y, R, E>

    Write-side of an async channel that pushes values, completion, or errors.

    Subscriber callbacks run synchronously. If callbacks throw, all pending consumers are notified before the first exception is rethrown to the caller. Faulty subscribers are detached; callback errors do not change the result.

    declare const sink: AsyncSink<number, string>;
    sink.next(1);
    sink.next(2);
    sink.complete("done");
    interface AsyncSink<Y, R = void, E = unknown> {
        complete(...args: OptionalIfVoid<R>): void;
        error(err: E): void;
        next(y: Y): void;
    }

    Type Parameters

    • Y

      Yielded value type.

    • R = void

      Return value type.

    • E = unknown

      Error type (default: unknown).

    Hierarchy (View Summary)

    Index