MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeHandlers

Function makeHandlers

packages/platform/src/HttpApiBuilder.ts:435–445  ·  view source on GitHub ↗
(
  options: {
    readonly group: HttpApiGroup.HttpApiGroup.Any
    readonly handlers: Chunk.Chunk<Handlers.Item<E, R>>
  }
)

Source from the content-addressed store, hash-verified

433}
434
435const makeHandlers = <E, Provides, R, Endpoints extends HttpApiEndpoint.HttpApiEndpoint.Any>(
436 options: {
437 readonly group: HttpApiGroup.HttpApiGroup.Any
438 readonly handlers: Chunk.Chunk<Handlers.Item<E, R>>
439 }
440): Handlers<E, Provides, R, Endpoints> => {
441 const self = Object.create(HandlersProto)
442 self.group = options.group
443 self.handlers = options.handlers
444 return self
445}
446
447/**
448 * Create a `Layer` that will implement all the endpoints in an `HttpApi`.

Callers 3

handleFunction · 0.70
handleRawFunction · 0.70
groupFunction · 0.70

Calls 1

createMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…