polarity-integration-utils
    Preparing search index...

    Interface PolarityRequestLimiter

    Minimal interface for a rate limiter compatible with PolarityRequest. Only requires the schedule method, which is the sole method used internally. The Polarity server provides a full Limiter instance (from @polarityio/integration-types) that satisfies this interface, but consumers may also pass simpler objects or mocks that only implement schedule.

    interface PolarityRequestLimiter {
        schedule<T>(
            fn: (...args: unknown[]) => PromiseLike<T>,
            ...args: unknown[],
        ): Promise<T>;
    }
    Index
    • Type Parameters

      • T

      Parameters

      • fn: (...args: unknown[]) => PromiseLike<T>
      • ...args: unknown[]

      Returns Promise<T>