diff --git a/modules/entity/src/models.ts b/modules/entity/src/models.ts index 7e8802261d..416bb6ae30 100644 --- a/modules/entity/src/models.ts +++ b/modules/entity/src/models.ts @@ -39,7 +39,7 @@ export type UpdateNum = { export type Update = UpdateStr | UpdateNum; export interface EntityState { - ids: any[]; + ids: string[] | number[]; entities: Dictionary; } @@ -65,24 +65,13 @@ export interface EntityStateAdapter { updateMany>(updates: Update[], state: S): S; } -export type EntitySelectorsBase = { +export type EntitySelectors = { + selectIds: (state: V) => string[] | number[]; selectEntities: (state: V) => Dictionary; selectAll: (state: V) => T[]; selectTotal: (state: V) => number; }; -export interface EntitySelectorsStr extends EntitySelectorsBase { - selectIds: (state: V) => string[]; -} - -export interface EntitySelectorsNum extends EntitySelectorsBase { - selectIds: (state: V) => number[]; -} - -export type EntitySelectors = - | EntitySelectorsNum - | EntitySelectorsStr; - export interface EntityAdapter extends EntityStateAdapter { getInitialState(): EntityState; getInitialState(state: S): EntityState & S;