ISharedMap Interface
Packages > fluid-framework > ISharedMap
Shared map interface
Signature:
export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any>
Extends: ISharedMapEvents,
Methods
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
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
Parameter | Type | Description |
---|---|---|
key | Key to set at | |
value | Value to set |
Returns:
The ISharedMap itself