Counter

a collaborative counter

let ctx: Context = colab.getChangeContext();
ctx.counter('clicks').inc()
interface Counter {
    dec(): boolean;;
    inc(): boolean;;
    value(): undefined | number;;
}

index

methods

Methods

dec

dec(): boolean;

decrement counter

Returns
boolean

inc

inc(): boolean;

increment counter

Returns
boolean

value

value(): undefined | number;

get value of counter

Returns
undefined | number