Provided a duration and a function, returns a new function which is called duration milliseconds after the last call. Call .cancel() to discard a pending invocation (e.g. on unmount, so it can't run against a disposed editor).
duration
.cancel()
Provided a duration and a function, returns a new function which is called
durationmilliseconds after the last call. Call.cancel()to discard a pending invocation (e.g. on unmount, so it can't run against a disposed editor).