Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/blocks/engine/decofile/realtime.ts>RealtimeDecofileProvider

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Go to Latest
interface RealtimeDecofileProvider
import { type RealtimeDecofileProvider } from "https://deno.land/x/blocks@1.102.4/engine/decofile/realtime.ts";

Properties

optional
unsubscribe: () => void

Methods

get(): PromiseLike<{ data: VersionedDecofile | null; error: any; }>
subscribe(onChange: (arg: VersionedDecofile) => void, cb: (status: string, err?: Error) => void): void

When called, receives the onChange function that will be called when the decofile has changed, and the cb function that will be called when the subscription state change. The cb function can be used to determine if it should fallsback to background updates or not.