Skip to main content
Version: v2

LatestMapEvents Interface

Events from LatestMapRaw.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature​

/** @sealed */
export interface LatestMapEvents<T, K extends string, TRemoteValueAccessor extends ValueAccessor<T> = ProxiedValueAccessor<T>>

Type Parameters​

ParameterConstraintDefaultDescription
T
Kstring
TRemoteValueAccessorValueAccessor<T>ProxiedValueAccessor<T>

Events​

PropertyTypeDescription
localItemRemoved(removedItem: { key: K; }) => voidRaised when specific local item is removed.
localItemUpdated(updatedItem: { value: DeepReadonly<JsonSerializable<T>>; key: K; }) => voidRaised when specific local item's value is updated.
remoteItemRemoved(removedItem: LatestMapItemRemovedClientData<K>) => voidRaised when specific item of remote client is removed.
remoteItemUpdated(updatedItem: LatestMapItemUpdatedClientData<T, K, TRemoteValueAccessor>) => voidRaised when specific item's value of remote client is updated.
remoteUpdated(updates: LatestMapClientData<T, K, TRemoteValueAccessor>) => voidRaised when any item's value for remote client is updated.

Event Details​

localItemRemoved​

Raised when specific local item is removed.

Signature​

localItemRemoved: (removedItem: {
key: K;
}) => void;

Type: (removedItem: { key: K; }) => void

localItemUpdated​

Raised when specific local item's value is updated.

Signature​

localItemUpdated: (updatedItem: {
value: DeepReadonly<JsonSerializable<T>>;
key: K;
}) => void;

Type: (updatedItem: { value: DeepReadonly<JsonSerializable<T>>; key: K; }) => void

remoteItemRemoved​

Raised when specific item of remote client is removed.

Signature​

remoteItemRemoved: (removedItem: LatestMapItemRemovedClientData<K>) => void;

Type: (removedItem: LatestMapItemRemovedClientData<K>) => void

remoteItemUpdated​

Raised when specific item's value of remote client is updated.

Signature​

remoteItemUpdated: (updatedItem: LatestMapItemUpdatedClientData<T, K, TRemoteValueAccessor>) => void;

Type: (updatedItem: LatestMapItemUpdatedClientData<T, K, TRemoteValueAccessor>) => void

remoteUpdated​

Raised when any item's value for remote client is updated.

Signature​

remoteUpdated: (updates: LatestMapClientData<T, K, TRemoteValueAccessor>) => void;

Type: (updates: LatestMapClientData<T, K, TRemoteValueAccessor>) => void

Remarks​

The event does not include item removals.