unsubscribe

View as Markdown

unsubscribe

  • unsubscribe(channels): Promise<void>

List of channels from which you want to unsubscribe.

Parameters

channels
string | string[]Required

The channels to unsubscribe from, either in the form of a string (for one channel) or an array of strings.

Returns

Promise<void>

Example

1await pubSub.unsubscribe("my-channel");
2await pubSub.unsubscribe(["chan-2", "chan-3"]);