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