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