mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-15 15:18:22 +09:00
Update streaming.ts
This commit is contained in:
parent
b1934d95f2
commit
b2549d98f9
@ -133,11 +133,11 @@ export default class Stream extends EventEmitter<StreamEvents> {
|
||||
}
|
||||
|
||||
@autobind
|
||||
public useChannel<C extends keyof ChannelDef>(channel: C, params?: any): Connection<ChannelDef[C]['events']> {
|
||||
public useChannel<C extends keyof ChannelDef>(channel: C, params?: any, name?: string): Connection<ChannelDef[C]['events']> {
|
||||
if (params) {
|
||||
return this.connectToChannel(channel, params);
|
||||
} else {
|
||||
return this.useSharedConnection(channel);
|
||||
return this.useSharedConnection(channel, name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user