Provides a debounced function that returns a handle to a Promise which can be awaited by contextually separate callers and resolves only after the last non-debounced async operation is settled.
By default, if a given call gets debounced, subsequent call(s) will ignore the previous arguments that were provided. This can be overridden by providing a mergeArguments
function that allows for the finally exectuted function to batch arguments from all invocations.
https://stackblitz.com/edit/debounce-promise?file=src%2FApp.tsx