@rimbu/stream
Version:
Efficient structure representing a sequence of elements, with powerful operations for TypeScript
24 lines (23 loc) • 697 B
text/typescript
import type { AsyncStream } from '@rimbu/stream/async';
/**
* Represents an object that can produce an asynchronous stream of values.
* @typeparam T - the type of elements in the stream
*/
export interface AsyncStreamable<T> {
/**
* Returns an asynchronous stream of values.
*/
asyncStream(): AsyncStream<T>;
}
export declare namespace AsyncStreamable {
/**
* Represents a non-empty object that can produce an asynchronous stream of values.
* @typeparam T - the type of elements in the stream
*/
interface NonEmpty<T> {
/**
* Returns an asynchronous stream of values.
*/
asyncStream(): AsyncStream.NonEmpty<T>;
}
}