• Public
  • Public/Protected
  • All


Type Aliases

DefaultValueCallback<Key, Value>: ((key: Key) => Value | undefined)

Type Parameters

Type declaration

    • (key: Key): Value | undefined
    • Generator for default values.


      This is invoked by get when the current map has no Replicated Data defined for the key.

      If this returns a Replicated Data object, it will be added to the map.

      Care should be taken when using this, since it means that the get method can trigger elements to be created. If using default values, the get method should not be used in queries where an empty value for the Replicated Data means the value is not present.


      • key: Key

        The key the default value is being generated for

      Returns Value | undefined

      The default value, or undefined if no default value should be returned

ForEachCallback<Key, Value>: ((value: Value, key: Key, map: ReplicatedMap<Key, Value>) => void)

Type Parameters

Type declaration

    • Callback for handling elements iterated through by ReplicatedMap.forEach.


      • value: Value

        The Replicated Data value

      • key: Key

        The key

      • map: ReplicatedMap<Key, Value>

        This Replicated Map

      Returns void

Generated using TypeDoc