import type { PeerId } from '@libp2p/interface';
/**
 * We can't use PeerIds as set entries because set entries are
 * compared using same-value-zero equality, so this is just
 * a map that stringifies the PeerIds before storing them.
 *
 * PeerIds cache stringified versions of themselves so this
 * should be a cheap operation.
 *
 * @example
 *
 * ```TypeScript
 * import { peerSet } from '@libp2p/peer-collections'
 *
 * const set = peerSet()
 * set.add(peerId)
 * ```
 */
export declare class PeerSet {
    private readonly set;
    constructor(set?: PeerSet | Iterable<PeerId>);
    get size(): number;
    [Symbol.iterator](): IterableIterator<PeerId>;
    add(peer: PeerId): void;
    clear(): void;
    delete(peer: PeerId): void;
    entries(): IterableIterator<[PeerId, PeerId]>;
    forEach(predicate: (peerId: PeerId, index: PeerId, set: PeerSet) => void): void;
    has(peer: PeerId): boolean;
    values(): IterableIterator<PeerId>;
    intersection(other: PeerSet): PeerSet;
    difference(other: PeerSet): PeerSet;
    union(other: PeerSet): PeerSet;
}
export declare function peerSet(): PeerSet;
//# sourceMappingURL=set.d.ts.map