2023-06-23 22:13:03 -06:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
2023-07-02 16:18:30 -06:00
|
|
|
[Home](./index.md) > [firefish-js](./firefish-js.md) > [Stream](./firefish-js.stream.md) > [useChannel](./firefish-js.stream.usechannel.md)
|
2023-06-23 22:13:03 -06: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 16:18:30 -06:00
|
|
|
| params | [Channels](./firefish-js.channels.md)<!-- -->\[C\]\["params"\] | _(Optional)_ |
|
2023-06-23 22:13:03 -06:00
|
|
|
| name | string | _(Optional)_ |
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
2023-07-02 16:18:30 -06:00
|
|
|
[Connection](./firefish-js.channelconnection.md)<!-- --><[Channels](./firefish-js.channels.md)<!-- -->\[C\]>
|
2023-06-23 22:13:03 -06:00
|
|
|
|