Packages > @fluidframework/map > ISharedMapEvents

ISharedMapEvents Interface

Events emitted in response to changes to the map data.

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

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

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

Signature

/** @sealed */
export interface ISharedMapEvents extends ISharedObjectEvents

Extends: ISharedObjectEvents

Call Signatures

CallSignature Alerts Description
(event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any Alpha Emitted when a key is set or deleted.
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any Alpha Emitted when the map is cleared.

Call Signature Details

(event: “valueChanged”, listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any

Emitted when a key is set or deleted.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

(event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters:

  • changed - Information on the key that changed and its value prior to the change.

  • local - Whether the change originated from this client.

  • target - The ISharedMap itself.

(event: “clear”, listener: (local: boolean, target: IEventThisPlaceHolder) => void): any

Emitted when the map is cleared.

This API is provided as an alpha preview and may change without notice.

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

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

Signature

(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters:

  • local - Whether the clear originated from this client.

  • target - The ISharedMap itself.