fix types for combineEvents
besizzo opened this issue · 1 comments
besizzo commented
Using combineEvents in sample breaks types for provided payload
example:
sample({
clock: combineEvents({
events: [deleteConfigInitiated, deleteConfigFx.done], // types are OK
}),
source: $idsInEditProcess, // types are OK
fn: (idsInEditProcess, clock) => { // types are :any here
const updatedIds = idsInEditProcess((id) => id !== clock[0])
return updatedIds
},
target: $idsInEditProcess,
})
According to @igorkamyshev it could be fixed like this:
Unfortunately, cannot make a PR by myself.
sergeysova commented
@besizzo Would you like to create reproduce in tsplay.dev?
It would be very helpful