Closed
Description
At least as of 4.0.5
, createStore
accepts preloadedState: PreloadedState<S>
. One imagines that one can pass S
to preloadedState
, and in most cases this is correct. However, there are cases in which S
is not assignable to PreloadedState<S>
, at least since typescript@3.6.3
. See microsoft/TypeScript#35992 for more information on this issue. It's unclear to me whether microsoft/TypeScript#35992 is a typescript bug, but I'm wondering if createStore
should accept preloadedState: PreloadedState<S> | S
, which would mitigate the issue of branded types being mapped to never
.
Metadata
Metadata
Assignees
Labels
No labels