@rimbu/stream
Version:
Efficient structure representing a sequence of elements, with powerful operations for TypeScript
24 lines (23 loc) • 641 B
text/typescript
import type { Stream } from '@rimbu/stream';
/**
* An object that can create a Stream of elements of type `T`.
* @typeparam T - the element type
*/
export interface Streamable<T> {
/**
* Returns a `Stream` containing the elements in this collection.
*/
stream(): Stream<T>;
}
export declare namespace Streamable {
/**
* An object that can create a non-empty Stream of elements of type `T`.
* @typeparam T - the element type
*/
interface NonEmpty<T> {
/**
* Returns a non-empty `Stream` of the elements in this collection.
*/
stream(): Stream.NonEmpty<T>;
}
}