Closed dcs3spp closed 4 years ago
This is related to the following request in that so it will result in epic instead of a reducer, but they seem to be complementary: #88
I have to close this issue because of the invalid format, but I encourage you to open a new issue using a feature request form that is following the format in #88. Then I will consider it a new feature and moreover, I'm willing to work on it having available time and resources.
Hi @piotrwitek ,
Many thanks :) Have summarised using feature request here.
Thanks!
Hi,
Hope somebody can help with the following query, also raised on spectrum chat channel.....
I have written a generic epic that accepts an async action as a parameter, as follows:
The type of the
aysncAction
parameter isAsyncActionCreatorBuilder
. In the redux-observable Epic<...> generic I manually specify thePayloadAction
types for Input and Output actions in the stream.Is there any way to automatically generate the
PayloadAction
types? I have tried usingActionType<typeof asyncAction>
but this generates typeI think this is because I am passing in the parameter type as an
AsyncActionCreatorBuilder
.How can I get access to the
AsyncAction
interface type so that I can use it as the type for the asyncAction parameter instead of using AsyncActionCreatorBuilder? Alternatively, is there a way to automatically generate the union of PayloadAction types from the AsyncActionCreatorBuilder?