amis-rpc-design/node_modules/@reduxjs/toolkit/dist/entities/utils.d.ts
2023-10-07 19:42:30 +08:00

5 lines
446 B
TypeScript

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>[]];