@@ -2,7 +2,7 @@ import type { UncheckedIndexedAccess } from '../uncheckedindexed'
22import type { Draft } from 'immer'
33import type { PayloadAction } from '../createAction'
44import type { GetSelectorsOptions } from './state_selectors'
5- import type { CastAny , Id as Compute } from '../tsHelpers'
5+ import type { CastAny , Id } from '../tsHelpers'
66import type { CaseReducerDefinition } from '../createSlice'
77import type { CaseReducer } from '../createReducer'
88
@@ -163,22 +163,24 @@ export interface EntityStateAdapter<T, Id extends EntityId> {
163163export type EntitySelectors <
164164 T ,
165165 V ,
166- Id extends EntityId ,
166+ IdType extends EntityId ,
167167 Single extends string = '' ,
168168 Plural extends string = DefaultPlural < Single > ,
169169> = Compute <
170170 {
171- [ K in `select${Capitalize < Single > } Ids`] : ( state : V ) => Id [ ]
171+ [ K in `select${Capitalize < Single > } Ids`] : ( state : V ) => IdType [ ]
172172 } & {
173- [ K in `select${Capitalize < Single > } Entities`] : ( state : V ) => Record < Id , T >
173+ [ K in `select${Capitalize < Single > } Entities`] : (
174+ state : V ,
175+ ) => Record < IdType , T >
174176 } & {
175177 [ K in `selectAll${Capitalize < Plural > } `] : ( state : V ) => T [ ]
176178 } & {
177179 [ K in `selectTotal${Capitalize < Plural > } `] : ( state : V ) => number
178180 } & {
179181 [ K in `select${Capitalize < Single > } ById`] : (
180182 state : V ,
181- id : Id ,
183+ id : IdType ,
182184 ) => Compute < UncheckedIndexedAccess < T > >
183185 }
184186>
0 commit comments