You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: showcase await using pattern in README quickstart (#104)
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>
Copy file name to clipboardExpand all lines: README.md
+36-23Lines changed: 36 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,41 +24,57 @@ npm install @opendecree/sdk
24
24
25
25
## Quick Start
26
26
27
+
The SDK implements `Symbol.dispose` / `Symbol.asyncDispose`, so you can use TypeScript 5.2's `using` statement for automatic cleanup — no try/finally needed.
0 commit comments