You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
abirmingham
changed the title
createStore should accept preloadedState: PreloadedState<S> | S
createStore should perhaps accept preloadedState: PreloadedState<S> | S
Jan 6, 2020
At least as of
4.0.5
,createStore
acceptspreloadedState: PreloadedState<S>
. One imagines that one can passS
topreloadedState
, and in most cases this is correct. However, there are cases in whichS
is not assignable toPreloadedState<S>
, at least sincetypescript@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 ifcreateStore
should acceptpreloadedState: PreloadedState<S> | S
, which would mitigate the issue of branded types being mapped tonever
.The text was updated successfully, but these errors were encountered: