Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/live/deps.ts>supabase.RealtimeChannel#unsubscribe

deco is the edge-native site editor and app framework for building dynamic, high-performance sites with a built-in visual admin UI.
Go to Latest
method supabase.RealtimeChannel.prototype.unsubscribe
Re-export
import { supabase } from "https://deno.land/x/live@1.36.6/deps.ts";
const { RealtimeChannel } = supabase;

Leaves the channel.

Unsubscribes from server events, and instructs channel to terminate on server. Triggers onClose() hooks.

To receive leave acknowledgements, use the a receive hook to bind to the server ack, ie: channel.unsubscribe().receive("ok", () => alert("left!") )

Parameters

optional
timeout: number

Returns

Promise<"ok" | "timed out" | "error">