CloseableA Closeable scope extends the base Scope interface with the ability
to be closed, executing all registered finalizers.
Example (Closing a scope)
import { Console, Effect, Exit, Scope } from "effect"
const program = Effect.gen(function*() {
const scope = yield* Scope.make()
// Add a finalizer
yield* Scope.addFinalizer(scope, Console.log("Cleanup!"))
// Scope can be closed
yield* Scope.close(scope, Exit.void)
})models
Source effect/Scope.ts:753 lines
Referenced by 12 symbols