-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
Problem
When using the EntityAdapter
's exported selectors with reselects createSelector
a Typescript error is thrown regarding the $CombinedState symbol not being exported.
Example:
import { createSelector } from '@reduxjs/toolkit'
import { sessionsAdapter } from '../reducers/sessions'
import { RootState } from '../types'
export const { selectAll: selectAllSessions } = sessionsAdapter.getSelectors((state: RootState) => state.sessions)
export const currentSessionSelector = createSelector(selectAllSessions, (sessions) => sessions[0])
Results in the following error
Exported variable 'currentSessionSelector' has or is using name '$CombinedState' from external module "../node_modules/redux/index" but cannot be named.ts(4023)
Package Versions
Current:
- typescript 4.5.5
- redux 4.1.2
- @reduxjs/toolkit 1.7.2
- react-redux 7.2.6
This code was previously working with the following package versions:
Previous:
- typescript 4.4.3
- redux 4.1.2
- @reduxjs/toolkit 1.6.1
- react-redux 7.2.6
I'm not sure at which point it broke as I upgraded to the latest and I'm now working backwards.
HoriguchiTakuma, mpeyper, vidarc, MarksPoint, olehpopovych-amplify and 1 more
Metadata
Metadata
Assignees
Labels
No labels