UNPKG

@thi.ng/rstream

Version:

Reactive streams & subscription primitives for constructing dataflow graphs / pipelines

17 lines 651 B
import { type ISubscription, type WithErrorHandlerOpts } from "./api.js"; /** * Creates a new {@link stream} from given async iterable `src` and `opts`. * * @param src * @param opts */ export declare const fromAsync: <T>(src: AsyncIterable<T>, opts?: Partial<WithErrorHandlerOpts>) => import("./stream.js").Stream<T>; /** * Reverse operation of {@link fromAsync}. Returns an async iterator which * subscribes to given `src` sub and yields values as long as the `src` is * intact. * * @param src */ export declare function asAsync<T>(src: ISubscription<any, T>): AsyncGenerator<Awaited<T>, void, unknown>; //# sourceMappingURL=async.d.ts.map