import type { PeerId } from '@libp2p/interface'; /** * We can't use PeerIds as list entries because list 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 { peerList } from '@libp2p/peer-collections' * * const list = peerList() * list.push(peerId) * ``` */ export declare class PeerList { private list; constructor(list?: PeerList | Iterable); [Symbol.iterator](): IterableIterator; concat(list: PeerList): PeerList; entries(): IterableIterator<[number, PeerId]>; every(predicate: (peerId: PeerId, index: number, arr: PeerList) => boolean): boolean; filter(predicate: (peerId: PeerId, index: number, arr: PeerList) => boolean): PeerList; find(predicate: (peerId: PeerId, index: number, arr: PeerList) => boolean): PeerId | undefined; findIndex(predicate: (peerId: PeerId, index: number, arr: PeerList) => boolean): number; forEach(predicate: (peerId: PeerId, index: number, arr: PeerList) => void): void; includes(peerId: PeerId): boolean; indexOf(peerId: PeerId): number; pop(): PeerId | undefined; push(...peerIds: PeerId[]): void; shift(): PeerId | undefined; unshift(...peerIds: PeerId[]): number; clear(): void; get length(): number; } export declare function peerList(): PeerList; //# sourceMappingURL=list.d.ts.map