returns a function that, when invoked will only be triggered at most once during a given window of time

  • Parameters

    • fn: (() => void)

      the function to be throttled.

        • (): void
        • Returns void

    • Optionalwait: number = 100

      the delay in ms

    Returns ((...args: []) => void)

    the function that will be throttled

      • (...args): void
      • Parameters

        • Rest...args: []

        Returns void