const fileName_1 = "(@effect/core) _src/io/Layer/operations/toRuntime.ts";
import * as tsplus_module_1 from "@effect/core/io/Runtime/definition";
import * as tsplus_module_2 from "@effect/core/io/Layer/memoMap";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/scopeWith";
import * as tsplus_module_4 from "@effect/core/io/Effect/operations/map";
/**
 * Converts a layer that requires no services into a scoped runtime, which can
 * be used to execute effects.
 *
 * @tsplus fluent ets/Layer toRuntime
 */

export function toRuntime_(self, runtimeConfig) {
  return tsplus_module_4.map_(tsplus_module_3.scopeWith(scope => tsplus_module_2.buildWithScope(self, () => scope, fileName_1 + ":12:46"), fileName_1 + ":12:15"), environment => new tsplus_module_1.Runtime(environment, runtimeConfig), fileName_1 + ":13:9");
}
/**
 * Converts a layer that requires no services into a scoped runtime, which can
 * be used to execute effects.
 *
 * @tsplus static ets/Layer/Aspects toRuntime
 */

export const toRuntime = runtimeConfig => self => toRuntime_(self, runtimeConfig);
//# sourceMappingURL=toRuntime.mjs.map