Rename RateLimiter makeSleep to sleep - #7023
Conversation
🦋 Changeset detectedLatest commit: 6153681 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This PR renames RateLimiter.makeSleep to RateLimiter.sleep, rewrites it to use the dual helper so it supports both data-first (limiter, options) and data-last ({ ... })(limiter) calling conventions, updates the runnable JSDoc example to demonstrate both forms, adds test coverage for both signatures, and includes a patch changeset. I verified the JSDoc example passes pnpm doctest --run and the new unit test passes with pnpm --filter effect test --run test/unstable/persistence/RateLimiter.test.ts.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The new commit replaced the dual-based sleep implementation with manual overloads that support self-first partial application (RateLimiter.sleep(limiter)(options)) and direct uncurried calls (RateLimiter.sleep(limiter, options)). The JSDoc example was updated to demonstrate both forms, the test was split into two focused cases, and the changeset wording was adjusted to match.
- Reworked
RateLimiter.sleepto use function overloads and a single manualif (options === undefined)branch. - Updated the runnable JSDoc example to return
[9, 9]from partial-application and direct-call usage. - Split the single combined test into
supports partially applied sleepandsupports uncurried sleep. - Adjusted the changeset description to
support self-first partially applied and uncurried usage.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

Summary
RateLimiter.makeSleeptoRateLimiter.sleepsleep(self)(options)and direct calls withsleep(self, options)Validation
pnpm lint-fixpnpm --filter effect test --run test/unstable/persistence/RateLimiter.test.tspnpm checkpnpm doctest --run packages/effect/src/unstable/persistence/RateLimiter.tspnpm docgenreached example typechecking but is currently blocked by an unrelated existingHttpStaticServerexample missing the requiredcompressionfieldCloses EFF-466