API reference / @chanx-js/server / core / topic
Function: topic()
ts
function topic<Pattern, User, State>(pattern, options?): TopicBuilder<Pattern, User, State>;Defined in: packages/server/src/topic.ts:181
A subscribable stream on a connection, addressed as its pattern filled in.
Type Parameters
| Type Parameter | Default type |
|---|---|
Pattern extends string | - |
User | unknown |
State | Record<never, never> |
Parameters
| Parameter | Type |
|---|---|
pattern | Pattern |
options | TopicOptions<Pattern, User, State> |
Returns
TopicBuilder<Pattern, User, State>