2023-06-24 04:13:03 +00:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
2023-07-02 22:18:30 +00:00
|
|
|
[Home](./index.md) > [firefish-js](./firefish-js.md) > [Stream](./firefish-js.stream.md) > [useChannel](./firefish-js.stream.usechannel.md)
|
2023-06-24 04:13:03 +00:00
|
|
|
|
|
|
|
## Stream.useChannel() method
|
|
|
|
|
|
|
|
**Signature:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
useChannel<C extends keyof Channels>(
|
|
|
|
channel: C,
|
|
|
|
params?: Channels[C]["params"],
|
|
|
|
name?: string,
|
|
|
|
): Connection<Channels[C]>;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
|
|
|
| channel | C | |
|
2023-07-02 22:18:30 +00:00
|
|
|
| params | [Channels](./firefish-js.channels.md)<!-- -->\[C\]\["params"\] | _(Optional)_ |
|
2023-06-24 04:13:03 +00:00
|
|
|
| name | string | _(Optional)_ |
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
2023-07-02 22:18:30 +00:00
|
|
|
[Connection](./firefish-js.channelconnection.md)<!-- --><[Channels](./firefish-js.channels.md)<!-- -->\[C\]>
|
2023-06-24 04:13:03 +00:00
|
|
|
|