Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class ClusterWS {
send(event: string, data: any, type?: string): void;
disconnect(code?: number, msg?: any): void;
getState(): number;
subscribe(channel: string): void;
subscribe(channel: string): Channel;
getChannelByName(channelName: string): Channel;
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class ClusterWS {
return this.websocket.readyState
}

public subscribe(channel: string): void {
public subscribe(channel: string): Channel {
return this.channels[channel] ?
this.channels[channel] :
this.channels[channel] = new Channel(this, channel)
Expand Down