LatestValueManager Interface
Value manager 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 LatestValueManager<T>
Type Parameters
Parameter | Description |
---|---|
T |
Remarks
Create using Latest(initialValue, controls) registered to PresenceStates.
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
controls | Alpha |
readonly |
LatestValueControls | Controls for management of sending updates. |
events | Alpha |
readonly |
ISubscribable<LatestValueManagerEvents<T>> | Events for Latest value manager. |
local | Alpha |
InternalUtilityTypes.FullyReadonly<JsonDeserialized<T>> | Current state for this client. State for this client that will be transmitted to all other connected clients. |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
clients() | Alpha |
ISessionClient[] | Array of known clients. |
clientValue(client) | Alpha |
LatestValueData<T> | Access to a specific client's value. |
clientValues() | Alpha |
IterableIterator<LatestValueClientData<T>> | Iterable access to remote clients' values. |
Property Details
controls
Controls for management of sending updates.
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 Latest value manager.
To use, import via @fluidframework/presence/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly events: ISubscribable<LatestValueManagerEvents<T>>;
Type: ISubscribable<LatestValueManagerEvents<T>>
local
Current state for this client. State for this client that will be transmitted to all other connected clients.
To use, import via @fluidframework/presence/alpha
.
For more information about our API support guarantees, see here.
Signature
get local(): InternalUtilityTypes.FullyReadonly<JsonDeserialized<T>>;
set local(value: JsonSerializable<T> & JsonDeserialized<T>);
Type: InternalUtilityTypes.FullyReadonly<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.
Method Details
clients
Array of known clients.
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 value.
To use, import via @fluidframework/presence/alpha
.
For more information about our API support guarantees, see here.
Signature
clientValue(client: ISessionClient): LatestValueData<T>;
Parameters
Parameter | Type | Description |
---|---|---|
client | ISessionClient |
Returns
Return type: LatestValueData<T>
clientValues
Iterable access to remote clients' values.
To use, import via @fluidframework/presence/alpha
.
For more information about our API support guarantees, see here.
Signature
clientValues(): IterableIterator<LatestValueClientData<T>>;
Returns
Return type: IterableIterator<LatestValueClientData<T>>