(layer: Layer.Layer<A2, E2, R2>)
| 1381 | */ |
| 1382 | export const provideRequest = |
| 1383 | <A2, E2, R2>(layer: Layer.Layer<A2, E2, R2>) => |
| 1384 | <A, E, R>(self: Layer.Layer<A, E, R>): Layer.Layer< |
| 1385 | A, |
| 1386 | E | E2, |
| 1387 | R2 | Exclude<R, Request.From<"Requires", A2>> |
| 1388 | > => |
| 1389 | Layer.provide( |
| 1390 | self, |
| 1391 | middleware<{ provides: A2 }>()(Effect.gen(function*() { |
| 1392 | const services = yield* Layer.build(layer as Layer.Layer<A2>) |
| 1393 | return (effect) => |
| 1394 | Effect.provideContext(effect, services) as Effect.Effect< |
| 1395 | HttpServerResponse.HttpServerResponse, |
| 1396 | Types.unhandled |
| 1397 | > |
| 1398 | })).layer |
| 1399 | ) |
| 1400 | |
| 1401 | /** |
| 1402 | * Runs the provided application layer as an HTTP server. |
nothing calls this directly
no test coverage detected