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

Function endpoint

packages/effect/typeperf/compare/httpapi.mjs:3–6  ·  view source on GitHub ↗
(index, indent = "    ")

Source from the content-addressed store, hash-verified

1const endpointIdentifier = (index) => `getUser${String(index).padStart(4, "0")}`
2
3const endpoint = (index, indent = " ") => `${indent}HttpApiEndpoint.get("${endpointIdentifier(index)}", "/users/:id", {
4${indent} params: Params,
5${indent} success: User
6${indent}})`
7
8const endpoints = (count, indent = " ") =>
9 Array.from({ length: count }, (_, index) => endpoint(index + 1, indent)).join(",\n")

Callers 1

endpointsFunction · 0.70

Calls 1

endpointIdentifierFunction · 0.85

Tested by

no test coverage detected