import type { Effect } from 'effect';
export type PeerOperation = Promise | Effect.Effect;
export interface PeerChannel {
broadcast(message: unknown): PeerOperation;
subscribe(
handler: (message: unknown) => void,
): PeerOperation<() => Promise>;
}
export type PeerChannelFactory = (
name: string,
) => PeerChannel | PeerOperation;