Function AvoidDoubleExecution

  • A decorator that prevents a method from being executed multiple times within a specified delay.

    Parameters

    • Optional delay: number = 500

      The delay threshold in milliseconds.

    Returns ((_target, _key, descriptor) => PropertyDescriptor)

    • The decorated method descriptor.
      • (_target, _key, descriptor): PropertyDescriptor
      • Parameters

        • _target: any
        • _key: string
        • descriptor: PropertyDescriptor

        Returns PropertyDescriptor