(layer: Layer.Layer<A2, E2, R2>)
| 1197 | */ |
| 1198 | export const provideRequest = |
| 1199 | <A2, E2, R2>(layer: Layer.Layer<A2, E2, R2>) => |
| 1200 | <A, E, R>(self: Layer.Layer<A, E, R>): Layer.Layer< |
| 1201 | A, |
| 1202 | E | E2, |
| 1203 | R2 | Exclude<R, Request.From<"Requires", A2>> |
| 1204 | > => |
| 1205 | Layer.provide( |
| 1206 | self, |
| 1207 | middleware<{ provides: A2 }>()(Effect.gen(function*() { |
| 1208 | const services = yield* Layer.build(layer as Layer.Layer<A2>) |
| 1209 | return (effect) => |
| 1210 | Effect.provideContext(effect, services) as Effect.Effect< |
| 1211 | HttpServerResponse.HttpServerResponse, |
| 1212 | Types.unhandled |
| 1213 | > |
| 1214 | })).layer |
| 1215 | ) |
| 1216 | |
| 1217 | /** |
| 1218 | * Runs the provided application layer as an HTTP server. |
nothing calls this directly
no test coverage detected