fix(core): update
This commit is contained in:
parent
7168bd7ffd
commit
5d8f569339
@ -1,10 +1,12 @@
|
|||||||
import * as plugins from './smartrx.plugins';
|
import * as plugins from './smartrx.plugins';
|
||||||
|
|
||||||
|
import * as rxjs from './smartrx.plugins.rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ObservableIntake
|
* ObservableIntake
|
||||||
*/
|
*/
|
||||||
export class ObservableIntake<T> {
|
export class ObservableIntake<T> {
|
||||||
public observable: plugins.rxjs.Observable<T>;
|
public observable: rxjs.Observable<T>;
|
||||||
public completed: Promise<void>;
|
public completed: Promise<void>;
|
||||||
private completedDeffered: plugins.smartpromise.Deferred<void>;
|
private completedDeffered: plugins.smartpromise.Deferred<void>;
|
||||||
private observableFunctions: any = {
|
private observableFunctions: any = {
|
||||||
@ -20,7 +22,7 @@ export class ObservableIntake<T> {
|
|||||||
private payloadBuffer: any[] = [];
|
private payloadBuffer: any[] = [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.observable = plugins.rxjs.Observable.create((observerArg: plugins.rxjs.Observer<any>) => {
|
this.observable = rxjs.Observable.create((observerArg: rxjs.Observer<any>) => {
|
||||||
this.observableFunctions.next = (...args: any) => {
|
this.observableFunctions.next = (...args: any) => {
|
||||||
return observerArg.next(args);
|
return observerArg.next(args);
|
||||||
};
|
};
|
||||||
@ -33,7 +35,7 @@ export class ObservableIntake<T> {
|
|||||||
this.completed = this.completedDeffered.promise;
|
this.completed = this.completedDeffered.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setObservable(observableFunc: plugins.rxjs.Observable<any>) {
|
public setObservable(observableFunc: rxjs.Observable<any>) {
|
||||||
this.observable = observableFunc;
|
this.observable = observableFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user