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

Function endpointDeclarationFixture

packages/effect/typeperf/compare/httpapi.mjs:46–65  ·  view source on GitHub ↗
(count)

Source from the content-addressed store, hash-verified

44}
45
46const endpointDeclarationFixture = (count) => `// Compares endpoint declaration for ${count} same-shaped endpoints.
47${imports()}
48
49${warmup}
50
51${schemas}
52
53${api(count)}
54
55type Groups = typeof api extends HttpApi.HttpApi<string, infer Groups> ? Groups : never
56type EndpointUnion = HttpApiGroup.Endpoints<Groups>
57
58${assertions}
59
60export type Api = typeof api
61export type EndpointsExist = Assert<IsNever<EndpointUnion> extends false ? true : false>
62export type EndpointRequests = HttpApiEndpoint.Request<EndpointUnion>
63export type ServerServices = HttpApiEndpoint.ServerServices<EndpointUnion>
64export type ClientServices = HttpApiEndpoint.ClientServices<EndpointUnion>
65`
66
67const clientMethodsFixture = () => `// Compares grouped client method derivation from 500 same-shaped endpoints.
68${imports({ client: true })}

Callers 1

httpapi.mjsFile · 0.85

Calls 2

apiFunction · 0.85
importsFunction · 0.70

Tested by

no test coverage detected