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

Function handleAll

packages/effect/src/unstable/httpapi/HttpApiBuilder.ts:622–638  ·  view source on GitHub ↗
(
    this: Handlers<any, any, any>,
    handlers: Record<
      string,
      HttpApiEndpoint.Handler<HttpApiEndpoint.Constraint, any, any> | {
        readonly handler: HttpApiEndpoint.Handler<HttpApiEndpoint.Constraint, any, any>
        readonly options?: HandlerOptions | undefined
      }
    >
  )

Source from the content-addressed store, hash-verified

620 return registerHandler(this, identifier, handler, false, options)
621 },
622 handleAll(
623 this: Handlers<any, any, any>,
624 handlers: Record<
625 string,
626 HttpApiEndpoint.Handler<HttpApiEndpoint.Constraint, any, any> | {
627 readonly handler: HttpApiEndpoint.Handler<HttpApiEndpoint.Constraint, any, any>
628 readonly options?: HandlerOptions | undefined
629 }
630 >
631 ) {
632 for (const [identifier, entry] of Object.entries(handlers)) {
633 const handler = typeof entry === "function" ? entry : entry.handler
634 const options = typeof entry === "function" ? undefined : entry.options
635 registerHandler(this, identifier, handler, false, options)
636 }
637 return this
638 },
639 handleRaw(
640 this: Handlers<any, any, any>,
641 identifier: string,

Callers

nothing calls this directly

Calls 1

registerHandlerFunction · 0.85

Tested by

no test coverage detected