Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deco/deps.ts>supabase.LockFunc

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
type alias supabase.LockFunc
import { type supabase } from "https://deno.land/x/deco@1.35.3/deps.ts";
const { LockFunc } = supabase;

Provide your own global lock implementation instead of the default implementation. The function should acquire a lock for the duration of the fn async function, such that no other client instances will be able to hold it at the same time.

definition: <R>(
name: string,
acquireTimeout: number,
fn: () => Promise<R>,
) => Promise<R>