29 lines
758 B
Markdown
29 lines
758 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index) > [valkyrie-js](./valkyrie-js) > [Stream](./valkyrie-js.stream) > [useChannel](./valkyrie-js.stream.usechannel)
|
||
|
|
||
|
## 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 | |
|
||
|
| params | [Channels](./valkyrie-js.channels)<!-- -->\[C\]\["params"\] | _(Optional)_ |
|
||
|
| name | string | _(Optional)_ |
|
||
|
|
||
|
**Returns:**
|
||
|
|
||
|
[Connection](./valkyrie-js.channelconnection)<!-- --><[Channels](./valkyrie-js.channels)<!-- -->\[C\]>
|
||
|
|