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

  • SharedDirectory

Interfaces

Interface Alerts Modifiers Description
ICreateInfo Deprecated, Legacy, Alpha Create info for the subdirectory.
IDirectory Legacy sealed Interface describing actions on a directory.
IDirectoryDataObject Deprecated, Legacy, Alpha Defines the in-memory object structure to be used for the conversion to/from serialized.
IDirectoryEvents Legacy sealed Events emitted in response to changes to the directory data.
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/idirectorynewstorageformat-interface'>IDirectoryNewStorageFormat</a>
  </td>
  <td>
    <code>Deprecated</code>, <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
  </td>
  <td>
    <a href='/docs/api/v2/map/idirectory-interface'>IDirectory</a> storage format.
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/idirectoryvaluechanged-interface'>IDirectoryValueChanged</a>
  </td>
  <td>
    <code>Legacy</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    Type of &quot;valueChanged&quot; event parameter for <a href='/docs/api/v2/map/ishareddirectory-interface'>ISharedDirectory</a>.
    <br>
     
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/iserializablevalue-interface'>ISerializableValue</a>
  </td>
  <td>
    <code>Deprecated</code>, <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
  </td>
  <td>
    The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use <a href='/docs/api/v2/map/iserializablevalue-interface#type-propertysignature'>type</a> to understand whether they're storing a Plain JavaScript object, a <a href='/docs/api/v2/shared-object-base/sharedobject-class'>SharedObject</a>, or a value type.
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/ishareddirectory-interface'>ISharedDirectory</a>
  </td>
  <td>
    <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    Provides a hierarchical organization of map-like data structures as SubDirectories. The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax. SubDirectories can be retrieved for use as working directories.
    <br>
     
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/ishareddirectoryevents-interface'>ISharedDirectoryEvents</a>
  </td>
  <td>
    <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    Events emitted in response to changes to the directory data.
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/isharedmap-interface'>ISharedMap</a>
  </td>
  <td>
    <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    The SharedMap distributed data structure can be used to store key-value pairs.
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/isharedmapevents-interface'>ISharedMapEvents</a>
  </td>
  <td>
    <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    Events emitted in response to changes to the <a href='/docs/api/v2/map/isharedmap-interface'>map</a> data.
    <br>
     
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/ivaluechanged-interface'>IValueChanged</a>
  </td>
  <td>
    <code>Legacy</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    Type of &quot;valueChanged&quot; event parameter.
    <br>
     
  </td>
</tr>

Classes

Class Alerts Modifiers Description
DirectoryFactory Legacy, Alpha sealed IChannelFactory for ISharedDirectory.
  </td>
</tr>
<tr>
  <td>
    <a href='/docs/api/v2/map/mapfactory-class'>MapFactory</a>
  </td>
  <td>
    <code>Legacy</code>, <code>Alpha</code>
  </td>
  <td>
    <code>sealed</code>
  </td>
  <td>
    <a href='/docs/api/v2/datastore-definitions/ichannelfactory-interface'>IChannelFactory</a> for <a href='/docs/api/v2/map/isharedmap-interface'>ISharedMap</a>.
    <br>
     
  </td>
</tr>

Types

TypeAlias Alerts Description
SharedDirectory Legacy, Alpha Entrypoint for ISharedDirectory creation.
SharedMap Legacy, Alpha Entrypoint for ISharedMap creation.

Variables

Variable Alerts Modifiers Type Description
SharedDirectory Legacy, Alpha readonly import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedDirectory> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedDirectory> Entrypoint for ISharedDirectory creation.
SharedMap Legacy, Alpha readonly import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedMap> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedMap> Entrypoint for ISharedMap creation.

Variable Details

SharedDirectory

Entrypoint for ISharedDirectory creation.

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

To use, import via @fluidframework/map/legacy.

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

Signature

SharedDirectory: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedDirectory> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedDirectory>

Type: import("@fluidframework/shared-object-base/internal").ISharedObjectKind <ISharedDirectory > & import("@fluidframework/shared-object-base/internal").SharedObjectKind <ISharedDirectory >

SharedMap

Entrypoint for ISharedMap creation.

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

To use, import via @fluidframework/map/legacy.

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

Signature

SharedMap: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedMap> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedMap>

Type: import("@fluidframework/shared-object-base/internal").ISharedObjectKind <ISharedMap > & import("@fluidframework/shared-object-base/internal").SharedObjectKind <ISharedMap >