MCPcopy
hub / github.com/Effect-TS/effect / handler

Function handler

packages/platform/src/HttpApiBuilder.ts:515–540  ·  view source on GitHub ↗
(
  _api: HttpApi.HttpApi<ApiId, Groups, ApiError, ApiR>,
  _groupName: GroupName,
  _name: Name,
  f: HttpApiEndpoint.HttpApiEndpoint.HandlerWithName<
    HttpApiGroup.HttpApiGroup.EndpointsWithName<Groups, GroupName>,
    Name,
    | ApiError
    | HttpApiGroup.HttpApiGroup.ErrorWithName<Groups, GroupName>,
    R
  >
)

Source from the content-addressed store, hash-verified

513 * @category handlers
514 */
515export const handler = <
516 ApiId extends string,
517 Groups extends HttpApiGroup.HttpApiGroup.Any,
518 ApiError,
519 ApiR,
520 const GroupName extends Groups["identifier"],
521 const Name extends HttpApiGroup.HttpApiGroup.EndpointsWithName<Groups, GroupName>["name"],
522 R
523>(
524 _api: HttpApi.HttpApi<ApiId, Groups, ApiError, ApiR>,
525 _groupName: GroupName,
526 _name: Name,
527 f: HttpApiEndpoint.HttpApiEndpoint.HandlerWithName<
528 HttpApiGroup.HttpApiGroup.EndpointsWithName<Groups, GroupName>,
529 Name,
530 | ApiError
531 | HttpApiGroup.HttpApiGroup.ErrorWithName<Groups, GroupName>,
532 R
533 >
534): HttpApiEndpoint.HttpApiEndpoint.HandlerWithName<
535 HttpApiGroup.HttpApiGroup.EndpointsWithName<Groups, GroupName>,
536 Name,
537 | ApiError
538 | HttpApiGroup.HttpApiGroup.ErrorWithName<Groups, GroupName>,
539 R
540> => f
541
542// internal
543

Callers 1

handlerToRouteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected