UNPKG

@tempest/core

Version:

The core of the Tempest Stream Library

10 lines (9 loc) 506 B
import { Subscribable, Subscriber, Source, Subscription } from './interfaces'; import { Multicast } from './multicast/Multicast'; export declare class Stream<T> implements Subscribable<T> { source: Multicast<T>; constructor(source: Source<T>); static from<T>(input: Subscribable<T> | ArrayLike<T>): Stream<T>; static of<T>(...items: T[]): Stream<T>; subscribe(nextOrSubscriber?: Subscriber<T> | ((x: T) => any), error?: (e: Error) => any, complete?: (x?: T) => any): Subscription<T>; }