Interface AsyncStore<ItemType, IDType>

An asynchronous store. This is the preferred kind of store implementation.

Type Parameters

Hierarchy

Implemented by

Properties

id: undefined | string

ID of the store.

idProperty?: string

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

Methods

  • Retrieves an item by its identifier.

    Parameters

    • id: IDType

      id of an item in the store.

    • Optional options: GetOptions

      options to specify the result.

    Returns Promise<undefined | ItemType>

  • Returns an itemsā€˜s identity. This must always execute synchronously.

    Parameters

    • item: Partial<ItemType>

      the item.

    Returns undefined | IDType

    the ID

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

    Returns Promise<Metadata>

Generated using TypeDoc