@thi.ng/rstream-csp
Version:
@thi.ng/csp bridge module for @thi.ng/rstream
21 lines • 664 B
TypeScript
import type { Channel } from "@thi.ng/csp";
import type { CommonOpts } from "@thi.ng/rstream";
import { Stream } from "@thi.ng/rstream/stream";
export interface FromChannelOpts extends CommonOpts {
/**
* If true, the parent CSP channel will be closed when this stream
* closes.
*
* @defaultValue true
*/
closeChannel: boolean;
}
/**
* Returns a stream of values received from given
* [`Channel`](https://docs.thi.ng/umbrella/csp/classes/Channel.html).
*
* @param src -
* @param opts -
*/
export declare const fromChannel: <T>(src: Channel<T>, opts?: Partial<FromChannelOpts>) => Stream<T>;
//# sourceMappingURL=index.d.ts.map