effector/patronum

fix types for combineEvents

besizzo opened this issue · 1 comments

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:
telegram-cloud-photo-size-2-5429453345434749142-y

Unfortunately, cannot make a PR by myself.

@besizzo Would you like to create reproduce in tsplay.dev?
It would be very helpful