Wraps a promise function with lock functionality.

  • Type Parameters

    • T extends unknown = any
    • P extends any[] = any[]

    Parameters

    • promise: (...args: P) => Promise<T>

      The promise function to be wrapped.

    Returns IWrappedFn<T, P>

    The wrapped function with lock functionality.