mirror of
https://github.com/Effect-TS/effect.git
synced 2026-11-21 02:01:57 +08:00
336 B
336 B
effect
| effect |
|---|
| patch |
ManagedRuntime: add Symbol.asyncDispose, enabling await using syntax
import { Effect, Layer, ManagedRuntime } from "effect"
await using runtime = ManagedRuntime.make(Layer.empty)
await runtime.runPromise(Effect.log("Hello, world!"))
// runtime is disposed automatically at the end of the scope