An alias for calling increment(-amount)
Optional amount: number
The amount by which to decrease the counter value. If not provided, defaults to 1.
Adds an operation to the current batch to increment the value of the underlying LiveCounterInstance. All queued operations are sent together in a single message once the batch function completes.
If the underlying instance at runtime is not a counter, this method throws an error.
This does not modify the underlying data of the counter. Instead, when the batch function returns, the batched operations are sent to Ably. Once accepted, they are applied locally before the promise returned by batch() resolves.
Optional amount: number
The amount by which to increase the counter value. If not provided, defaults to 1.
Adds an operation to the current batch to remove a key from the underlying LiveMapInstance. All queued operations are sent together in a single message once the batch function completes.
If the underlying instance at runtime is not a map, this method throws an error.
This does not modify the underlying data of the map. Instead, when the batch function returns, the batched operations are sent to Ably. Once accepted, they are applied locally before the promise returned by batch() resolves.
The key to remove.
Adds an operation to the current batch to set a key to a specified value on the underlying LiveMapInstance. All queued operations are sent together in a single message once the batch function completes.
If the underlying instance at runtime is not a map, this method throws an error.
This does not modify the underlying data of the map. Instead, when the batch function returns, the batched operations are sent to Ably. Once accepted, they are applied locally before the promise returned by batch() resolves.
The key to set the value for.
The value to assign to the key.
Generated using TypeDoc
Defines all possible operations available on BatchContext objects.