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 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 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 Beta readonly BroadcastControls Controls for management of sending updates.
events Beta readonly Listenable<LatestMapRawEvents<T, Keys>> Events for LatestMapRaw.
local Beta readonly StateMap<Keys, T> Current value map for this client.
presence Beta readonly Presence Containing Presence

Methods

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

Property Details

controls

Controls for management of sending updates.

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

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
readonly controls: BroadcastControls;

Type: BroadcastControls

events

Events for LatestMapRaw.

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

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
readonly events: Listenable<LatestMapRawEvents<T, Keys>>;

Type: Listenable<LatestMapRawEvents<T, Keys>>

local

Current value map for this client.

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

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
readonly local: StateMap<Keys, T>;

Type: StateMap<Keys, T>

presence

Containing Presence

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

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
readonly presence: Presence;

Type: Presence

Method Details

getRemote

Access to a specific client's map of values.

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

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
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 a beta preview and may change without notice.

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
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 a beta preview and may change without notice.

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
getStateAttendees(): Attendee[];

Returns

Return type: Attendee[]