iceshrimp/packages/iceshrimp-js/markdown/iceshrimp-js.stream.usechannel.md

29 lines
814 B
Markdown
Raw Normal View History

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