Skip to main content
Module

x/automerge/counter.ts>getWriteableCounter

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
Go to Latest
function getWriteableCounter
import { getWriteableCounter } from "https://deno.land/x/automerge@2.2.0/counter.ts";

Returns an instance of WriteableCounter for use in a change callback. context is the proxy context that keeps track of the mutations. objectId is the ID of the object containing the counter, and key is the property name (key in map, or index in list) where the counter is located.

Parameters

value: number
context: Automerge
path: Prop[]
objectId: ObjID
key: Prop

Returns

WriteableCounter