Documentation
    Preparing search index...
    • Wraps a function with singleton behavior

      This decorator ensures that only one instance of the function is running at a time. If the function is called again 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