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
We should probably be using generics more in redux so that DHE types get properly inferred when they differ from DHC.
One example is getSettings which the store from DHE has extra settings. Most selectors should probably be something in the form of getSettings<S extends CommunityStore>(store: S): S['settings'] or something like that. Then as long as the DHE store extends the DHC store, we should get the proper DHE types for DHE specific selectors
Or even something like getSettings<S>(store: { settings: S }): S => store.settings since that's really the minimum required for the selector. This might play nicer w/ a few mismatches between DHC and DHE (like ServerConfigValues currently)
The text was updated successfully, but these errors were encountered:
We should probably be using generics more in redux so that DHE types get properly inferred when they differ from DHC.
One example is
getSettings
which the store from DHE has extra settings. Most selectors should probably be something in the form ofgetSettings<S extends CommunityStore>(store: S): S['settings']
or something like that. Then as long as the DHE store extends the DHC store, we should get the proper DHE types for DHE specific selectorsOr even something like
getSettings<S>(store: { settings: S }): S => store.settings
since that's really the minimum required for the selector. This might play nicer w/ a few mismatches between DHC and DHE (likeServerConfigValues
currently)The text was updated successfully, but these errors were encountered: