Hi,
in the context of creating custom action creators on top of yours, I have come across this compile-time error which identifies an action to not have a payload property even though the runtime (and my brain compiler) says yes. I have reproed the context over here - https://github.com/flq/ts-react-playground/blob/df7f931be2e052f767e65c2639b1873e201a6708/src/repro/actionsAndReducer.ts#L38 . Not super small but it kind of condenses the situation.
The idea is to have a factory which produces the typical actions for REST-call lifecycle, and which can be used multiple times where the isolation scope is introduced by using the meta-property of the actions.
The problem appears to be introduced when a generic type P is introduced for the payload.
I am not sure if this is actually a thing of your library or if this is something to do with Typescript itself, but I hope that maybe you know what is happening.
Hi, in the context of creating custom action creators on top of yours, I have come across this compile-time error which identifies an action to not have a payload property even though the runtime (and my brain compiler) says yes. I have reproed the context over here - https://github.com/flq/ts-react-playground/blob/df7f931be2e052f767e65c2639b1873e201a6708/src/repro/actionsAndReducer.ts#L38 . Not super small but it kind of condenses the situation. The idea is to have a factory which produces the typical actions for REST-call lifecycle, and which can be used multiple times where the isolation scope is introduced by using the meta-property of the actions.
The problem appears to be introduced when a generic type P is introduced for the payload.
I am not sure if this is actually a thing of your library or if this is something to do with Typescript itself, but I hope that maybe you know what is happening.