/** * Provides a layer to the channel, which translates it to another level. * * @tsplus static effect/core/stream/Channel.Aspects provideLayer * @tsplus pipeable effect/core/stream/Channel provideLayer */ export function provideLayer(layer: Layer) { return ( self: Channel ): Channel => Channel.unwrapScoped(layer.build.map((env) => self.provideEnvironment(env))) }