Skip to main content

LatestMapRaw Interface

State 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 LatestMapRaw<T, Keys extends string | number = string | number>

Type Parameters

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

Remarks

Create using StateFactory.latestMap registered to StatesWorkspace.

Properties

Property Alerts Modifiers Type Description
controls Alpha readonly BroadcastControls Controls for management of sending updates.
events Alpha readonly Listenable<LatestMapRawEvents<T, Keys>> Events for LatestMapRaw.
local Alpha readonly StateMap<Keys, T> Current value map for this client.
presence Alpha readonly Presence Containing Presence

Methods

Method Alerts Return Type Description
getRemote(attendee) Alpha ReadonlyMap<Keys, LatestData<T>> Access to a specific client's map of values.
getRemotes() Alpha IterableIterator<LatestMapClientData<T, Keys>> Iterable access to remote clients' map of values.
getStateAttendees() Alpha Attendee[] Array of Attendees that have provided states.

Property Details

controls

Controls for management of sending updates.

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

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

Signature

readonly controls: BroadcastControls;

Type: BroadcastControls

events

Events for LatestMapRaw.

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

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

Signature

readonly events: Listenable<LatestMapRawEvents<T, Keys>>;

Type: Listenable<LatestMapRawEvents<T, Keys>>

local

Current value map for this client.

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

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

Signature

readonly local: StateMap<Keys, T>;

Type: StateMap<Keys, T>

presence

Containing Presence

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

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

Signature

readonly presence: Presence;

Type: Presence

Method Details

getRemote

Access to a specific client's map of values.

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

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

Signature

getRemote(attendee: Attendee): ReadonlyMap<Keys, LatestData<T>>;

Parameters

Parameter Type Description
attendee Attendee

Returns

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

getRemotes

Iterable access to remote clients' map of values.

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

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

Signature

getRemotes(): IterableIterator<LatestMapClientData<T, Keys>>;

Returns

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

getStateAttendees

Array of Attendees that have provided states.

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

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

Signature

getStateAttendees(): Attendee[];

Returns

Return type: Attendee[]