UNPKG

veffect

Version:

powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha

27 lines 825 B
import * as internal from "./internal/managedRuntime.js"; /** * Convert a Layer into an ManagedRuntime, that can be used to run Effect's using * your services. * * @since 2.0.0 * @category runtime class * @example * import { Console, Effect, Layer, ManagedRuntime } from "effect" * * class Notifications extends Effect.Tag("Notifications")< * Notifications, * { readonly notify: (message: string) => Effect.Effect<void> } * >() { * static Live = Layer.succeed(this, { notify: (message) => Console.log(message) }) * } * * async function main() { * const runtime = ManagedRuntime.make(Notifications.Live) * await runtime.runPromise(Notifications.notify("Hello, world!")) * await runtime.dispose() * } * * main() */ export const make = internal.make; //# sourceMappingURL=ManagedRuntime.js.map