import type { IDecodedMessage } from "./message.js"; import { ProtocolError } from "./protocols.js"; export interface IAsyncIterator { iterator: AsyncIterator; stop: Unsubscribe; } export type Unsubscribe = () => void | Promise; export type PubsubTopic = string; export type ContentTopic = string; export type PeerIdStr = string; export type ThisOrThat = ({ [key in SK]: SV; } & { [key in EK]: null; }) | ({ [key in SK]: null; } & { [key in EK]: EV; }); export type ThisAndThat = { [key in SK]: SV; } & { [key in EK]: EV; };