Subscription

import type { Subscription } from "https://esm.sh/@supabase/[email protected]/dist/index.d.mts";
interface Subscription {
callback: (event: AuthChangeEvent, session: Session | null) => void;
id: string | symbol;
unsubscribe: () => void;
}

§Properties

§
callback: (event: AuthChangeEvent, session: Session | null) => void
[src]

The function to call every time there is an event. eg: (eventName) => {}

§
id: string | symbol
[src]

A unique identifier for this subscription, set by the client. This is an internal identifier used for managing callbacks and should not be relied upon by application code. Use the unsubscribe() method to remove listeners.

§
unsubscribe: () => void
[src]

Call this to remove the listener.