Packages > @fluidframework/map
@fluidframework/map Package
The map
library provides interfaces and implementing classes for map-like distributed data structures.
Remarks
The following distributed data structures are defined in this library:
-
SharedMap
Interfaces
Interface | Modifiers | Description |
---|---|---|
ISharedMap |
sealed
|
The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the Map built-in object. However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a FluidObjectHandle.
For more information, including example usages, see https://fluidframework.com/docs/data-structures/map/.
|
ISharedMapEvents |
sealed
|
Events emitted in response to changes to the map data.
|
IValueChanged |
sealed
|
Type of "valueChanged" event parameter.
|
Types
TypeAlias | Alerts | Description |
---|---|---|
SharedMap |
DEPRECATED
|
The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the Map built-in object. However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a FluidObjectHandle. For more information, including example usages, see https://fluidframework.com/docs/data-structures/map/. |
Variables
Variable | Alerts | Modifiers | Description |
---|---|---|---|
SharedMap |
DEPRECATED
|
readonly
|
The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the Map built-in object. However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a FluidObjectHandle. For more information, including example usages, see https://fluidframework.com/docs/data-structures/map/. |
Variable Details
SharedMap
The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the Map built-in object. However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a FluidObjectHandle .
For more information, including example usages, see https://fluidframework.com/docs/data-structures/map/ .
API This
Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
Signature
SharedMap: {
getFactory(): IChannelFactory<ISharedMap>;
create(runtime: IFluidDataStoreRuntime, id?: string): ISharedMap;
}