import type { ILens } from '../../../libs/standard-lens'; import type { Comparer, EntityId, EntityState, IdSelector } from '../entity.types'; import type { EntityAdaptor } from './entity.types'; export declare type WithDefaultId = Record<'id', EntityId>; export declare const defaultIdSelector: (item: T) => EntityId; export interface CreateEntityAdaptorOptions { /** * A function that can get an entityId out of the entity */ idSelector: IdSelector; /** * An optional comparison function that compares two entities for order. If this is not defined * order is not guaranteed */ comparer?: Comparer; /** * Optional lens that allows the adaptor to operate on larger data structures. */ lens?: ILens>; } /** * Creates an entity adapter. * * @param options Options to create the entity adapter. * @return */ export declare const createEntityAdaptor: (options: CreateEntityAdaptorOptions) => EntityAdaptor; /** * A constant that is a good initial state for any entity state. */ export declare const EMPTY_ENTITY_STATE: EntityState;