Skip to content

Commit

Permalink
refactor(rstream): update ISubscribable (add IDeref parent)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Apr 26, 2018
1 parent 679c4e0 commit 76f00c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/rstream/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IID } from "@thi.ng/api/api";
import { IID, IDeref } from "@thi.ng/api/api";
import { Transducer } from "@thi.ng/transducers/api";

import { Subscription } from "./subscription";
Expand All @@ -21,7 +21,10 @@ export interface ISubscriber<T> {
[id: string]: any;
}

export interface ISubscribable<T> extends IID<string> {
export interface ISubscribable<T> extends
IDeref<T>,
IID<string> {

subscribe<C>(xform: Transducer<T, C>, id?: string): Subscription<T, C>;
subscribe<C>(sub: Partial<ISubscriber<T>>, xform: Transducer<T, C>, id?: string): Subscription<T, C>;
subscribe(sub: Partial<ISubscriber<T>>, id?: string): Subscription<T, T>;
Expand Down

0 comments on commit 76f00c3

Please sign in to comment.