Interface EntityStateAdapter<T>
Methods
addMany
- 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
- 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 }
Returns S
removeAll
Type Parameters
Parameters
Returns S
removeMany
Type Parameters
Parameters
Returns S
Type Parameters
Parameters
Returns S
removeOne
Type Parameters
Parameters
Returns S
Type Parameters
Parameters
Returns S
setAll
- 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
- 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
- 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 }
Returns S
updateMany
- 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
Type Parameters
Parameters
Returns S
Type Parameters
Parameters
state: IsAny<S, EntityState<T>, S>
updates: { payload: readonly Update<T>[]; type: string }
payload: readonly Update<T>[]
type: string
Returns S
updateOne
Type Parameters
Parameters
Returns S
Type Parameters
Parameters
Returns S
upsertMany
- 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
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
upsertOne
- 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 }
Returns S