import type { Document, WithId } from "./types.ts"; export const BroadcastChannel = globalThis.BroadcastChannel ?? class BroadcastChannelMock { onmessage?: any; postMessage() {} close() {} }; export type StorageBroadcast = | { name: string; type: "insertOne" | "updateOne"; data: WithId; } | { name: string; type: "insertMany" | "updateMany" | "remove"; data: WithId[]; } | { name: string; type: "flush"; };