LatestMapEvents Interface
Events from LatestMapRaw.
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
| Parameter | Constraint | Default | Description |
|---|---|---|---|
| T | |||
| K | string | ||
| TRemoteValueAccessor | ValueAccessor<T> | ProxiedValueAccessor<T> |
Events
| Property | Type | Description |
|---|---|---|
| localItemRemoved | (removedItem: { key: K; }) => void | Raised when specific local item is removed. |
| localItemUpdated | (updatedItem: { value: DeepReadonly<JsonSerializable<T>>; key: K; }) => void | Raised when specific local item's value is updated. |
| remoteItemRemoved | (removedItem: LatestMapItemRemovedClientData<K>) => void | Raised when specific item of remote client is removed. |
| remoteItemUpdated | (updatedItem: LatestMapItemUpdatedClientData<T, K, TRemoteValueAccessor>) => void | Raised when specific item's value of remote client is updated. |
| remoteUpdated | (updates: LatestMapClientData<T, K, TRemoteValueAccessor>) => void | Raised 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.