amis-rpc-design/node_modules/@reduxjs/toolkit/dist/entities/utils.d.ts

5 lines
446 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
import type { EntityState, IdSelector, Update, EntityId } from './models';
export declare function selectIdValue<T>(entity: T, selectId: IdSelector<T>): EntityId;
export declare function ensureEntitiesArray<T>(entities: readonly T[] | Record<EntityId, T>): readonly T[];
export declare function splitAddedUpdatedEntities<T>(newEntities: readonly T[] | Record<EntityId, T>, selectId: IdSelector<T>, state: EntityState<T>): [T[], Update<T>[]];