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.
To use, import via @fluidframework/presence/alpha
.
For more information about our API support guarantees, see here.
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 | Alpha |
readonly |
BroadcastControls | Controls for management of sending updates. |
events | Alpha |
readonly |
Listenable<LatestRawEvents<T>> | Events for LatestRaw. |
local | Alpha |
DeepReadonly<JsonDeserialized<T>> | Current state for this client. State for this client that will be transmitted to all other connected clients. | |
presence | Alpha |
readonly |
Presence | Containing Presence |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
getRemote(attendee) | Alpha |
LatestData<T> | Access to a specific attendee's value. |
getRemotes() | Alpha |
IterableIterator<LatestClientData<T>> | Iterable access to remote clients' values. |
getStateAttendees() | Alpha |
Attendee[] | Array of Attendees that have provided states. |
Property Details
controls
Controls for management of sending updates.
For more information about our API support guarantees, see here.
Signature
readonly controls: BroadcastControls;
Type: BroadcastControls
events
Events for LatestRaw.
For more information about our API support guarantees, see here.
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.
For more information about our API support guarantees, see here.
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
For more information about our API support guarantees, see here.
Signature
readonly presence: Presence;
Type: Presence
Method Details
getRemote
Access to a specific attendee's value.
For more information about our API support guarantees, see here.
Signature
getRemote(attendee: Attendee): LatestData<T>;
Parameters
Parameter | Type | Description |
---|---|---|
attendee | Attendee |
Returns
Return type: LatestData<T>
getRemotes
Iterable access to remote clients' values.
For more information about our API support guarantees, see here.
Signature
getRemotes(): IterableIterator<LatestClientData<T>>;
Returns
Return type: IterableIterator<LatestClientData<T>>
getStateAttendees
Array of Attendees that have provided states.
For more information about our API support guarantees, see here.
Signature
getStateAttendees(): Attendee[];
Returns
Return type: Attendee[]