Open kinetiq opened 3 months ago
Could you make this perhaps accept a Func\<Task> delegate, or provide an example of how this is supposed to be used now?
Right now it's challenging to use this with actual async code.
In previous versions I could have this code:
await SaveDebouncer.DebounceAsync(SaveForm);
Here, SaveForm just returns a task. In this case, now it seems like I'm supposed to do this:
await SaveDebouncer.DebounceAsync(async () => await SaveForm());
...I can live with it being more verbose even though it seems unnecessary, but this generates a warning and that is a problem for my team.
Thanks for the great project!
This change in the signature of the method DebounceAsync caused me troubles too, I had to downgrade to v2.1.0
DebounceAsync
Maybe there is a good reason behind it, but could it be an oversight?
Could you make this perhaps accept a Func\<Task> delegate, or provide an example of how this is supposed to be used now?
Right now it's challenging to use this with actual async code.
In previous versions I could have this code:
await SaveDebouncer.DebounceAsync(SaveForm);
Here, SaveForm just returns a task. In this case, now it seems like I'm supposed to do this:
await SaveDebouncer.DebounceAsync(async () => await SaveForm());
...I can live with it being more verbose even though it seems unnecessary, but this generates a warning and that is a problem for my team.
Thanks for the great project!