Skip to content

docs: showcase await using pattern in README quickstart#104

Merged
zeevdr merged 1 commit into
mainfrom
feat/readme-using-pattern
May 28, 2026
Merged

docs: showcase await using pattern in README quickstart#104
zeevdr merged 1 commit into
mainfrom
feat/readme-using-pattern

Conversation

@zeevdr

@zeevdr zeevdr commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Promotes await using as the primary resource-management pattern in the README, since ConfigClient and ConfigWatcher both implement Symbol.asyncDispose — readers should see the flagship TS 5.2 feature front and center, not buried or absent.
  • Moves the try/finally approach into a collapsible <details> block so it remains discoverable without competing with await using.
  • Updates examples/quickstart/main.ts to match — the runnable example now demonstrates await using instead of try/finally.

Test plan

  • Typecheck passes (npm run typecheck)
  • Lint passes (npm run lint)
  • README renders correctly in GitHub preview (no broken markdown, <details> block collapses)

Closes #68

Replace the try/finally examples in Quick Start and Watch for Changes
with `await using` / `using`, since ConfigClient and ConfigWatcher both
implement Symbol.asyncDispose. Fold the old try/finally snippet into a
<details> block so readers who need it can still find it.

Also update examples/quickstart/main.ts to use `await using` so the
runnable example matches the README.

Closes #68

Co-Authored-By: Claude <noreply@anthropic.com>
@zeevdr zeevdr added this to the Beta Readiness milestone May 28, 2026
@zeevdr zeevdr added size: S Quick win — a few hours or less priority: P2 Nice-to-have labels May 28, 2026
@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zeevdr zeevdr enabled auto-merge (squash) May 28, 2026 17:57
@zeevdr zeevdr merged commit adc2734 into main May 28, 2026
14 checks passed
@zeevdr zeevdr deleted the feat/readme-using-pattern branch May 28, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: P2 Nice-to-have size: S Quick win — a few hours or less

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README quickstart: showcase using/Symbol.dispose flagship pattern

1 participant