@fluidframework/map 2.0.0-internal.2.0.2 → 2.0.0-internal.2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/directory.d.ts +1 -1
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +119 -5
- package/dist/directory.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -14
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/directory.d.ts +1 -1
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +119 -5
- package/lib/directory.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +17 -19
- package/src/directory.ts +132 -5
- package/src/index.ts +28 -3
- package/src/interfaces.ts +1 -1
- package/src/packageVersion.ts +1 -1
package/lib/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from \"@fluidframework/common-definitions\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n /**\n * The key storing the value that changed.\n */\n key: string;\n\n /**\n * The value that was stored at the key prior to the change.\n */\n previousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks\n * When used as a Map, operates on its keys.\n */\nexport interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {\n /**\n * The absolute path of the directory.\n */\n readonly absolutePath: string;\n\n /**\n * Retrieves the value stored at the given key from the directory.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set at\n * @param value - Value to set\n * @returns The IDirectory itself\n */\n set<T = any>(key: string, value: T): this;\n\n /**\n * Get the number of sub directory within the directory.\n * @returns The number of sub directory within a directory.\n */\n countSubDirectory?(): number;\n\n /**\n * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n * same name already exists.\n * @param subdirName - Name of the new child directory to create\n * @returns The IDirectory child that was created or retrieved\n */\n createSubDirectory(subdirName: string): IDirectory;\n\n /**\n * Gets an IDirectory child of this IDirectory, if it exists.\n * @param subdirName - Name of the child directory to get\n * @returns The requested IDirectory\n */\n getSubDirectory(subdirName: string): IDirectory | undefined;\n\n /**\n * Checks whether this directory has a child directory with the given name.\n * @param subdirName - Name of the child directory to check\n * @returns True if it exists, false otherwise\n */\n hasSubDirectory(subdirName: string): boolean;\n\n /**\n * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n * @param subdirName - Name of the child directory to delete\n * @returns True if the IDirectory existed and was deleted, false if it did not exist\n */\n deleteSubDirectory(subdirName: string): boolean;\n\n /**\n * Gets an iterator over the IDirectory children of this IDirectory.\n * @returns The IDirectory iterator\n */\n subdirectories(): IterableIterator<[string, IDirectory]>;\n\n /**\n * Get an IDirectory within the directory, in order to use relative paths from that location.\n * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n * @returns The requested IDirectory\n */\n getWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n /**\n * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any\n * subdirectory.\n *\n * @remarks Listener parameters:\n *\n * - `changed` - Information on the key that changed, its value prior to the change, and the path to the\n * key that changed.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"valueChanged\", listener: (\n changed: IDirectoryValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when the {@link ISharedDirectory} is cleared.\n *\n * @remarks Listener parameters:\n *\n * - `local` - Whether the clear originated from this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is created.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the create originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is deleted.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n */\nexport interface IDirectoryEvents extends IEvent {\n /**\n * Emitted when a key is set or deleted. As opposed to the\n * {@link SharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly\n * contains the key.\n *\n * @remarks Listener parameters:\n *\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The {@link IDirectory} itself.\n */\n (event: \"containedValueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is created.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the creation originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is deleted.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when this sub directory is deleted.\n *\n * @remarks Listener parameters:\n *\n * - `target` - The {@link IDirectory} itself.\n */\n (event: \"disposed\", listener: (\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Provides a hierarchical organization of map-like data structures as SubDirectories.\n * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.\n * SubDirectories can be retrieved for use as working directories.\n */\nexport interface ISharedDirectory extends\n ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n Omit<IDirectory, \"on\" | \"once\" | \"off\"> {\n // The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n // https://github.com/microsoft/TypeScript/issues/31671\n [Symbol.iterator](): IterableIterator<[string, any]>;\n readonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for {@link ISharedDirectory}\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n /**\n * The absolute path to the IDirectory storing the key which changed.\n */\n path: string;\n}\n\n/**\n * Events emitted in response to changes to the {@link ISharedMap | map} data.\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n /**\n * Emitted when a key is set or deleted.\n *\n * @remarks Listener parameters:\n *\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The {@link ISharedMap} itself.\n */\n (event: \"valueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n\n /**\n * Emitted when the map is cleared.\n *\n * @remarks Listener parameters:\n *\n * - `local` - Whether the clear originated from this client.\n *\n * - `target` - The {@link ISharedMap} itself.\n */\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting\n * and retrieving values that JavaScript developers are accustomed to with the\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.\n * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a\n * {@link @fluidframework/shared-object-base#SharedObjectHandle}.\n *\n * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.\n */\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n /**\n * Retrieves the given key from the map if it exists.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set\n * @param value - Value to set\n * @returns The {@link ISharedMap} itself\n */\n set<T = any>(key: string, value: T): this;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * {@link ISerializableValue.\"type\"} to understand whether they're storing a Plain JavaScript object,\n * a {@link @fluidframework/shared-object-base#SharedObject}, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n *\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID.\n *\n * @deprecated This type is legacy and deprecated.\n */\nexport interface ISerializableValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * The JSONable representation of the value.\n */\n value: any;\n}\n\n/**\n * Serialized {@link ISerializableValue} counterpart.\n */\nexport interface ISerializedValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * String representation of the value.\n *\n * @remarks Will be undefined if the original value was undefined.\n */\n value: string | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISharedObject, ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IDisposable, IEvent, IEventProvider, IEventThisPlaceHolder } from \"@fluidframework/common-definitions\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n /**\n * The key storing the value that changed.\n */\n key: string;\n\n /**\n * The value that was stored at the key prior to the change.\n */\n previousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks\n * When used as a Map, operates on its keys.\n */\nexport interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {\n /**\n * The absolute path of the directory.\n */\n readonly absolutePath: string;\n\n /**\n * Retrieves the value stored at the given key from the directory.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set at\n * @param value - Value to set\n * @returns The IDirectory itself\n */\n set<T = any>(key: string, value: T): this;\n\n /**\n * Get the number of sub directory within the directory.\n * @returns The number of sub directory within a directory.\n */\n countSubDirectory?(): number;\n\n /**\n * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n * same name already exists.\n * @param subdirName - Name of the new child directory to create\n * @returns The IDirectory child that was created or retrieved\n */\n createSubDirectory(subdirName: string): IDirectory;\n\n /**\n * Gets an IDirectory child of this IDirectory, if it exists.\n * @param subdirName - Name of the child directory to get\n * @returns The requested IDirectory\n */\n getSubDirectory(subdirName: string): IDirectory | undefined;\n\n /**\n * Checks whether this directory has a child directory with the given name.\n * @param subdirName - Name of the child directory to check\n * @returns True if it exists, false otherwise\n */\n hasSubDirectory(subdirName: string): boolean;\n\n /**\n * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n * @param subdirName - Name of the child directory to delete\n * @returns True if the IDirectory existed and was deleted, false if it did not exist\n */\n deleteSubDirectory(subdirName: string): boolean;\n\n /**\n * Gets an iterator over the IDirectory children of this IDirectory.\n * @returns The IDirectory iterator\n */\n subdirectories(): IterableIterator<[string, IDirectory]>;\n\n /**\n * Get an IDirectory within the directory, in order to use relative paths from that location.\n * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n * @returns The requested IDirectory\n */\n getWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n /**\n * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any\n * subdirectory.\n *\n * @remarks Listener parameters:\n *\n * - `changed` - Information on the key that changed, its value prior to the change, and the path to the\n * key that changed.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"valueChanged\", listener: (\n changed: IDirectoryValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when the {@link ISharedDirectory} is cleared.\n *\n * @remarks Listener parameters:\n *\n * - `local` - Whether the clear originated from this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is created.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the create originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is deleted.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n */\nexport interface IDirectoryEvents extends IEvent {\n /**\n * Emitted when a key is set or deleted. As opposed to the\n * {@link SharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly\n * contains the key.\n *\n * @remarks Listener parameters:\n *\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The {@link IDirectory} itself.\n */\n (event: \"containedValueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is created.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is created.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the creation originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n (event: \"subDirectoryCreated\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when a subdirectory is deleted.\n *\n * @remarks Listener parameters:\n *\n * - `path` - The relative path to the subdirectory that is deleted.\n * It is relative from the object which raises the event.\n *\n * - `local` - Whether the delete originated from the this client.\n *\n * - `target` - The {@link ISharedDirectory} itself.\n */\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n (event: \"subDirectoryDeleted\", listener: (\n path: string,\n local: boolean,\n target: IEventThisPlaceHolder,\n ) => void);\n\n /**\n * Emitted when this sub directory is deleted.\n *\n * @remarks Listener parameters:\n *\n * - `target` - The {@link IDirectory} itself.\n */\n (event: \"disposed\", listener: (\n target: IEventThisPlaceHolder,\n ) => void);\n}\n\n/**\n * Provides a hierarchical organization of map-like data structures as SubDirectories.\n * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.\n * SubDirectories can be retrieved for use as working directories.\n */\nexport interface ISharedDirectory extends\n ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n Omit<IDirectory, \"on\" | \"once\" | \"off\"> {\n // The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n // https://github.com/microsoft/TypeScript/issues/31671\n [Symbol.iterator](): IterableIterator<[string, any]>;\n readonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for {@link ISharedDirectory}\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n /**\n * The absolute path to the IDirectory storing the key which changed.\n */\n path: string;\n}\n\n/**\n * Events emitted in response to changes to the {@link ISharedMap | map} data.\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n /**\n * Emitted when a key is set or deleted.\n *\n * @remarks Listener parameters:\n *\n * - `changed` - Information on the key that changed and its value prior to the change.\n *\n * - `local` - Whether the change originated from this client.\n *\n * - `target` - The {@link ISharedMap} itself.\n */\n (event: \"valueChanged\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n\n /**\n * Emitted when the map is cleared.\n *\n * @remarks Listener parameters:\n *\n * - `local` - Whether the clear originated from this client.\n *\n * - `target` - The {@link ISharedMap} itself.\n */\n (event: \"clear\", listener: (\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting\n * and retrieving values that JavaScript developers are accustomed to with the\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.\n * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a\n * {@link @fluidframework/datastore#FluidObjectHandle}.\n *\n * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.\n */\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n /**\n * Retrieves the given key from the map if it exists.\n * @param key - Key to retrieve from\n * @returns The stored value, or undefined if the key is not set\n */\n get<T = any>(key: string): T | undefined;\n\n /**\n * Sets the value stored at key to the provided value.\n * @param key - Key to set\n * @param value - Value to set\n * @returns The {@link ISharedMap} itself\n */\n set<T = any>(key: string, value: T): this;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * {@link ISerializableValue.\"type\"} to understand whether they're storing a Plain JavaScript object,\n * a {@link @fluidframework/shared-object-base#SharedObject}, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n *\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID.\n *\n * @deprecated This type is legacy and deprecated.\n */\nexport interface ISerializableValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * The JSONable representation of the value.\n */\n value: any;\n}\n\n/**\n * Serialized {@link ISerializableValue} counterpart.\n */\nexport interface ISerializedValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * String representation of the value.\n *\n * @remarks Will be undefined if the original value was undefined.\n */\n value: string | undefined;\n}\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/map";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-internal.2.0
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.2.1.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"2.0.0-internal.2.0
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"2.0.0-internal.2.1.0\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/map",
|
|
3
|
-
"version": "2.0.0-internal.2.0
|
|
3
|
+
"version": "2.0.0-internal.2.1.0",
|
|
4
4
|
"description": "Distributed map",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
"test:mocha": "mocha --unhandled-rejections=strict --recursive 'dist/test/mocha/**/*.spec.js' -r node_modules/@fluidframework/mocha-test-setup --exit",
|
|
38
38
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
39
39
|
"tsc": "tsc",
|
|
40
|
-
"tsfmt": "tsfmt --verify",
|
|
41
|
-
"tsfmt:fix": "tsfmt --replace",
|
|
42
40
|
"typetests:gen": "fluid-type-validator -g -d ."
|
|
43
41
|
},
|
|
44
42
|
"nyc": {
|
|
@@ -64,25 +62,26 @@
|
|
|
64
62
|
"dependencies": {
|
|
65
63
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
66
64
|
"@fluidframework/common-utils": "^1.0.0",
|
|
67
|
-
"@fluidframework/container-utils": ">=2.0.0-internal.2.0
|
|
68
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.2.0
|
|
69
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.2.0
|
|
70
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.2.0
|
|
65
|
+
"@fluidframework/container-utils": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
66
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
67
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
68
|
+
"@fluidframework/driver-utils": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
71
69
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
72
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.2.0
|
|
73
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.2.0
|
|
74
|
-
"@fluidframework/shared-object-base": ">=2.0.0-internal.2.0
|
|
70
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
71
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
72
|
+
"@fluidframework/shared-object-base": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
75
73
|
"path-browserify": "^1.0.1"
|
|
76
74
|
},
|
|
77
75
|
"devDependencies": {
|
|
78
|
-
"@fluid-internal/test-dds-utils": ">=2.0.0-internal.2.0
|
|
76
|
+
"@fluid-internal/test-dds-utils": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
79
77
|
"@fluid-tools/benchmark": "^0.43.0",
|
|
80
|
-
"@
|
|
81
|
-
"@fluidframework/build-
|
|
82
|
-
"@fluidframework/
|
|
78
|
+
"@fluid-tools/build-cli": "^0.5.0",
|
|
79
|
+
"@fluidframework/build-common": "^1.1.0",
|
|
80
|
+
"@fluidframework/build-tools": "^0.5.0",
|
|
81
|
+
"@fluidframework/eslint-config-fluid": "^1.1.0",
|
|
83
82
|
"@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-internal.2.0.0",
|
|
84
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.2.0
|
|
85
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.2.0
|
|
83
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
84
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.2.1.0 <2.0.0-internal.3.0.0",
|
|
86
85
|
"@microsoft/api-extractor": "^7.22.2",
|
|
87
86
|
"@rushstack/eslint-config": "^2.5.1",
|
|
88
87
|
"@types/mocha": "^9.1.1",
|
|
@@ -94,11 +93,10 @@
|
|
|
94
93
|
"mocha": "^10.0.0",
|
|
95
94
|
"nyc": "^15.0.0",
|
|
96
95
|
"rimraf": "^2.6.2",
|
|
97
|
-
"typescript": "~4.5.5"
|
|
98
|
-
"typescript-formatter": "7.1.0"
|
|
96
|
+
"typescript": "~4.5.5"
|
|
99
97
|
},
|
|
100
98
|
"typeValidation": {
|
|
101
|
-
"version": "2.0.0-internal.2.0
|
|
99
|
+
"version": "2.0.0-internal.2.1.0",
|
|
102
100
|
"broken": {}
|
|
103
101
|
}
|
|
104
102
|
}
|
package/src/directory.ts
CHANGED
|
@@ -67,6 +67,8 @@ interface IDirectoryMessageHandler {
|
|
|
67
67
|
* @param localOpMetadata - The metadata to be submitted with the message.
|
|
68
68
|
*/
|
|
69
69
|
submit(op: IDirectoryOperation, localOpMetadata: unknown): void;
|
|
70
|
+
|
|
71
|
+
applyStashedOp(op: IDirectoryOperation): unknown;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
/**
|
|
@@ -712,6 +714,12 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
712
714
|
subdir.resubmitClearMessage(op, localOpMetadata);
|
|
713
715
|
}
|
|
714
716
|
},
|
|
717
|
+
applyStashedOp: (op: IDirectoryClearOperation): IClearLocalOpMetadata | undefined => {
|
|
718
|
+
const subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
719
|
+
if (subdir) {
|
|
720
|
+
return subdir.applyStashedClearMessage(op);
|
|
721
|
+
}
|
|
722
|
+
},
|
|
715
723
|
},
|
|
716
724
|
);
|
|
717
725
|
this.messageHandlers.set(
|
|
@@ -729,6 +737,12 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
729
737
|
subdir.resubmitKeyMessage(op, localOpMetadata);
|
|
730
738
|
}
|
|
731
739
|
},
|
|
740
|
+
applyStashedOp: (op: IDirectoryDeleteOperation): IKeyEditLocalOpMetadata | undefined => {
|
|
741
|
+
const subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
742
|
+
if (subdir) {
|
|
743
|
+
return subdir.applyStashedDeleteMessage(op);
|
|
744
|
+
}
|
|
745
|
+
},
|
|
732
746
|
},
|
|
733
747
|
);
|
|
734
748
|
this.messageHandlers.set(
|
|
@@ -747,6 +761,13 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
747
761
|
subdir.resubmitKeyMessage(op, localOpMetadata);
|
|
748
762
|
}
|
|
749
763
|
},
|
|
764
|
+
applyStashedOp: (op: IDirectorySetOperation): IKeyEditLocalOpMetadata | undefined => {
|
|
765
|
+
const subdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
766
|
+
if (subdir) {
|
|
767
|
+
const context = this.makeLocal(op.key, op.path, op.value);
|
|
768
|
+
return subdir.applyStashedSetMessage(op, context);
|
|
769
|
+
}
|
|
770
|
+
},
|
|
750
771
|
},
|
|
751
772
|
);
|
|
752
773
|
|
|
@@ -766,6 +787,13 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
766
787
|
parentSubdir.resubmitSubDirectoryMessage(op, localOpMetadata);
|
|
767
788
|
}
|
|
768
789
|
},
|
|
790
|
+
// eslint-disable-next-line max-len
|
|
791
|
+
applyStashedOp: (op: IDirectoryCreateSubDirectoryOperation): ICreateSubDirLocalOpMetadata | undefined => {
|
|
792
|
+
const parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
793
|
+
if (parentSubdir) {
|
|
794
|
+
return parentSubdir.applyStashedCreateSubDirMessage(op);
|
|
795
|
+
}
|
|
796
|
+
},
|
|
769
797
|
},
|
|
770
798
|
);
|
|
771
799
|
|
|
@@ -785,6 +813,13 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
785
813
|
parentSubdir.resubmitSubDirectoryMessage(op, localOpMetadata);
|
|
786
814
|
}
|
|
787
815
|
},
|
|
816
|
+
// eslint-disable-next-line max-len
|
|
817
|
+
applyStashedOp: (op: IDirectoryDeleteSubDirectoryOperation): IDeleteSubDirLocalOpMetadata | undefined => {
|
|
818
|
+
const parentSubdir = this.getWorkingDirectory(op.path) as SubDirectory | undefined;
|
|
819
|
+
if (parentSubdir) {
|
|
820
|
+
return parentSubdir.applyStashedDeleteSubDirMessage(op);
|
|
821
|
+
}
|
|
822
|
+
},
|
|
788
823
|
},
|
|
789
824
|
);
|
|
790
825
|
}
|
|
@@ -792,8 +827,12 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
792
827
|
/**
|
|
793
828
|
* @internal
|
|
794
829
|
*/
|
|
795
|
-
protected applyStashedOp() {
|
|
796
|
-
|
|
830
|
+
protected applyStashedOp(op) {
|
|
831
|
+
const handler = this.messageHandlers.get(op.type);
|
|
832
|
+
if (handler === undefined) {
|
|
833
|
+
throw new Error("no apply stashed op handler");
|
|
834
|
+
}
|
|
835
|
+
return handler.applyStashedOp(op as IDirectoryOperation);
|
|
797
836
|
}
|
|
798
837
|
|
|
799
838
|
private serializeDirectory(
|
|
@@ -1296,7 +1335,26 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1296
1335
|
0x32a /* pendingMessageId does not match */);
|
|
1297
1336
|
return;
|
|
1298
1337
|
}
|
|
1299
|
-
this.clearExceptPendingKeys();
|
|
1338
|
+
this.clearExceptPendingKeys(false);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Apply clear operation locally and generate metadata
|
|
1343
|
+
* @param op - Op to apply
|
|
1344
|
+
* @returns metadata generated for stahed op
|
|
1345
|
+
*/
|
|
1346
|
+
public applyStashedClearMessage(op: IDirectoryClearOperation): IClearLocalOpMetadata {
|
|
1347
|
+
this.throwIfDisposed();
|
|
1348
|
+
const previousValue = new Map<string, ILocalValue>(this._storage);
|
|
1349
|
+
this.clearExceptPendingKeys(true);
|
|
1350
|
+
const pendingMsgId = ++this.pendingMessageId;
|
|
1351
|
+
this.pendingClearMessageIds.push(pendingMsgId);
|
|
1352
|
+
const metadata: IClearLocalOpMetadata = {
|
|
1353
|
+
type: "clear",
|
|
1354
|
+
pendingMessageId: pendingMsgId,
|
|
1355
|
+
previousStorage: previousValue,
|
|
1356
|
+
};
|
|
1357
|
+
return metadata;
|
|
1300
1358
|
}
|
|
1301
1359
|
|
|
1302
1360
|
/**
|
|
@@ -1319,6 +1377,19 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1319
1377
|
this.deleteCore(op.key, local);
|
|
1320
1378
|
}
|
|
1321
1379
|
|
|
1380
|
+
/**
|
|
1381
|
+
* Apply delete operation locally and generate metadata
|
|
1382
|
+
* @param op - Op to apply
|
|
1383
|
+
* @returns metadata generated for stahed op
|
|
1384
|
+
*/
|
|
1385
|
+
public applyStashedDeleteMessage(op: IDirectoryDeleteOperation): IKeyEditLocalOpMetadata {
|
|
1386
|
+
this.throwIfDisposed();
|
|
1387
|
+
const previousValue = this.deleteCore(op.key, true);
|
|
1388
|
+
const pendingMessageId = this.getKeyMessageId(op);
|
|
1389
|
+
const localMetadata: IKeyEditLocalOpMetadata = { type: "edit", pendingMessageId, previousValue };
|
|
1390
|
+
return localMetadata;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1322
1393
|
/**
|
|
1323
1394
|
* Process a set operation.
|
|
1324
1395
|
* @param op - The op to process
|
|
@@ -1345,6 +1416,25 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1345
1416
|
this.setCore(op.key, context!, local);
|
|
1346
1417
|
}
|
|
1347
1418
|
|
|
1419
|
+
/**
|
|
1420
|
+
* Apply set operation locally and generate metadata
|
|
1421
|
+
* @param op - Op to apply
|
|
1422
|
+
* @returns metadata generated for stahed op
|
|
1423
|
+
*/
|
|
1424
|
+
public applyStashedSetMessage(op: IDirectorySetOperation, context: ILocalValue): IKeyEditLocalOpMetadata {
|
|
1425
|
+
this.throwIfDisposed();
|
|
1426
|
+
// Set the value locally.
|
|
1427
|
+
const previousValue = this.setCore(
|
|
1428
|
+
op.key,
|
|
1429
|
+
context,
|
|
1430
|
+
true,
|
|
1431
|
+
);
|
|
1432
|
+
|
|
1433
|
+
// Create metadata
|
|
1434
|
+
const pendingMessageId = this.getKeyMessageId(op);
|
|
1435
|
+
const localMetadata: IKeyEditLocalOpMetadata = { type: "edit", pendingMessageId, previousValue };
|
|
1436
|
+
return localMetadata;
|
|
1437
|
+
}
|
|
1348
1438
|
/**
|
|
1349
1439
|
* Process a create subdirectory operation.
|
|
1350
1440
|
* @param op - The op to process
|
|
@@ -1365,6 +1455,26 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1365
1455
|
this.createSubDirectoryCore(op.subdirName, local);
|
|
1366
1456
|
}
|
|
1367
1457
|
|
|
1458
|
+
/**
|
|
1459
|
+
* Apply createSubDirectory operation locally and generate metadata
|
|
1460
|
+
* @param op - Op to apply
|
|
1461
|
+
* @returns metadata generated for stahed op
|
|
1462
|
+
*/
|
|
1463
|
+
public applyStashedCreateSubDirMessage(op: IDirectoryCreateSubDirectoryOperation):
|
|
1464
|
+
ICreateSubDirLocalOpMetadata {
|
|
1465
|
+
this.throwIfDisposed();
|
|
1466
|
+
// Create the sub directory locally first.
|
|
1467
|
+
const isNew = this.createSubDirectoryCore(op.subdirName, true);
|
|
1468
|
+
const newMessageId = this.getSubDirMessageId(op);
|
|
1469
|
+
|
|
1470
|
+
const localOpMetadata: ICreateSubDirLocalOpMetadata = {
|
|
1471
|
+
type: "createSubDir",
|
|
1472
|
+
pendingMessageId: newMessageId,
|
|
1473
|
+
previouslyExisted: !isNew,
|
|
1474
|
+
};
|
|
1475
|
+
return localOpMetadata;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1368
1478
|
/**
|
|
1369
1479
|
* Process a delete subdirectory operation.
|
|
1370
1480
|
* @param op - The op to process
|
|
@@ -1385,6 +1495,23 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1385
1495
|
this.deleteSubDirectoryCore(op.subdirName, local);
|
|
1386
1496
|
}
|
|
1387
1497
|
|
|
1498
|
+
/**
|
|
1499
|
+
* Apply deleteSubDirectory operation locally and generate metadata
|
|
1500
|
+
* @param op - Op to apply
|
|
1501
|
+
* @returns metadata generated for stahed op
|
|
1502
|
+
*/
|
|
1503
|
+
public applyStashedDeleteSubDirMessage(op: IDirectoryDeleteSubDirectoryOperation): IDeleteSubDirLocalOpMetadata {
|
|
1504
|
+
this.throwIfDisposed();
|
|
1505
|
+
const subDir = this.deleteSubDirectoryCore(op.subdirName, true);
|
|
1506
|
+
const newMessageId = this.getSubDirMessageId(op);
|
|
1507
|
+
const metadata: IDeleteSubDirLocalOpMetadata = {
|
|
1508
|
+
type: "deleteSubDir",
|
|
1509
|
+
pendingMessageId: newMessageId,
|
|
1510
|
+
subDirectory: subDir,
|
|
1511
|
+
};
|
|
1512
|
+
return metadata;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1388
1515
|
/**
|
|
1389
1516
|
* Submit a clear operation.
|
|
1390
1517
|
* @param op - The operation
|
|
@@ -1744,7 +1871,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1744
1871
|
/**
|
|
1745
1872
|
* Clear all keys in memory in response to a remote clear, but retain keys we have modified but not yet been ack'd.
|
|
1746
1873
|
*/
|
|
1747
|
-
private clearExceptPendingKeys() {
|
|
1874
|
+
private clearExceptPendingKeys(local: boolean) {
|
|
1748
1875
|
// Assuming the pendingKeys is small and the map is large
|
|
1749
1876
|
// we will get the value for the pendingKeys and clear the map
|
|
1750
1877
|
const temp = new Map<string, ILocalValue>();
|
|
@@ -1752,7 +1879,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
|
|
|
1752
1879
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1753
1880
|
temp.set(key, this._storage.get(key)!);
|
|
1754
1881
|
});
|
|
1755
|
-
this.clearCore(
|
|
1882
|
+
this.clearCore(local);
|
|
1756
1883
|
temp.forEach((value, key, map) => {
|
|
1757
1884
|
this.setCore(key, value, true);
|
|
1758
1885
|
});
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,32 @@
|
|
|
15
15
|
* @packageDocumentation
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
export {
|
|
19
|
+
DirectoryFactory,
|
|
20
|
+
IDirectoryClearOperation,
|
|
21
|
+
IDirectoryCreateSubDirectoryOperation,
|
|
22
|
+
IDirectoryDataObject,
|
|
23
|
+
IDirectoryDeleteOperation,
|
|
24
|
+
IDirectoryDeleteSubDirectoryOperation,
|
|
25
|
+
IDirectoryKeyOperation,
|
|
26
|
+
IDirectoryNewStorageFormat,
|
|
27
|
+
IDirectoryOperation,
|
|
28
|
+
IDirectorySetOperation,
|
|
29
|
+
IDirectoryStorageOperation,
|
|
30
|
+
IDirectorySubDirectoryOperation,
|
|
31
|
+
SharedDirectory,
|
|
32
|
+
} from "./directory";
|
|
33
|
+
export {
|
|
34
|
+
IDirectory,
|
|
35
|
+
IDirectoryEvents,
|
|
36
|
+
IDirectoryValueChanged,
|
|
37
|
+
ISerializableValue,
|
|
38
|
+
ISerializedValue,
|
|
39
|
+
ISharedDirectory,
|
|
40
|
+
ISharedDirectoryEvents,
|
|
41
|
+
ISharedMap,
|
|
42
|
+
ISharedMapEvents,
|
|
43
|
+
IValueChanged,
|
|
44
|
+
} from "./interfaces";
|
|
21
45
|
export { LocalValueMaker, ILocalValue } from "./localValues";
|
|
46
|
+
export { MapFactory, SharedMap } from "./map";
|
package/src/interfaces.ts
CHANGED
|
@@ -308,7 +308,7 @@ export interface ISharedMapEvents extends ISharedObjectEvents {
|
|
|
308
308
|
* and retrieving values that JavaScript developers are accustomed to with the
|
|
309
309
|
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.
|
|
310
310
|
* However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a
|
|
311
|
-
* {@link @fluidframework/
|
|
311
|
+
* {@link @fluidframework/datastore#FluidObjectHandle}.
|
|
312
312
|
*
|
|
313
313
|
* For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
|
|
314
314
|
*/
|
package/src/packageVersion.ts
CHANGED