Function: rateLimit()
ts
function rateLimit(config): MiddlewareFn<unknown>;Defined in: packages/core/src/core/middleware/RateLimiter.ts:229
Create a rate limiting middleware.
Returns a self-healing toolError('RATE_LIMITED') with retryAfterSeconds when the limit is exceeded, following RFC 7231 semantics.
Parameters
| Parameter | Type | Description |
|---|---|---|
config | RateLimitConfig | Rate limit configuration |
Returns
MiddlewareFn<unknown>
A middleware function compatible with .use()