Documentation
    Preparing search index...
    • Wraps a function with singleton behavior to prevent duplicate concurrent calls

      This decorator ensures that if the same function is called with the same arguments while a previous call is still pending, it returns the existing promise instead of making a new call.

      Type Parameters

      • T extends (...args: any[]) => Promise<any>

      Parameters

      • fn: T

        Function to wrap with singleton behavior

      Returns T

      Wrapped function with singleton behavior