import { DUR } from "@fp-ts/data/Duration"; import { TSemaphore } from "@effect/stm/TSemaphore"; import { Effect, Semaphore } from "@effect/io/Effect"; import { Chunk } from "@fp-ts/data/Chunk"; /** * Executes the specified effect, acquiring the specified number of permits * immediately before the effect begins execution and releasing them * delayed by duration after the effect completes execution, whether by success, * failure, or interruption. * @tsplus static effect/stm/TSemaphore.Ops withPermitsDuration * @tsplus pipeable effect/stm/TSemaphore withPermitsDuration * @tsplus location "@effect-ts-app/boilerplate-infra/lib/rateLimit" */ export declare function withPermitsDuration(permits: number, duration: DUR): (self: TSemaphore) => (effect: import("@effect/io/Effect").Effect) => import("@effect/io/Effect").Effect; /** * Executes the specified effect, acquiring the specified number of permits * immediately before the effect begins execution and releasing them * delayed by duration after the effect completes execution, whether by success, * failure, or interruption. * @tsplus static effect/io/Effect/Semaphore.Ops withPermitsDuration * @tsplus pipeable effect/io/Effect/Semaphore withPermitsDuration * @tsplus location "@effect-ts-app/boilerplate-infra/lib/rateLimit" */ export declare function SEM_withPermitsDuration(permits: number, duration: DUR): (self: Semaphore) => (effect: import("@effect/io/Effect").Effect) => import("@effect/io/Effect").Effect; /** * @tsplus pipeable Iterable batchNPar * @tsplus static Collection.Aspects batchNPar * @tsplus location "@effect-ts-app/boilerplate-infra/lib/rateLimit" */ export declare function batchNPar(n: number, forEachItem: (item: T, iWithinBatch: number, i: number) => Effect, forEachBatch: (a: Chunk, i: number) => Effect): (items: Iterable) => import("@effect/io/Effect").Effect>; /** * @tsplus pipeable Iterable batch * @tsplus static Collection.Aspects batch * @tsplus location "@effect-ts-app/boilerplate-infra/lib/rateLimit" */ export declare function batch(n: number, forEachItem: (item: T, iWithinBatch: number, batchI: number) => Effect, forEachBatch: (a: Chunk, i: number) => Effect): (items: Iterable) => import("@effect/io/Effect").Effect>; /** * @tsplus pipeable Iterable naiveRateLimit * @tsplus static Collection.Aspects naiveRateLimit * @tsplus location "@effect-ts-app/boilerplate-infra/lib/rateLimit" */ export declare function naiveRateLimit(n: number, d: DUR): (items: Iterable) => (forEachItem: (i: T) => import("@effect/io/Effect").Effect, forEachBatch: (a: import("@fp-ts/data/Chunk").Chunk) => import("@effect/io/Effect").Effect) => import("@effect/io/Effect").Effect>; //# sourceMappingURL=rateLimit.d.ts.map