utils.d.ts 446 B

1234
  1. import type { EntityState, IdSelector, Update, EntityId } from './models';
  2. export declare function selectIdValue<T>(entity: T, selectId: IdSelector<T>): EntityId;
  3. export declare function ensureEntitiesArray<T>(entities: readonly T[] | Record<EntityId, T>): readonly T[];
  4. export declare function splitAddedUpdatedEntities<T>(newEntities: readonly T[] | Record<EntityId, T>, selectId: IdSelector<T>, state: EntityState<T>): [T[], Update<T>[]];