@jetjs/streams
class Observable
Observables are always Hot-Observables and are lazy by default
Properties
Property | Type | Description |
---|---|---|
nextObserver | Observer |
Methods
Method | Return | Description |
---|---|---|
of(values) | Observable | |
pipe(operator) | Observable | |
subscribe(observerOrNext, error, complete) | Subscription |
Property Details
-
nextObserver Property
Signature:nextObserver?: Observer<T>;
Method Details
-
of(values) Method
Creates a sync stream with the provided values.
Signature:static of<T>(...values: T[]): Observable<T>;
Returns:Observable
Parameter Type Description values T[]
parameter list with values to create a stream from.
-
pipe(operator) Method
adds a new Operator to the stream. It doesn't starts the lazy stream.
Signature:pipe<O>(operator: Operator<T, O>): Observable<O>;
Returns:Observable
Parameter Type Description operator Operator
the ObservableObserver to add
-
subscribe(observerOrNext, error, complete) Method
subscribe to the observable and start the lazy stream
Signature:subscribe(observerOrNext: Observer<T> | NextFn<T>, error?: ErrorFn, complete?: CompleteFn): Subscription;
Returns:Subscription
Parameter Type Description observerOrNext Observer
| NextFn If an Observer is provided, the following arguments will be ignored
error ErrorFn
(otpional) Error handler
complete CompleteFn
(optional) completion handler