Add AwaitStore

This commit is contained in:
Fabian Stamm
2019-11-25 21:31:22 +01:00
parent edd37246fb
commit 0781323acb
5 changed files with 130 additions and 5 deletions

View File

@ -43,6 +43,8 @@ export default class Observable<T = any> {
let oldcb = this.subscriber.find(e => e === callback);
if (!oldcb)
this.subscriber.push(callback)
return () => this.unsubscribe(callback);
}
unsubscribe(callback: ObserverCallback<T> | ObserverCallbackCollect<T>) {