import type { PeerId } from '@libp2p/interface';
/**
 * We can't use PeerIds as map keys because map keys 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 { peerMap } from '@libp2p/peer-collections'
 *
 * const map = peerMap<string>()
 * map.set(peerId, 'value')
 * ```
 */
export declare class PeerMap<T> {
    private readonly map;
    constructor(map?: PeerMap<T>);
    [Symbol.iterator](): IterableIterator<[PeerId, T]>;
    clear(): void;
    delete(peer: PeerId): boolean;
    entries(): IterableIterator<[PeerId, T]>;
    forEach(fn: (value: T, key: PeerId, map: PeerMap<T>) => void): void;
    get(peer: PeerId): T | undefined;
    has(peer: PeerId): boolean;
    set(peer: PeerId, value: T): void;
    keys(): IterableIterator<PeerId>;
    values(): IterableIterator<T>;
    get size(): number;
}
export declare function peerMap<T>(): PeerMap<T>;
//# sourceMappingURL=map.d.ts.map