ISharedMap Interface

Packages > fluid-framework > ISharedMap

Shared map interface

Signature:

export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> 

Extends: ISharedMapEvents,

Methods

List of methods of this class
Method Description
get(key) Retrieves the given key from the map.
set(key, value) Sets the value stored at key to the provided value.

Methods

get

Retrieves the given key from the map.

Signature:

get<T = any>(key: string): T | undefined;

Parameters

List of parameters
Parameter Type Description
key Key to retrieve from

Returns:

The stored value, or undefined if the key is not set

set

Sets the value stored at key to the provided value.

Signature:

set<T = any>(key: string, value: T): this;

Parameters

List of parameters
Parameter Type Description
key Key to set at
value Value to set

Returns:

The ISharedMap itself