Skip to main content

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.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/shared-summary-block/legacy.

For more information about our API support guarantees, see here.

Signature

export interface ISharedSummaryBlock extends ISharedObject

Extends: ISharedObject

Methods

Method Alerts Return Type Description
get(key) Alpha Jsonable<T> Retrieves the given key from the map.
set(key, value) Alpha void Sets the value stored at key to the provided value.

Method Details

get

Retrieves the given key from the map.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/shared-summary-block/alpha.

For more information about our API support guarantees, see here.

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.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/shared-summary-block/alpha.

For more information about our API support guarantees, see here.

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.