Skip to main content
Version: v1

ISharedCounter Interface

SharedCounter interface.

Signature

export interface ISharedCounter extends ISharedObject<ISharedCounterEvents>

Extends: ISharedObject<ISharedCounterEvents

Properties

PropertyTypeDescription
valuenumberThe counter value.

Methods

MethodReturn TypeDescription
increment(incrementAmount)voidIncrements or decrements the value. Must only increment or decrement by a whole number value.

Property Details

value

The counter value.

Signature

value: number;

Type: number

Method Details

increment

Increments or decrements the value. Must only increment or decrement by a whole number value.

Signature

increment(incrementAmount: number): void;

Parameters

ParameterTypeDescription
incrementAmountnumbera whole number to increment or decrement by.