Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EntityAdapter<T>

Type Parameters

  • T

Hierarchy

Index

Properties

selectId: IdSelector<T>
sortComparer: false | Comparer<T>

Methods

  • addMany<S>(state: IsAny<S, EntityState<T>, S>, entities: readonly T[] | Record<EntityId, T>): S
  • addMany<S>(state: IsAny<S, EntityState<T>, S>, entities: { payload: readonly T[] | Record<EntityId, T>; type: string }): S
  • Type Parameters

    Parameters

    Returns S

  • Type Parameters

    Parameters

    • state: IsAny<S, EntityState<T>, S>
    • entities: { payload: readonly T[] | Record<EntityId, T>; type: string }
      • payload: readonly T[] | Record<EntityId, T>
      • type: string

    Returns S

  • addOne<S>(state: IsAny<S, EntityState<T>, S>, entity: T): S
  • addOne<S>(state: IsAny<S, EntityState<T>, S>, action: { payload: T; type: string }): S
  • Type Parameters

    Parameters

    Returns S

  • Type Parameters

    Parameters

    • state: IsAny<S, EntityState<T>, S>
    • action: { payload: T; type: string }
      • payload: T
      • type: string

    Returns S

  • Returns EntityState<T>

  • Type Parameters

    • S extends object

    Parameters

    • state: S

    Returns EntityState<T> & S

  • Returns EntitySelectors<T, EntityState<T>>

  • Type Parameters

    • V

    Parameters

    Returns EntitySelectors<T, V>

  • setAll<S>(state: IsAny<S, EntityState<T>, S>, entities: readonly T[] | Record<EntityId, T>): S
  • setAll<S>(state: IsAny<S, EntityState<T>, S>, entities: { payload: readonly T[] | Record<EntityId, T>; type: string }): S
  • Type Parameters

    Parameters

    Returns S

  • Type Parameters

    Parameters

    • state: IsAny<S, EntityState<T>, S>
    • entities: { payload: readonly T[] | Record<EntityId, T>; type: string }
      • payload: readonly T[] | Record<EntityId, T>
      • type: string

    Returns S

  • setMany<S>(state: IsAny<S, EntityState<T>, S>, entities: readonly T[] | Record<EntityId, T>): S
  • setMany<S>(state: IsAny<S, EntityState<T>, S>, entities: { payload: readonly T[] | Record<EntityId, T>; type: string }): S
  • Type Parameters

    Parameters

    Returns S

  • Type Parameters

    Parameters

    • state: IsAny<S, EntityState<T>, S>
    • entities: { payload: readonly T[] | Record<EntityId, T>; type: string }
      • payload: readonly T[] | Record<EntityId, T>
      • type: string

    Returns S

  • setOne<S>(state: IsAny<S, EntityState<T>, S>, entity: T): S
  • setOne<S>(state: IsAny<S, EntityState<T>, S>, action: { payload: T; type: string }): S
  • Type Parameters

    Parameters

    Returns S

  • Type Parameters

    Parameters

    • state: IsAny<S, EntityState<T>, S>
    • action: { payload: T; type: string }
      • payload: T
      • type: string

    Returns S

  • updateMany<S>(state: IsAny<S, EntityState<T>, S>, updates: readonly Update<T>[]): S
  • updateMany<S>(state: IsAny<S, EntityState<T>, S>, updates: { payload: readonly Update<T>[]; type: string }): S
  • upsertMany<S>(state: IsAny<S, EntityState<T>, S>, entities: readonly T[] | Record<EntityId, T>): S
  • upsertMany<S>(state: IsAny<S, EntityState<T>, S>, entities: { payload: readonly T[] | Record<EntityId, T>; type: string }): S
  • upsertOne<S>(state: IsAny<S, EntityState<T>, S>, entity: T): S
  • upsertOne<S>(state: IsAny<S, EntityState<T>, S>, entity: { payload: T; type: string }): S
  • Type Parameters

    Parameters

    Returns S

  • Type Parameters

    Parameters

    • state: IsAny<S, EntityState<T>, S>
    • entity: { payload: T; type: string }
      • payload: T
      • type: string

    Returns S

Generated using TypeDoc