Fixing Observables

This commit is contained in:
Martin Karkowski 2020-09-08 16:58:50 +02:00
parent 77acf9d908
commit f0e0dcc6ed
3 changed files with 7 additions and 3 deletions

View File

@ -376,4 +376,8 @@ export class nopeObservable<T, S = T, G = T> {
}
})
}
public get hasSubscriptions() {
return this.observable.observers.length > 0;
}
}

View File

@ -3,7 +3,7 @@ import { nopeDispatcher } from "../dispatcher/nopeDispatcher";
export type pipe<T, K> = (scope: { [index: string]: any }, observable: Observable<T>) => Observable<K>
export class nopeRemoteObservable<G, S = G> {
export class nopeRemoteObservable<T, S = T, G = T> {
protected _pathes: {
get: string,
set: string,

View File

@ -23,6 +23,6 @@ const subEnhanced = observable.enhancedSubscription((v) => console.log('enhanced
let i = 1;
while (i < 20) {
observable.value = i++;
console.log('current', observable.value);
observable.setContent(i++);
console.log('current', observable.getContent());
}