Closed kralcifer-ms closed 6 years ago
isActionOf is higher order function, think "ramda" way, you should do isActionOf(authLogoutSuccess)(action), but I would use switch case instead, we do it like in reducer switch case:
action$
.map(action => {
switch (action.type) {
case getType(shipmentsActions.getShipmentListSuccess):
return deliveriesActions.getShipmentListStatusesRequest(
action.payload.shipments.map(s => s.id)
);
case getType(shipmentsActions.getShipmentRequest):
return deliveriesActions.getShipmentStatusesRequest
...
In the following code snippet it lets 2 actions in but then TypeScript complains trying to access payload on clearVisitedStream because authLogoutSuccess action is a simple action without a payload.
gives typescript error: