import { Clocks, ReplicatedData } from '.'; import { Serializable } from '../serializable'; /** * A replicated map of registers. * * @typeParam Key - Type of keys for the Replicated Register Map * @typeParam Value - Type of values for the Replicated Register Map * * @public */ export declare class ReplicatedRegisterMap implements ReplicatedData { private registers; private removed; private cleared; /** * Get the value at the given key. * * @param key - The key to get * @returns The register value, or undefined if no value is defined at that key */ get: (key: Key) => Value | undefined; /** * Set the register at the given key to the given value. * * @param key - The key for the register * @param value - The new value for the register * @param clock - The register clock, otherwise default clock * @param customClockValue - Clock value when using custom clock, otherwise ignored * @returns This register map */ set: (key: Key, value: Value, clock?: Clocks, customClockValue?: number | Long) => ReplicatedRegisterMap; /** * Check whether this map contains a value of the given key. * * @param key - The key to check * @returns True if this register map contains a value for the given key */ has: (key: Key) => boolean; /** * The number of elements in this map. */ get size(): number; /** * Return an (iterable) iterator of the keys of this register map. * * @returns (iterable) iterator of the map keys */ keys: () => IterableIterator; /** * Delete the register at the given key. * * @param key - The key to delete * @returns This register map */ delete: (key: Key) => ReplicatedRegisterMap; /** * Clear all registers from this register map. * * @returns This register map */ clear: () => ReplicatedRegisterMap; private getOrCreateRegister; toString: () => string; }