@ngrx/entity
- Version 21.1.0
- Published
- 271 kB
- 1 dependency
- MIT license
Install
npm i @ngrx/entityyarn add @ngrx/entitypnpm add @ngrx/entityOverview
Common utilities for entity reducers
Index
Functions
function createEntityAdapter
createEntityAdapter: <T>(options?: { selectId?: IdSelector<T>; sortComparer?: false | Comparer<T>;}) => EntityAdapter<T>;Classes
class Dictionary
abstract class Dictionary<T> implements DictionaryNum<T> {}Interfaces
interface DictionaryNum
interface DictionaryNum<T> {}index signature
[id: number]: T | undefined;interface EntityAdapter
interface EntityAdapter<T> extends EntityStateAdapter<T> {}property selectId
selectId: IdSelector<T>;property sortComparer
sortComparer: false | Comparer<T>;method getInitialState
getInitialState: { (): EntityState<T>; <S extends EntityState<T>>(state: Omit<S, keyof EntityState<T>>): S;};method getSelectors
getSelectors: { (): EntitySelectors<T, EntityState<T>>; <V>(selectState: (state: V) => EntityState<T>): MemoizedEntitySelectors< T, V >;};interface EntityState
interface EntityState<T> {}Type Aliases
type Comparer
type Comparer<T> = (a: T, b: T) => number;type EntityMap
type EntityMap<T> = (entity: T) => T;type EntityMapOne
type EntityMapOne<T> = EntityMapOneNum<T> | EntityMapOneStr<T>;type EntitySelectors
type EntitySelectors<T, V> = { selectIds: (state: V) => string[] | number[]; selectEntities: (state: V) => Dictionary<T>; selectAll: (state: V) => T[]; selectTotal: (state: V) => number;};type IdSelector
type IdSelector<T> = IdSelectorStr<T> | IdSelectorNum<T>;type MemoizedEntitySelectors
type MemoizedEntitySelectors<T, V> = { selectIds: MemoizedSelector< V, string[] | number[], (entityState: EntityState<T>) => string[] | number[] >; selectEntities: MemoizedSelector< V, Dictionary<T>, (entityState: EntityState<T>) => Dictionary<T> >; selectAll: MemoizedSelector<V, T[], (entityState: EntityState<T>) => T[]>; selectTotal: MemoizedSelector< V, number, (entityState: EntityState<T>) => number >;};type Predicate
type Predicate<T> = (entity: T) => boolean;type Update
type Update<T> = UpdateStr<T> | UpdateNum<T>;Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (3)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ngrx/entity.
- Markdown[](https://www.jsdocs.io/package/@ngrx/entity)
- HTML<a href="https://www.jsdocs.io/package/@ngrx/entity"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1604 ms. - Missing or incorrect documentation? Open an issue for this package.
