I have a simple redux store setup with createEntityAdapter. The initial state contains and entity, ids, status, error setup as such
const carouselEventAdapter = createEntityAdapter<CarouselEventStateInterface>()
const initialState = carouselEventAdapter.getInitialState({
entities: { //some data here },
ids: [1,2],
status: 'idle',
error: null,
})
const carouselEventSlice = createSlice({
name: 'carouselEvent',
initialState,
reducers: {},
extraReducers: {},
})
export const {
selectIds,
selectById,
} = carouselEventAdapter.getSelectors<RootState>( state => state.carouselEvent)
// export const {} = carouselEventSlice.actions
export default carouselEventSlice.reducer
When I try to call the selectIds function, it shows me the type as EntityId[] while I want number[] as the type for eventids
const eventids = useSelector(selectIds)
Could someone correct me on my types because I've tried to find answers to this everywhere and no luck