import { Deferred, Effect, Scope, WebChannel } from '@livestore/utils/effect'; import type { MakeDirectChannelArgs } from './direct-channel-internal.ts'; /** * Behaviour: * - Waits until there is an initial edge * - Automatically reconnects on disconnect * * Implementation notes: * - We've split up the functionality into a wrapper channel and an internal channel. * - The wrapper channel is responsible for: * - Forwarding send/listen messages to the internal channel (via a queue) * - Establishing the initial channel and reconnecting on disconnect * - Listening for new edges as a hint to reconnect if not already connected * - The wrapper channel maintains a edge counter which is used as the channel version * * If needed we can also implement further functionality (like heartbeat) in this wrapper channel. */ export declare const makeDirectChannel: ({ schema, newEdgeAvailablePubSub, channelName, checkTransferableEdges, nodeName, incomingPacketsQueue, target, sendPacket, }: MakeDirectChannelArgs) => Effect.Effect<{ webChannel: WebChannel.WebChannel; initialEdgeDeferred: Deferred.Deferred; }, never, Scope.Scope>; //# sourceMappingURL=direct-channel.d.ts.map