Constructors

Properties

#graph: {
    [x: string]: {
        [x: string]: Model;
    };
} = {}

Type declaration

  • [x: string]: {
        [x: string]: Model;
    }
#order: {
    [x: string]: string[];
} = {}

Type declaration

  • [x: string]: string[]
errors: undefined | ErrorObject[]
jsonapi: undefined | JsonApiObject
links: undefined | LinksObject
meta: undefined | Meta

Methods

  • Remove a model from the store.

    Parameters

    • model: null | Model

      The model to destroy.

    Returns void

  • Retrieve a model by type and id. Constant-time lookup.

    Parameters

    • type: string

      The type of the model.

    • id: string

      The id of the model.

    Returns null | Model

    The corresponding model if present, and null otherwise.

  • Retrieve all models by type.

    Parameters

    • type: string

      The type of the model.

    Returns Model[]

    Array of the corresponding model if present, and empty array otherwise.

  • Initialize model.

    Parameters

    • type: string

      The type of the model.

    • id: string

      The id of the model.

    Returns Model

    New model.

  • Empty the store.

    Returns void

  • Sync a JSON API-compliant payload with the store and store any top level properties included in the payload.

    Parameters

    Returns void

  • Sync record data to model.

    Parameters

    Returns void