map.apps Bundle APIs 4.20.2
    Preparing search index...

    Class SyncWritableInMemoryStore<ItemType, IDType>

    A writable synchronous store.

    Type Parameters

    • ItemType extends Record<string, any>
    • IDType extends string | number

    Hierarchy (View Summary)

    Implements

    Index

    Properties

    id: string

    ID of the store.

    idProperty: string

    Name of the property used as ID. If not provided, the 'getIdentity' method must be declared.

    Methods

    • Emits an event. All associated event listeners registered for the given event name will be invoked asynchronously.

      Type Parameters

      • Name extends "changed"

      Parameters

      • eventName: Name

        The name of the event.

      • ...value: Params<StoreEvents<IDType>[Name]>

        The event value. Passed to all event listeners. Note: no value can be passed if the event type is void.

      Returns void

    • Returns any available metadata about the store. This may include attribution, available fields, cache directives, history or version information.

      Returns Metadata

    • Saves the given item. Depending on the specified options, a new item is created or a given item is updated.

      Parameters

      Returns ItemType

    • Delete an item by id.

      Parameters

      • id: IDType

        id of item to delete

      Returns void