import { type RateLimitOptions, type CircuitBreakerOptions, type WithTimeoutOptions } from './index.ts'; import { type RetryOptions, type InflightOptions } from '../async/index.ts'; import { AsyncFunc } from '../types.ts'; type ComposeFlowOptions = { /** * Rate limit the function. */ rateLimit?: RateLimitOptions; /** * Create a circuit breaker for the function. */ circuitBreaker?: CircuitBreakerOptions; /** * Retry the function. */ retry?: RetryOptions; /** * Timeout the function. */ withTimeout?: WithTimeoutOptions; /** * Deduplicate in-flight requests with the same key. */ inflight?: InflightOptions, string, Awaited>>; }; /** * Compose multiple flow control functions into a single function. * The order of the keys in the options you pass will determine * how the flow controls are applied to your function. * * @param fn - The function to compose * @param opts - The options for the flow control functions * @returns The composed function */ export declare const composeFlow: (fn: T, opts: ComposeFlowOptions) => T; export {};