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
This has been haunting me for some time. When I add a plugin with model to a store, rdx does recognize its reducers and they are not showing up on the store's dispatch
I finally found the issue, which is between the definition of Plugin and how the model is then extracted
exportinterfacePlugin<MextendsModel=Model>{model?: M}typeKeysOfPluginsWithModels<PextendsPlugins>={[KinkeyofP]: undefinedextendsExtractPluginModel<P[K]> ? never : K}[keyofP]
Because Plugin['model'] is optional, it will always hit the undefined extends ExtractPluginModel<P[K]> condition, regardless of it actually being present on the given plugin.
I have been unable to figure out what is happening. Maybe this is related to another issue I found, and also experienced with TS 4.3+. When installed in the rdx repo, this error shows in effects-config.ts
TS7022: 'testModel' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
The text was updated successfully, but these errors were encountered:
This has been haunting me for some time. When I add a plugin with model to a store, rdx does recognize its reducers and they are not showing up on the store's
dispatch
I finally found the issue, which is between the definition of
Plugin
and how the model is then extractedBecause
Plugin['model']
is optional, it will always hit theundefined extends ExtractPluginModel<P[K]>
condition, regardless of it actually being present on the given plugin.I have been unable to figure out what is happening. Maybe this is related to another issue I found, and also experienced with TS 4.3+. When installed in the
rdx
repo, this error shows ineffects-config.ts
The text was updated successfully, but these errors were encountered: