( appLayer: Layer.Layer<A, E, R> )
| 701 | * @since 4.0.0 |
| 702 | */ |
| 703 | export const toHttpEffect = <A, E, R>( |
| 704 | appLayer: Layer.Layer<A, E, R> |
| 705 | ): Effect.Effect< |
| 706 | Effect.Effect< |
| 707 | HttpServerResponse.HttpServerResponse, |
| 708 | Request.Only<"Error", R> | Request.Only<"GlobalError", R> | HttpServerError.HttpServerError, |
| 709 | Scope.Scope | HttpServerRequest.HttpServerRequest | Request.Only<"Requires", R> | Request.Only<"GlobalRequires", R> |
| 710 | >, |
| 711 | Request.Without<E>, |
| 712 | Exclude<Request.Without<R>, HttpRouter> | Scope.Scope |
| 713 | > => |
| 714 | Effect.contextWith((context) => |
| 715 | Effect.map( |
| 716 | Layer.buildWithMemoMap( |
| 717 | Layer.provideMerge(appLayer, layer), |
| 718 | Layer.CurrentMemoMap.forkOrCreate(context, { fresh: [layer] }), |
| 719 | Context.get(context, Scope.Scope) |
| 720 | ), |
| 721 | (context) => Context.get(context, HttpRouter).asHttpEffect() |
| 722 | ) |
| 723 | ) as any |
| 724 | |
| 725 | const RouteTypeId = "~effect/http/HttpRouter/Route" |
| 726 |
nothing calls this directly
no test coverage detected