2017-11-01 13:59:28 +00:00
|
|
|
import { Observable, Subscription } from 'rxjs';
|
|
|
|
/**
|
|
|
|
* ObservableIntake
|
|
|
|
*/
|
|
|
|
export declare class ObservableIntake<T> {
|
|
|
|
observable: Observable<T>;
|
|
|
|
completed: Promise<void>;
|
|
|
|
private completedDeffered;
|
|
|
|
private observableFunctions;
|
2017-11-01 16:01:30 +00:00
|
|
|
private generator;
|
|
|
|
private buffered;
|
|
|
|
private payloadBuffer;
|
2017-11-01 13:59:28 +00:00
|
|
|
constructor();
|
|
|
|
setObservable(observableFunc: any): void;
|
|
|
|
push(payloadArg: T): void;
|
2017-11-01 16:01:30 +00:00
|
|
|
/**
|
|
|
|
* pushes many payloads as array
|
|
|
|
* @param payloadArgArray
|
|
|
|
*/
|
|
|
|
pushMany(payloadArgArray: T[]): void;
|
|
|
|
/**
|
|
|
|
* sets a generator to query the next pushed value
|
|
|
|
* @param generatorArg
|
|
|
|
*/
|
|
|
|
setGenerator(generatorArg: any): void;
|
|
|
|
makeBuffered(): void;
|
2017-11-01 13:59:28 +00:00
|
|
|
subscribe(...args: any[]): Subscription;
|
2017-11-01 16:01:30 +00:00
|
|
|
/**
|
|
|
|
* request the next values in the quantity specified
|
|
|
|
* @param howManyArg if a generator is set, of a buffer exists, this allows retrieving values
|
|
|
|
*/
|
|
|
|
request(howManyArg: number): void;
|
|
|
|
/**
|
|
|
|
* signals the completion of this observable
|
|
|
|
*/
|
2017-11-01 13:59:28 +00:00
|
|
|
signalComplete(): void;
|
2017-11-01 16:01:30 +00:00
|
|
|
private internalPush(payloadArg);
|
2017-11-01 13:59:28 +00:00
|
|
|
}
|