import * as tsplus_module_1 from "@effect/core/io/Layer/operations/environment";
import * as tsplus_module_2 from "@effect/core/io/Layer/operations/and";
import * as tsplus_module_3 from "@effect/core/io/Layer/operations/suspend";
import { ILayerTo } from "@effect/core/io/Layer/definition";
/**
 * Feeds the output services of this builder into the input of the specified
 * builder, resulting in a new builder with the inputs of this builder as
 * well as any leftover inputs, and the outputs of the specified builder.
 *
 * @tsplus operator ets/Layer >>
 * @tsplud fluent ets/Layer to
 */

export function to_(self, that) {
  return tsplus_module_3.suspend(() => new ILayerTo(tsplus_module_2.and_(tsplus_module_1.environment(), () => self), // @ts-expect-error
  that));
}
/**
 * Feeds the output services of this builder into the input of the specified
 * builder, resulting in a new builder with the inputs of this builder as
 * well as any leftover inputs, and the outputs of the specified builder.
 *
 * @tsplus static ets/Layer/Aspects to
 */

export const to = that => self => to_(self, that);
//# sourceMappingURL=to.mjs.map