Skip to main content

LatestRaw Interface

State that provides the latest known value from this client to others and read access to their values. All participant clients must provide a value.

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 LatestRaw<T>

Type Parameters

Parameter Description
T

Remarks

Create using StateFactory.latest registered to StatesWorkspace.

Properties

Property Alerts Modifiers Type Description
controls Beta readonly BroadcastControls Controls for management of sending updates.
events Beta readonly Listenable<LatestRawEvents<T>> Events for LatestRaw.
local Beta DeepReadonly<JsonDeserialized<T>> Current state for this client. State for this client that will be transmitted to all other connected clients.
presence Beta readonly Presence Containing Presence

Methods

Method Alerts Return Type Description
getRemote(attendee) Beta LatestData<T> Access to a specific attendee's value.
getRemotes() Beta IterableIterator<LatestClientData<T>> Iterable access to remote clients' 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 LatestRaw.

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<LatestRawEvents<T>>;

Type: Listenable<LatestRawEvents<T>>

local

Current state for this client. State for this client that will be transmitted to all other connected clients.

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
get local(): DeepReadonly<JsonDeserialized<T>>;
set local(value: JsonSerializable<T> & JsonDeserialized<T>);

Type: DeepReadonly<JsonDeserialized<T>>

Remarks

Manager assumes ownership of the value and its references. Make a deep clone before setting, if needed. No comparison is done to detect changes; all sets are transmitted.

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 attendee's value.

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): LatestData<T>;

Parameters

Parameter Type Description
attendee Attendee

Returns

Return type: LatestData<T>

getRemotes

Iterable access to remote clients' 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<LatestClientData<T>>;

Returns

Return type: IterableIterator<LatestClientData<T>>

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[]