Skip to content

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 ParameterDefault type
Pattern extends string-
Userunknown
StateRecord<never, never>

Parameters ​

ParameterType
patternPattern
optionsTopicOptions<Pattern, User, State>

Returns ​

TopicBuilder<Pattern, User, State>

MIT licensed