Skip to main content

LatestMapValueManager Interface

Value manager that provides a Map of latest known values from this client to others and read access to their values. Entries in the map may vary over time and by client, but all values are expected to be of the same type, which may be a union type.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

/** @sealed */
export interface LatestMapValueManager<T, Keys extends string | number = string | number>

Type Parameters

Parameter Constraint Default Description
T
Keys string | number string | number

Remarks

Create using LatestMap(initialValues, controls) registered to PresenceStates.

Properties

Property Alerts Modifiers Type Description
controls Alpha readonly LatestValueControls Controls for management of sending updates.
events Alpha readonly ISubscribable<LatestMapValueManagerEvents<T, Keys>> Events for LatestMap value manager.
local Alpha readonly ValueMap<Keys, T> Current value map for this client.

Methods

Method Alerts Return Type Description
clients() Alpha ISessionClient[] Array of known clients.
clientValue(client) Alpha ReadonlyMap<Keys, LatestValueData<T>> Access to a specific client's map of values.
clientValues() Alpha IterableIterator<LatestMapValueClientData<T, Keys>> Iterable access to remote clients' map of values.

Property Details

controls

Controls for management of sending updates.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

readonly controls: LatestValueControls;

Type: LatestValueControls

events

Events for LatestMap value manager.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

readonly events: ISubscribable<LatestMapValueManagerEvents<T, Keys>>;

Type: ISubscribable<LatestMapValueManagerEvents<T, Keys>>

local

Current value map for this client.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

readonly local: ValueMap<Keys, T>;

Type: ValueMap<Keys, T>

Method Details

clients

Array of known clients.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

clients(): ISessionClient[];

Returns

Return type: ISessionClient[]

clientValue

Access to a specific client's map of values.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

clientValue(client: ISessionClient): ReadonlyMap<Keys, LatestValueData<T>>;

Parameters

Parameter Type Description
client ISessionClient

Returns

Return type: ReadonlyMap<Keys, LatestValueData<T>>

clientValues

Iterable access to remote clients' map of values.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

clientValues(): IterableIterator<LatestMapValueClientData<T, Keys>>;

Returns

Return type: IterableIterator<LatestMapValueClientData<T, Keys>>