Handling `HttpServerRequest` Dependency in Effect Typescript Library

When is HttpServerRequest.HttpServerRequest valid to have a dependency? If I write a service using Effect.Service that relies on it, and attempt to use it here:

// MyApiLive is made with HttpApiBuilder.api
const ApiHandler = HttpApiBuilder.toWebHandler(
  MyApiLive.pipe(
    Layer.provideMerge(HttpServer.layerContext),
    Layer.provide(ServiceUsingHttpServerRequest.Default),
  )
)

I get an error about type assignment for `Type 'HttpServerRequest' is not assignable to type 'never'.

I'm wanting to create a cookie jar service for managing cookies in my own way as a bit of a learning exercise for effect, so just wondering where that should be placed at since it cannot be done at the Api level it seems?
Was this page helpful?