@fluidframework/map 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.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/CHANGELOG.md +44 -0
- package/api-report/map.api.md +17 -158
- package/dist/directory.d.ts +7 -51
- package/dist/directory.d.ts.map +1 -1
- package/dist/directory.js +39 -107
- package/dist/directory.js.map +1 -1
- package/dist/directoryFactory.d.ts +54 -0
- package/dist/directoryFactory.d.ts.map +1 -0
- package/dist/directoryFactory.js +91 -0
- package/dist/directoryFactory.js.map +1 -0
- package/dist/index.d.ts +3 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -55
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +7 -57
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/internalInterfaces.d.ts +50 -1
- package/dist/internalInterfaces.d.ts.map +1 -1
- package/dist/internalInterfaces.js.map +1 -1
- package/dist/legacy.d.ts +25 -0
- package/dist/localValues.d.ts +1 -1
- package/dist/localValues.d.ts.map +1 -1
- package/dist/localValues.js +6 -6
- package/dist/localValues.js.map +1 -1
- package/dist/map.d.ts +4 -36
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +9 -60
- package/dist/map.js.map +1 -1
- package/dist/mapFactory.d.ts +52 -0
- package/dist/mapFactory.d.ts.map +1 -0
- package/dist/mapFactory.js +71 -0
- package/dist/mapFactory.js.map +1 -0
- package/dist/mapKernel.d.ts +3 -3
- package/dist/mapKernel.d.ts.map +1 -1
- package/dist/mapKernel.js +14 -14
- package/dist/mapKernel.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/dist/public.d.ts +12 -0
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/directory.d.ts +7 -51
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.js +6 -73
- package/lib/directory.js.map +1 -1
- package/lib/directoryFactory.d.ts +54 -0
- package/lib/directoryFactory.d.ts.map +1 -0
- package/lib/directoryFactory.js +87 -0
- package/lib/directoryFactory.js.map +1 -0
- package/lib/index.d.ts +3 -45
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -50
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +7 -57
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/internalInterfaces.d.ts +50 -1
- package/lib/internalInterfaces.d.ts.map +1 -1
- package/lib/internalInterfaces.js.map +1 -1
- package/lib/legacy.d.ts +25 -0
- package/lib/localValues.d.ts +1 -1
- package/lib/localValues.d.ts.map +1 -1
- package/lib/localValues.js +1 -1
- package/lib/localValues.js.map +1 -1
- package/lib/map.d.ts +4 -36
- package/lib/map.d.ts.map +1 -1
- package/lib/map.js +4 -54
- package/lib/map.js.map +1 -1
- package/lib/mapFactory.d.ts +52 -0
- package/lib/mapFactory.d.ts.map +1 -0
- package/lib/mapFactory.js +67 -0
- package/lib/mapFactory.js.map +1 -0
- package/lib/mapKernel.d.ts +3 -3
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/mapKernel.js +2 -2
- package/lib/mapKernel.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/lib/public.d.ts +12 -0
- package/package.json +105 -59
- package/src/directory.ts +16 -100
- package/src/directoryFactory.ts +120 -0
- package/src/index.ts +2 -73
- package/src/interfaces.ts +7 -62
- package/src/internalInterfaces.ts +55 -2
- package/src/localValues.ts +6 -5
- package/src/map.ts +8 -71
- package/src/mapFactory.ts +101 -0
- package/src/mapKernel.ts +13 -9
- package/src/packageVersion.ts +1 -1
- package/api-extractor-cjs.json +0 -8
- package/dist/map-alpha.d.ts +0 -898
- package/dist/map-beta.d.ts +0 -195
- package/dist/map-public.d.ts +0 -195
- package/dist/map-untrimmed.d.ts +0 -912
- package/lib/map-alpha.d.ts +0 -898
- package/lib/map-beta.d.ts +0 -195
- package/lib/map-public.d.ts +0 -195
- package/lib/map-untrimmed.d.ts +0 -912
- package/lib/test/memory/directory.spec.js +0 -71
- package/lib/test/memory/directory.spec.js.map +0 -1
- package/lib/test/memory/map.spec.js +0 -71
- package/lib/test/memory/map.spec.js.map +0 -1
- package/lib/test/mocha/directory.order.spec.js +0 -422
- package/lib/test/mocha/directory.order.spec.js.map +0 -1
- package/lib/test/mocha/directory.snapshot.spec.js +0 -111
- package/lib/test/mocha/directory.snapshot.spec.js.map +0 -1
- package/lib/test/mocha/directory.spec.js +0 -1406
- package/lib/test/mocha/directory.spec.js.map +0 -1
- package/lib/test/mocha/directoryEquivalenceUtils.js +0 -36
- package/lib/test/mocha/directoryEquivalenceUtils.js.map +0 -1
- package/lib/test/mocha/directoryFuzzTests.spec.js +0 -337
- package/lib/test/mocha/directoryFuzzTests.spec.js.map +0 -1
- package/lib/test/mocha/dirname.cjs +0 -16
- package/lib/test/mocha/dirname.cjs.map +0 -1
- package/lib/test/mocha/map.fuzz.spec.js +0 -114
- package/lib/test/mocha/map.fuzz.spec.js.map +0 -1
- package/lib/test/mocha/map.spec.js +0 -685
- package/lib/test/mocha/map.spec.js.map +0 -1
- package/lib/test/mocha/rebasing.spec.js +0 -158
- package/lib/test/mocha/rebasing.spec.js.map +0 -1
- package/lib/test/mocha/reconnection.spec.js +0 -327
- package/lib/test/mocha/reconnection.spec.js.map +0 -1
- package/lib/test/types/validateMapPrevious.generated.js +0 -66
- package/lib/test/types/validateMapPrevious.generated.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/lib/map-beta.d.ts
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `map` library provides interfaces and implementing classes for map-like distributed data structures.
|
|
3
|
-
*
|
|
4
|
-
* @remarks The following distributed data structures are defined in this library:
|
|
5
|
-
*
|
|
6
|
-
* - {@link SharedMap}
|
|
7
|
-
*
|
|
8
|
-
* - {@link SharedDirectory}
|
|
9
|
-
*
|
|
10
|
-
* @packageDocumentation
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
14
|
-
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
15
|
-
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
16
|
-
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
17
|
-
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
18
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
19
|
-
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
|
|
21
|
-
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
23
|
-
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
24
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
26
|
-
import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
|
|
27
|
-
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
28
|
-
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
29
|
-
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
30
|
-
|
|
31
|
-
/* Excluded from this release type: DirectoryFactory */
|
|
32
|
-
|
|
33
|
-
/* Excluded from this release type: ICreateInfo */
|
|
34
|
-
|
|
35
|
-
/* Excluded from this release type: IDirectory */
|
|
36
|
-
|
|
37
|
-
/* Excluded from this release type: IDirectoryClearOperation */
|
|
38
|
-
|
|
39
|
-
/* Excluded from this release type: IDirectoryCreateSubDirectoryOperation */
|
|
40
|
-
|
|
41
|
-
/* Excluded from this release type: IDirectoryDataObject */
|
|
42
|
-
|
|
43
|
-
/* Excluded from this release type: IDirectoryDeleteOperation */
|
|
44
|
-
|
|
45
|
-
/* Excluded from this release type: IDirectoryDeleteSubDirectoryOperation */
|
|
46
|
-
|
|
47
|
-
/* Excluded from this release type: IDirectoryEvents */
|
|
48
|
-
|
|
49
|
-
/* Excluded from this release type: IDirectoryKeyOperation */
|
|
50
|
-
|
|
51
|
-
/* Excluded from this release type: IDirectoryNewStorageFormat */
|
|
52
|
-
|
|
53
|
-
/* Excluded from this release type: IDirectoryOperation */
|
|
54
|
-
|
|
55
|
-
/* Excluded from this release type: IDirectorySetOperation */
|
|
56
|
-
|
|
57
|
-
/* Excluded from this release type: IDirectoryStorageOperation */
|
|
58
|
-
|
|
59
|
-
/* Excluded from this release type: IDirectorySubDirectoryOperation */
|
|
60
|
-
|
|
61
|
-
/* Excluded from this release type: IDirectoryValueChanged */
|
|
62
|
-
|
|
63
|
-
/* Excluded from this release type: ILocalValue */
|
|
64
|
-
|
|
65
|
-
/* Excluded from this release type: ISerializableValue */
|
|
66
|
-
|
|
67
|
-
/* Excluded from this release type: ISerializedValue */
|
|
68
|
-
|
|
69
|
-
/* Excluded from this release type: ISharedDirectory */
|
|
70
|
-
|
|
71
|
-
/* Excluded from this release type: ISharedDirectoryEvents */
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting
|
|
75
|
-
* and retrieving values that JavaScript developers are accustomed to with the
|
|
76
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.
|
|
77
|
-
* However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a
|
|
78
|
-
* {@link @fluidframework/datastore#FluidObjectHandle}.
|
|
79
|
-
*
|
|
80
|
-
* For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
|
|
81
|
-
* @sealed
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
export declare interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
|
|
85
|
-
/**
|
|
86
|
-
* Retrieves the given key from the map if it exists.
|
|
87
|
-
* @param key - Key to retrieve from
|
|
88
|
-
* @returns The stored value, or undefined if the key is not set
|
|
89
|
-
*/
|
|
90
|
-
get<T = any>(key: string): T | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Sets the value stored at key to the provided value.
|
|
93
|
-
* @param key - Key to set
|
|
94
|
-
* @param value - Value to set
|
|
95
|
-
* @returns The {@link ISharedMap} itself
|
|
96
|
-
*/
|
|
97
|
-
set<T = unknown>(key: string, value: T): this;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Events emitted in response to changes to the {@link ISharedMap | map} data.
|
|
102
|
-
* @sealed
|
|
103
|
-
* @public
|
|
104
|
-
*/
|
|
105
|
-
export declare interface ISharedMapEvents extends ISharedObjectEvents {
|
|
106
|
-
/**
|
|
107
|
-
* Emitted when a key is set or deleted.
|
|
108
|
-
*
|
|
109
|
-
* @remarks Listener parameters:
|
|
110
|
-
*
|
|
111
|
-
* - `changed` - Information on the key that changed and its value prior to the change.
|
|
112
|
-
*
|
|
113
|
-
* - `local` - Whether the change originated from this client.
|
|
114
|
-
*
|
|
115
|
-
* - `target` - The {@link ISharedMap} itself.
|
|
116
|
-
*/
|
|
117
|
-
(event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
118
|
-
/**
|
|
119
|
-
* Emitted when the map is cleared.
|
|
120
|
-
*
|
|
121
|
-
* @remarks Listener parameters:
|
|
122
|
-
*
|
|
123
|
-
* - `local` - Whether the clear originated from this client.
|
|
124
|
-
*
|
|
125
|
-
* - `target` - The {@link ISharedMap} itself.
|
|
126
|
-
*/
|
|
127
|
-
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Type of "valueChanged" event parameter.
|
|
132
|
-
* @sealed
|
|
133
|
-
* @public
|
|
134
|
-
*/
|
|
135
|
-
export declare interface IValueChanged {
|
|
136
|
-
/**
|
|
137
|
-
* The key storing the value that changed.
|
|
138
|
-
*/
|
|
139
|
-
key: string;
|
|
140
|
-
/**
|
|
141
|
-
* The value that was stored at the key prior to the change.
|
|
142
|
-
*/
|
|
143
|
-
previousValue: any;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* Excluded from this release type: LocalValueMaker */
|
|
147
|
-
|
|
148
|
-
/* Excluded from this release type: MapFactory */
|
|
149
|
-
|
|
150
|
-
/* Excluded from this release type: SharedDirectory */
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* {@inheritDoc ISharedMap}
|
|
154
|
-
* @public
|
|
155
|
-
* @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
|
|
156
|
-
*/
|
|
157
|
-
export declare const SharedMap: {
|
|
158
|
-
/**
|
|
159
|
-
* Get a factory for SharedMap to register with the data store.
|
|
160
|
-
* @returns A factory that creates SharedMaps and loads them from storage.
|
|
161
|
-
*/
|
|
162
|
-
getFactory(): IChannelFactory<ISharedMap>;
|
|
163
|
-
/**
|
|
164
|
-
* Create a new shared map.
|
|
165
|
-
* @param runtime - The data store runtime that the new shared map belongs to.
|
|
166
|
-
* @param id - Optional name of the shared map.
|
|
167
|
-
* @returns Newly created shared map.
|
|
168
|
-
*
|
|
169
|
-
* @example
|
|
170
|
-
* To create a `SharedMap`, call the static create method:
|
|
171
|
-
*
|
|
172
|
-
* ```typescript
|
|
173
|
-
* const myMap = SharedMap.create(this.runtime, id);
|
|
174
|
-
* ```
|
|
175
|
-
* @privateRemarks
|
|
176
|
-
* TODO:
|
|
177
|
-
* Clarify how this differs from `MapFactory.create`.
|
|
178
|
-
* They are different since making this forward to MapFactory.create breaks some things,
|
|
179
|
-
* but the difference is unclear from the documentation.
|
|
180
|
-
*/
|
|
181
|
-
create(runtime: IFluidDataStoreRuntime, id?: string): ISharedMap;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* {@inheritDoc ISharedMap}
|
|
186
|
-
* @public
|
|
187
|
-
* @deprecated Use ISharedMap instead.
|
|
188
|
-
* @privateRemarks
|
|
189
|
-
* This alias is for legacy compat from when the SharedMap class was exported as public.
|
|
190
|
-
*/
|
|
191
|
-
export declare type SharedMap = ISharedMap;
|
|
192
|
-
|
|
193
|
-
/* Excluded from this release type: SharedObject */
|
|
194
|
-
|
|
195
|
-
export { }
|
package/lib/map-public.d.ts
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `map` library provides interfaces and implementing classes for map-like distributed data structures.
|
|
3
|
-
*
|
|
4
|
-
* @remarks The following distributed data structures are defined in this library:
|
|
5
|
-
*
|
|
6
|
-
* - {@link SharedMap}
|
|
7
|
-
*
|
|
8
|
-
* - {@link SharedDirectory}
|
|
9
|
-
*
|
|
10
|
-
* @packageDocumentation
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
14
|
-
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
15
|
-
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
16
|
-
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
17
|
-
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
18
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
19
|
-
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
|
|
21
|
-
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
23
|
-
import { IFluidSerializer } from '@fluidframework/shared-object-base';
|
|
24
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import { ISharedObject } from '@fluidframework/shared-object-base';
|
|
26
|
-
import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
|
|
27
|
-
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
28
|
-
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
29
|
-
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
30
|
-
|
|
31
|
-
/* Excluded from this release type: DirectoryFactory */
|
|
32
|
-
|
|
33
|
-
/* Excluded from this release type: ICreateInfo */
|
|
34
|
-
|
|
35
|
-
/* Excluded from this release type: IDirectory */
|
|
36
|
-
|
|
37
|
-
/* Excluded from this release type: IDirectoryClearOperation */
|
|
38
|
-
|
|
39
|
-
/* Excluded from this release type: IDirectoryCreateSubDirectoryOperation */
|
|
40
|
-
|
|
41
|
-
/* Excluded from this release type: IDirectoryDataObject */
|
|
42
|
-
|
|
43
|
-
/* Excluded from this release type: IDirectoryDeleteOperation */
|
|
44
|
-
|
|
45
|
-
/* Excluded from this release type: IDirectoryDeleteSubDirectoryOperation */
|
|
46
|
-
|
|
47
|
-
/* Excluded from this release type: IDirectoryEvents */
|
|
48
|
-
|
|
49
|
-
/* Excluded from this release type: IDirectoryKeyOperation */
|
|
50
|
-
|
|
51
|
-
/* Excluded from this release type: IDirectoryNewStorageFormat */
|
|
52
|
-
|
|
53
|
-
/* Excluded from this release type: IDirectoryOperation */
|
|
54
|
-
|
|
55
|
-
/* Excluded from this release type: IDirectorySetOperation */
|
|
56
|
-
|
|
57
|
-
/* Excluded from this release type: IDirectoryStorageOperation */
|
|
58
|
-
|
|
59
|
-
/* Excluded from this release type: IDirectorySubDirectoryOperation */
|
|
60
|
-
|
|
61
|
-
/* Excluded from this release type: IDirectoryValueChanged */
|
|
62
|
-
|
|
63
|
-
/* Excluded from this release type: ILocalValue */
|
|
64
|
-
|
|
65
|
-
/* Excluded from this release type: ISerializableValue */
|
|
66
|
-
|
|
67
|
-
/* Excluded from this release type: ISerializedValue */
|
|
68
|
-
|
|
69
|
-
/* Excluded from this release type: ISharedDirectory */
|
|
70
|
-
|
|
71
|
-
/* Excluded from this release type: ISharedDirectoryEvents */
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting
|
|
75
|
-
* and retrieving values that JavaScript developers are accustomed to with the
|
|
76
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.
|
|
77
|
-
* However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a
|
|
78
|
-
* {@link @fluidframework/datastore#FluidObjectHandle}.
|
|
79
|
-
*
|
|
80
|
-
* For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
|
|
81
|
-
* @sealed
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
export declare interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
|
|
85
|
-
/**
|
|
86
|
-
* Retrieves the given key from the map if it exists.
|
|
87
|
-
* @param key - Key to retrieve from
|
|
88
|
-
* @returns The stored value, or undefined if the key is not set
|
|
89
|
-
*/
|
|
90
|
-
get<T = any>(key: string): T | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Sets the value stored at key to the provided value.
|
|
93
|
-
* @param key - Key to set
|
|
94
|
-
* @param value - Value to set
|
|
95
|
-
* @returns The {@link ISharedMap} itself
|
|
96
|
-
*/
|
|
97
|
-
set<T = unknown>(key: string, value: T): this;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Events emitted in response to changes to the {@link ISharedMap | map} data.
|
|
102
|
-
* @sealed
|
|
103
|
-
* @public
|
|
104
|
-
*/
|
|
105
|
-
export declare interface ISharedMapEvents extends ISharedObjectEvents {
|
|
106
|
-
/**
|
|
107
|
-
* Emitted when a key is set or deleted.
|
|
108
|
-
*
|
|
109
|
-
* @remarks Listener parameters:
|
|
110
|
-
*
|
|
111
|
-
* - `changed` - Information on the key that changed and its value prior to the change.
|
|
112
|
-
*
|
|
113
|
-
* - `local` - Whether the change originated from this client.
|
|
114
|
-
*
|
|
115
|
-
* - `target` - The {@link ISharedMap} itself.
|
|
116
|
-
*/
|
|
117
|
-
(event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
118
|
-
/**
|
|
119
|
-
* Emitted when the map is cleared.
|
|
120
|
-
*
|
|
121
|
-
* @remarks Listener parameters:
|
|
122
|
-
*
|
|
123
|
-
* - `local` - Whether the clear originated from this client.
|
|
124
|
-
*
|
|
125
|
-
* - `target` - The {@link ISharedMap} itself.
|
|
126
|
-
*/
|
|
127
|
-
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Type of "valueChanged" event parameter.
|
|
132
|
-
* @sealed
|
|
133
|
-
* @public
|
|
134
|
-
*/
|
|
135
|
-
export declare interface IValueChanged {
|
|
136
|
-
/**
|
|
137
|
-
* The key storing the value that changed.
|
|
138
|
-
*/
|
|
139
|
-
key: string;
|
|
140
|
-
/**
|
|
141
|
-
* The value that was stored at the key prior to the change.
|
|
142
|
-
*/
|
|
143
|
-
previousValue: any;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* Excluded from this release type: LocalValueMaker */
|
|
147
|
-
|
|
148
|
-
/* Excluded from this release type: MapFactory */
|
|
149
|
-
|
|
150
|
-
/* Excluded from this release type: SharedDirectory */
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* {@inheritDoc ISharedMap}
|
|
154
|
-
* @public
|
|
155
|
-
* @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
|
|
156
|
-
*/
|
|
157
|
-
export declare const SharedMap: {
|
|
158
|
-
/**
|
|
159
|
-
* Get a factory for SharedMap to register with the data store.
|
|
160
|
-
* @returns A factory that creates SharedMaps and loads them from storage.
|
|
161
|
-
*/
|
|
162
|
-
getFactory(): IChannelFactory<ISharedMap>;
|
|
163
|
-
/**
|
|
164
|
-
* Create a new shared map.
|
|
165
|
-
* @param runtime - The data store runtime that the new shared map belongs to.
|
|
166
|
-
* @param id - Optional name of the shared map.
|
|
167
|
-
* @returns Newly created shared map.
|
|
168
|
-
*
|
|
169
|
-
* @example
|
|
170
|
-
* To create a `SharedMap`, call the static create method:
|
|
171
|
-
*
|
|
172
|
-
* ```typescript
|
|
173
|
-
* const myMap = SharedMap.create(this.runtime, id);
|
|
174
|
-
* ```
|
|
175
|
-
* @privateRemarks
|
|
176
|
-
* TODO:
|
|
177
|
-
* Clarify how this differs from `MapFactory.create`.
|
|
178
|
-
* They are different since making this forward to MapFactory.create breaks some things,
|
|
179
|
-
* but the difference is unclear from the documentation.
|
|
180
|
-
*/
|
|
181
|
-
create(runtime: IFluidDataStoreRuntime, id?: string): ISharedMap;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* {@inheritDoc ISharedMap}
|
|
186
|
-
* @public
|
|
187
|
-
* @deprecated Use ISharedMap instead.
|
|
188
|
-
* @privateRemarks
|
|
189
|
-
* This alias is for legacy compat from when the SharedMap class was exported as public.
|
|
190
|
-
*/
|
|
191
|
-
export declare type SharedMap = ISharedMap;
|
|
192
|
-
|
|
193
|
-
/* Excluded from this release type: SharedObject */
|
|
194
|
-
|
|
195
|
-
export { }
|