• Debounce wraps a callback, ensuring it only executes after a certain period of inactivity.

    Parameters

    • inner: (() => void)

      The function to execute after a given period of inactivity.

        • (): void
        • Returns void

    • duration: number

      The number of seconds the returned wrapper function must not be called before the inner function is invoked.

    Returns DebounceCallback

    Returns callback wrapper that enforces inactivity. This may be disposed.