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

Function clientEndpointFixture

packages/effect/typeperf/compare/httpapi.mjs:142–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140`
141
142const clientEndpointFixture = () => `// Compares HttpApiClient.endpoint selection from 500 same-shaped endpoints.
143${imports({ client: true, effect: true, httpClient: true })}
144
145${warmup}
146
147${schemas}
148
149${api(500)}
150
151declare const httpClient: HttpClient.HttpClient
152
153const endpointClient = HttpApiClient.endpoint(api, {
154 group: "users",
155 endpoint: "getUser0500",
156 httpClient
157})
158
159type Method = Effect.Success<typeof endpointClient>
160
161${assertions}
162
163export type MethodExists = Assert<IsNever<Method> extends false ? true : false>
164export type EndpointClientRequest = Parameters<Method>[0]
165export type EndpointClientResult = ReturnType<Method>
166`
167
168const urlBuilderFixture = (topLevel) => `// Compares ${topLevel ? "top-level" : "grouped"} URL builder derivation from 500 same-shaped endpoints.
169${imports({ client: true })}

Callers 1

httpapi.mjsFile · 0.85

Calls 2

apiFunction · 0.85
importsFunction · 0.70

Tested by

no test coverage detected