Skip to main content

LatestMapEvents Interface

Events from LatestMapRaw.

This API is provided as a beta preview and may change without notice.

To use, import via @fluidframework/presence/beta.

For more information about our API support guarantees, see here.

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 | number, TRemoteValueAccessor extends ValueAccessor<T> = ProxiedValueAccessor<T>>

Type Parameters

ParameterConstraintDefaultDescription
T
Kstring | number
TRemoteValueAccessorValueAccessor<T>ProxiedValueAccessor<T>

Events

PropertyAlertsTypeDescription
localItemRemovedBeta(removedItem: { key: K; }) => voidRaised when specific local item is removed.
localItemUpdatedBeta(updatedItem: { value: DeepReadonly<JsonSerializable<T>>; key: K; }) => voidRaised when specific local item's value is updated.
remoteItemRemovedBeta(removedItem: LatestMapItemRemovedClientData<K>) => voidRaised when specific item of remote client is removed.
remoteItemUpdatedBeta(updatedItem: LatestMapItemUpdatedClientData<T, K, TRemoteValueAccessor>) => voidRaised when specific item's value of remote client is updated.
remoteUpdatedBeta(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.

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

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

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

localItemUpdated

Raised when specific local item's value is updated.

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

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.

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

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

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

remoteItemUpdated

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

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

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.

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

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

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

Remarks

The event does not include item removals.