Skip to content

Commit

Permalink
fix(rstream): minor update PubSub topic fn return type
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 20, 2018
1 parent 23fdd39 commit cbc600e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rstream/src/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface PubSubOpts<A, B> {
*/
export class PubSub<A, B> extends Subscription<A, B> {

topicfn: (x: B) => PropertyKey;
topicfn: (x: B) => any;
topics: EquivMap<any, Subscription<B, B>>;

constructor(opts?: PubSubOpts<A, B>) {
Expand Down Expand Up @@ -82,6 +82,7 @@ export class PubSub<A, B> extends Subscription<A, B> {
}

subscribeTopic<C>(topicID: any, tx: Transducer<B, C>, id?: string): Subscription<B, C>;
// subscribeTopic<S extends Subscription<B, C>, C>(topicID: any, sub: S): S;
subscribeTopic<C>(topicID: any, sub: Subscription<B, C>): Subscription<B, C>;
subscribeTopic(topicID: any, sub: Partial<ISubscriber<B>>, id?: string): Subscription<B, B>;
subscribeTopic(topicID: any, sub: any, id?: string): Subscription<any, any> {
Expand Down Expand Up @@ -109,7 +110,6 @@ export class PubSub<A, B> extends Subscription<A, B> {
return super.unsubscribe();
}
unsupported();
return false;
}

done() {
Expand Down

0 comments on commit cbc600e

Please sign in to comment.