Combinator unsubscribe (static) (#522)

This commit is contained in:
Jaco Greeff
2018-12-30 16:02:23 +01:00
committed by GitHub
parent 9a681bdd07
commit f923cabf2a
+8
View File
@@ -38,6 +38,14 @@ export default class Combinator {
return allCombinators[id];
}
static unsubscribe (id: number): Promise<any> {
const combinator = Combinator.lookup(id);
return combinator
? combinator.unsubscribe()
: Promise.resolve(false);
}
get id (): number {
return this._id;
}