@fluidframework/map 2.0.0-dev-rc.3.0.0.254274 → 2.0.0-dev-rc.3.0.0.254674

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.
@@ -1,411 +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 type { IChannelAttributes } from '@fluidframework/datastore-definitions';
14
- import type { IChannelFactory } from '@fluidframework/datastore-definitions';
15
- import type { IChannelServices } from '@fluidframework/datastore-definitions';
16
- import { IDisposable } from '@fluidframework/core-interfaces';
17
- import { IEvent } from '@fluidframework/core-interfaces';
18
- import { IEventProvider } from '@fluidframework/core-interfaces';
19
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
20
- import type { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
21
- import { ISharedObject } from '@fluidframework/shared-object-base';
22
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
23
- import type { ISharedObjectKind } from '@fluidframework/shared-object-base';
24
-
25
- /**
26
- * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.
27
- *
28
- * @sealed
29
- * @alpha
30
- */
31
- export declare class DirectoryFactory implements IChannelFactory<ISharedDirectory> {
32
- /**
33
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
34
- */
35
- static readonly Type = "https://graph.microsoft.com/types/directory";
36
- /**
37
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
38
- */
39
- static readonly Attributes: IChannelAttributes;
40
- /**
41
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
42
- */
43
- get type(): string;
44
- /**
45
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
46
- */
47
- get attributes(): IChannelAttributes;
48
- /**
49
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
50
- */
51
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedDirectory>;
52
- /**
53
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
54
- */
55
- create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory;
56
- }
57
-
58
- /**
59
- * Interface describing actions on a directory.
60
- *
61
- * @remarks When used as a Map, operates on its keys.
62
- * @alpha
63
- */
64
- export declare interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
65
- /**
66
- * The absolute path of the directory.
67
- */
68
- readonly absolutePath: string;
69
- /**
70
- * Retrieves the value stored at the given key from the directory.
71
- * @param key - Key to retrieve from
72
- * @returns The stored value, or undefined if the key is not set
73
- */
74
- get<T = any>(key: string): T | undefined;
75
- /**
76
- * Sets the value stored at key to the provided value.
77
- * @param key - Key to set at
78
- * @param value - Value to set
79
- * @returns The IDirectory itself
80
- */
81
- set<T = unknown>(key: string, value: T): this;
82
- /**
83
- * Get the number of sub directory within the directory.
84
- * @returns The number of sub directory within a directory.
85
- */
86
- countSubDirectory?(): number;
87
- /**
88
- * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the
89
- * same name already exists.
90
- * @param subdirName - Name of the new child directory to create
91
- * @returns The IDirectory child that was created or retrieved
92
- */
93
- createSubDirectory(subdirName: string): IDirectory;
94
- /**
95
- * Gets an IDirectory child of this IDirectory, if it exists.
96
- * @param subdirName - Name of the child directory to get
97
- * @returns The requested IDirectory
98
- */
99
- getSubDirectory(subdirName: string): IDirectory | undefined;
100
- /**
101
- * Checks whether this directory has a child directory with the given name.
102
- * @param subdirName - Name of the child directory to check
103
- * @returns True if it exists, false otherwise
104
- */
105
- hasSubDirectory(subdirName: string): boolean;
106
- /**
107
- * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.
108
- * @param subdirName - Name of the child directory to delete
109
- * @returns True if the IDirectory existed and was deleted, false if it did not exist
110
- */
111
- deleteSubDirectory(subdirName: string): boolean;
112
- /**
113
- * Gets an iterator over the IDirectory children of this IDirectory.
114
- * @returns The IDirectory iterator
115
- */
116
- subdirectories(): IterableIterator<[string, IDirectory]>;
117
- /**
118
- * Get an IDirectory within the directory, in order to use relative paths from that location.
119
- * @param relativePath - Path of the IDirectory to get, relative to this IDirectory
120
- * @returns The requested IDirectory
121
- */
122
- getWorkingDirectory(relativePath: string): IDirectory | undefined;
123
- }
124
-
125
- /**
126
- * Events emitted in response to changes to the directory data.
127
- * @alpha
128
- */
129
- export declare interface IDirectoryEvents extends IEvent {
130
- /**
131
- * Emitted when a key is set or deleted. As opposed to the
132
- * {@link ISharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly
133
- * contains the key.
134
- *
135
- * @remarks Listener parameters:
136
- *
137
- * - `changed` - Information on the key that changed and its value prior to the change.
138
- *
139
- * - `local` - Whether the change originated from this client.
140
- *
141
- * - `target` - The {@link IDirectory} itself.
142
- */
143
- (event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
144
- /**
145
- * Emitted when a subdirectory is created. Also emitted when a delete
146
- * of a subdirectory is rolled back.
147
- *
148
- * @remarks Listener parameters:
149
- *
150
- * - `path` - The relative path to the subdirectory that is created.
151
- * It is relative from the object which raises the event.
152
- *
153
- * - `local` - Whether the creation originated from the this client.
154
- *
155
- * - `target` - The {@link ISharedDirectory} itself.
156
- */
157
- (event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
158
- /**
159
- * Emitted when a subdirectory is deleted.
160
- *
161
- * @remarks Listener parameters:
162
- *
163
- * - `path` - The relative path to the subdirectory that is deleted.
164
- * It is relative from the object which raises the event.
165
- *
166
- * - `local` - Whether the delete originated from the this client.
167
- *
168
- * - `target` - The {@link ISharedDirectory} itself.
169
- */
170
- (event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
171
- /**
172
- * Emitted when this sub directory is deleted.
173
- *
174
- * @remarks Listener parameters:
175
- *
176
- * - `target` - The {@link IDirectory} itself.
177
- */
178
- (event: "disposed", listener: (target: IEventThisPlaceHolder) => void): any;
179
- /**
180
- * Emitted when this previously deleted sub directory is restored.
181
- * This event only needs to be handled in the case of rollback. If your application does
182
- * not use the local rollback feature, you can ignore this event.
183
- *
184
- * @remarks Listener parameters:
185
- *
186
- * - `target` - The {@link IDirectory} itself.
187
- */
188
- (event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;
189
- }
190
-
191
- /**
192
- * Type of "valueChanged" event parameter for {@link ISharedDirectory}.
193
- * @alpha
194
- */
195
- export declare interface IDirectoryValueChanged extends IValueChanged {
196
- /**
197
- * The absolute path to the IDirectory storing the key which changed.
198
- */
199
- path: string;
200
- }
201
-
202
- /**
203
- * Provides a hierarchical organization of map-like data structures as SubDirectories.
204
- * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.
205
- * SubDirectories can be retrieved for use as working directories.
206
- * @alpha
207
- */
208
- export declare interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
209
- [Symbol.iterator](): IterableIterator<[string, any]>;
210
- readonly [Symbol.toStringTag]: string;
211
- }
212
-
213
- /**
214
- * Events emitted in response to changes to the directory data.
215
- *
216
- * @remarks
217
- * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.
218
- * @alpha
219
- */
220
- export declare interface ISharedDirectoryEvents extends ISharedObjectEvents {
221
- /**
222
- * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any
223
- * subdirectory.
224
- *
225
- * @remarks Listener parameters:
226
- *
227
- * - `changed` - Information on the key that changed, its value prior to the change, and the path to the
228
- * key that changed.
229
- *
230
- * - `local` - Whether the change originated from this client.
231
- *
232
- * - `target` - The {@link ISharedDirectory} itself.
233
- */
234
- (event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
235
- /**
236
- * Emitted when the {@link ISharedDirectory} is cleared.
237
- *
238
- * @remarks Listener parameters:
239
- *
240
- * - `local` - Whether the clear originated from this client.
241
- *
242
- * - `target` - The {@link ISharedDirectory} itself.
243
- */
244
- (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
245
- /**
246
- * Emitted when a subdirectory is created.
247
- *
248
- * @remarks Listener parameters:
249
- *
250
- * - `path` - The relative path to the subdirectory that is created.
251
- * It is relative from the object which raises the event.
252
- *
253
- * - `local` - Whether the create originated from the this client.
254
- *
255
- * - `target` - The {@link ISharedDirectory} itself.
256
- */
257
- (event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
258
- /**
259
- * Emitted when a subdirectory is deleted.
260
- *
261
- * @remarks Listener parameters:
262
- *
263
- * - `path` - The relative path to the subdirectory that is deleted.
264
- * It is relative from the object which raises the event.
265
- *
266
- * - `local` - Whether the delete originated from the this client.
267
- *
268
- * - `target` - The {@link ISharedDirectory} itself.
269
- */
270
- (event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
271
- }
272
-
273
- /**
274
- * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting
275
- * and retrieving values that JavaScript developers are accustomed to with the
276
- * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.
277
- * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a
278
- * {@link @fluidframework/datastore#FluidObjectHandle}.
279
- *
280
- * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
281
- * @sealed
282
- * @public
283
- */
284
- export declare interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
285
- /**
286
- * Retrieves the given key from the map if it exists.
287
- * @param key - Key to retrieve from
288
- * @returns The stored value, or undefined if the key is not set
289
- */
290
- get<T = any>(key: string): T | undefined;
291
- /**
292
- * Sets the value stored at key to the provided value.
293
- * @param key - Key to set
294
- * @param value - Value to set
295
- * @returns The {@link ISharedMap} itself
296
- */
297
- set<T = unknown>(key: string, value: T): this;
298
- }
299
-
300
- /**
301
- * Events emitted in response to changes to the {@link ISharedMap | map} data.
302
- * @sealed
303
- * @public
304
- */
305
- export declare interface ISharedMapEvents extends ISharedObjectEvents {
306
- /**
307
- * Emitted when a key is set or deleted.
308
- *
309
- * @remarks Listener parameters:
310
- *
311
- * - `changed` - Information on the key that changed and its value prior to the change.
312
- *
313
- * - `local` - Whether the change originated from this client.
314
- *
315
- * - `target` - The {@link ISharedMap} itself.
316
- */
317
- (event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
318
- /**
319
- * Emitted when the map is cleared.
320
- *
321
- * @remarks Listener parameters:
322
- *
323
- * - `local` - Whether the clear originated from this client.
324
- *
325
- * - `target` - The {@link ISharedMap} itself.
326
- */
327
- (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
328
- }
329
-
330
- /**
331
- * Type of "valueChanged" event parameter.
332
- * @sealed
333
- * @public
334
- */
335
- export declare interface IValueChanged {
336
- /**
337
- * The key storing the value that changed.
338
- */
339
- readonly key: string;
340
- /**
341
- * The value that was stored at the key prior to the change.
342
- */
343
- readonly previousValue: any;
344
- }
345
-
346
- /**
347
- * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.
348
- *
349
- * @sealed
350
- * @alpha
351
- */
352
- export declare class MapFactory implements IChannelFactory<ISharedMap> {
353
- /**
354
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
355
- */
356
- static readonly Type = "https://graph.microsoft.com/types/map";
357
- /**
358
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
359
- */
360
- static readonly Attributes: IChannelAttributes;
361
- /**
362
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
363
- */
364
- get type(): string;
365
- /**
366
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
367
- */
368
- get attributes(): IChannelAttributes;
369
- /**
370
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
371
- */
372
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedMap>;
373
- /**
374
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
375
- */
376
- create(runtime: IFluidDataStoreRuntime, id: string): ISharedMap;
377
- }
378
-
379
- /**
380
- * Entrypoint for {@link ISharedDirectory} creation.
381
- * @sealed
382
- * @alpha
383
- */
384
- export declare const SharedDirectory: ISharedObjectKind<ISharedDirectory>;
385
-
386
- /**
387
- * Entrypoint for {@link ISharedDirectory} creation.
388
- * @alpha
389
- * @deprecated Use ISharedDirectory instead.
390
- * @privateRemarks
391
- * This alias is for legacy compat from when the SharedDirectory class was exported as public.
392
- */
393
- export declare type SharedDirectory = ISharedDirectory;
394
-
395
- /**
396
- * Entrypoint for {@link ISharedMap} creation.
397
- * @public
398
- * @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
399
- */
400
- export declare const SharedMap: ISharedObjectKind<ISharedMap>;
401
-
402
- /**
403
- * Entrypoint for {@link ISharedMap} creation.
404
- * @public
405
- * @deprecated Use ISharedMap instead.
406
- * @privateRemarks
407
- * This alias is for legacy compat from when the SharedMap class was exported as public.
408
- */
409
- export declare type SharedMap = ISharedMap;
410
-
411
- export { }
@@ -1,130 +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 type { IChannelAttributes } from '@fluidframework/datastore-definitions';
14
- import type { IChannelFactory } from '@fluidframework/datastore-definitions';
15
- import type { IChannelServices } from '@fluidframework/datastore-definitions';
16
- import { IDisposable } from '@fluidframework/core-interfaces';
17
- import { IEvent } from '@fluidframework/core-interfaces';
18
- import { IEventProvider } from '@fluidframework/core-interfaces';
19
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
20
- import type { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
21
- import { ISharedObject } from '@fluidframework/shared-object-base';
22
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
23
- import type { ISharedObjectKind } from '@fluidframework/shared-object-base';
24
-
25
- /* Excluded from this release type: DirectoryFactory */
26
-
27
- /* Excluded from this release type: IDirectory */
28
-
29
- /* Excluded from this release type: IDirectoryEvents */
30
-
31
- /* Excluded from this release type: IDirectoryValueChanged */
32
-
33
- /* Excluded from this release type: ISharedDirectory */
34
-
35
- /* Excluded from this release type: ISharedDirectoryEvents */
36
-
37
- /**
38
- * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting
39
- * and retrieving values that JavaScript developers are accustomed to with the
40
- * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.
41
- * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a
42
- * {@link @fluidframework/datastore#FluidObjectHandle}.
43
- *
44
- * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
45
- * @sealed
46
- * @public
47
- */
48
- export declare interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
49
- /**
50
- * Retrieves the given key from the map if it exists.
51
- * @param key - Key to retrieve from
52
- * @returns The stored value, or undefined if the key is not set
53
- */
54
- get<T = any>(key: string): T | undefined;
55
- /**
56
- * Sets the value stored at key to the provided value.
57
- * @param key - Key to set
58
- * @param value - Value to set
59
- * @returns The {@link ISharedMap} itself
60
- */
61
- set<T = unknown>(key: string, value: T): this;
62
- }
63
-
64
- /**
65
- * Events emitted in response to changes to the {@link ISharedMap | map} data.
66
- * @sealed
67
- * @public
68
- */
69
- export declare interface ISharedMapEvents extends ISharedObjectEvents {
70
- /**
71
- * Emitted when a key is set or deleted.
72
- *
73
- * @remarks Listener parameters:
74
- *
75
- * - `changed` - Information on the key that changed and its value prior to the change.
76
- *
77
- * - `local` - Whether the change originated from this client.
78
- *
79
- * - `target` - The {@link ISharedMap} itself.
80
- */
81
- (event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
82
- /**
83
- * Emitted when the map is cleared.
84
- *
85
- * @remarks Listener parameters:
86
- *
87
- * - `local` - Whether the clear originated from this client.
88
- *
89
- * - `target` - The {@link ISharedMap} itself.
90
- */
91
- (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
92
- }
93
-
94
- /**
95
- * Type of "valueChanged" event parameter.
96
- * @sealed
97
- * @public
98
- */
99
- export declare interface IValueChanged {
100
- /**
101
- * The key storing the value that changed.
102
- */
103
- readonly key: string;
104
- /**
105
- * The value that was stored at the key prior to the change.
106
- */
107
- readonly previousValue: any;
108
- }
109
-
110
- /* Excluded from this release type: MapFactory */
111
-
112
- /* Excluded from this release type: SharedDirectory */
113
-
114
- /**
115
- * Entrypoint for {@link ISharedMap} creation.
116
- * @public
117
- * @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
118
- */
119
- export declare const SharedMap: ISharedObjectKind<ISharedMap>;
120
-
121
- /**
122
- * Entrypoint for {@link ISharedMap} creation.
123
- * @public
124
- * @deprecated Use ISharedMap instead.
125
- * @privateRemarks
126
- * This alias is for legacy compat from when the SharedMap class was exported as public.
127
- */
128
- export declare type SharedMap = ISharedMap;
129
-
130
- export { }
@@ -1,130 +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 type { IChannelAttributes } from '@fluidframework/datastore-definitions';
14
- import type { IChannelFactory } from '@fluidframework/datastore-definitions';
15
- import type { IChannelServices } from '@fluidframework/datastore-definitions';
16
- import { IDisposable } from '@fluidframework/core-interfaces';
17
- import { IEvent } from '@fluidframework/core-interfaces';
18
- import { IEventProvider } from '@fluidframework/core-interfaces';
19
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
20
- import type { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
21
- import { ISharedObject } from '@fluidframework/shared-object-base';
22
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
23
- import type { ISharedObjectKind } from '@fluidframework/shared-object-base';
24
-
25
- /* Excluded from this release type: DirectoryFactory */
26
-
27
- /* Excluded from this release type: IDirectory */
28
-
29
- /* Excluded from this release type: IDirectoryEvents */
30
-
31
- /* Excluded from this release type: IDirectoryValueChanged */
32
-
33
- /* Excluded from this release type: ISharedDirectory */
34
-
35
- /* Excluded from this release type: ISharedDirectoryEvents */
36
-
37
- /**
38
- * The SharedMap distributed data structure can be used to store key-value pairs. It provides the same API for setting
39
- * and retrieving values that JavaScript developers are accustomed to with the
40
- * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.
41
- * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a
42
- * {@link @fluidframework/datastore#FluidObjectHandle}.
43
- *
44
- * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
45
- * @sealed
46
- * @public
47
- */
48
- export declare interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
49
- /**
50
- * Retrieves the given key from the map if it exists.
51
- * @param key - Key to retrieve from
52
- * @returns The stored value, or undefined if the key is not set
53
- */
54
- get<T = any>(key: string): T | undefined;
55
- /**
56
- * Sets the value stored at key to the provided value.
57
- * @param key - Key to set
58
- * @param value - Value to set
59
- * @returns The {@link ISharedMap} itself
60
- */
61
- set<T = unknown>(key: string, value: T): this;
62
- }
63
-
64
- /**
65
- * Events emitted in response to changes to the {@link ISharedMap | map} data.
66
- * @sealed
67
- * @public
68
- */
69
- export declare interface ISharedMapEvents extends ISharedObjectEvents {
70
- /**
71
- * Emitted when a key is set or deleted.
72
- *
73
- * @remarks Listener parameters:
74
- *
75
- * - `changed` - Information on the key that changed and its value prior to the change.
76
- *
77
- * - `local` - Whether the change originated from this client.
78
- *
79
- * - `target` - The {@link ISharedMap} itself.
80
- */
81
- (event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
82
- /**
83
- * Emitted when the map is cleared.
84
- *
85
- * @remarks Listener parameters:
86
- *
87
- * - `local` - Whether the clear originated from this client.
88
- *
89
- * - `target` - The {@link ISharedMap} itself.
90
- */
91
- (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
92
- }
93
-
94
- /**
95
- * Type of "valueChanged" event parameter.
96
- * @sealed
97
- * @public
98
- */
99
- export declare interface IValueChanged {
100
- /**
101
- * The key storing the value that changed.
102
- */
103
- readonly key: string;
104
- /**
105
- * The value that was stored at the key prior to the change.
106
- */
107
- readonly previousValue: any;
108
- }
109
-
110
- /* Excluded from this release type: MapFactory */
111
-
112
- /* Excluded from this release type: SharedDirectory */
113
-
114
- /**
115
- * Entrypoint for {@link ISharedMap} creation.
116
- * @public
117
- * @deprecated Please use SharedTree for new containers. SharedMap is supported for loading preexisting Fluid Framework 1.0 containers only.
118
- */
119
- export declare const SharedMap: ISharedObjectKind<ISharedMap>;
120
-
121
- /**
122
- * Entrypoint for {@link ISharedMap} creation.
123
- * @public
124
- * @deprecated Use ISharedMap instead.
125
- * @privateRemarks
126
- * This alias is for legacy compat from when the SharedMap class was exported as public.
127
- */
128
- export declare type SharedMap = ISharedMap;
129
-
130
- export { }