ISharedSummaryBlock Interface
Shared summary block interface. A shared summary block is part of the summary but it does not generate any ops. The set on this interface must only be called in response to a remote op. Basically, if we replay same ops, the set of calls on this interface to set data should be the same. This is critical because the object does not generate ops of its own, but relies on the above principle to maintain eventual consistency and to summarize.
Signature
export interface ISharedSummaryBlock extends ISharedObject
Extends: ISharedObject
Methods
Method | Return Type | Description |
---|---|---|
get(key) | Jsonable<T> | Retrieves the given key from the map. |
set(key, value) | void | Sets the value stored at key to the provided value. |
Method Details
get
Retrieves the given key from the map.
Signature
get<T>(key: string): Jsonable<T>;
Type Parameters
Parameter | Description |
---|---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Key to retrieve from. |
Returns
The stored value, or undefined if the key is not set.
Return type: Jsonable<T>
set
Sets the value stored at key to the provided value.
Signature
set<T>(key: string, value: Jsonable<T>): void;
Type Parameters
Parameter | Description |
---|---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Key to set at. |
value | Jsonable<T> | Jsonable type value to set. |