in src/global_counter.js [69:83]
export async function createGlobalCounterSignal(startValue, signalName) {
const signal = await Counter(startValue, signalName)
const updateState = (state, signalName, event) => {
return SparkAutomergeWrapper.incrementSignalCounter(
state,
'increment value',
signalName,
event.newValue - event.oldValue
)
}
await GlobalSignal.createGlobalSignal(signal, startValue, signalName, guaranteeStateCounter, updateState)
return signal
}