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

Function makeProto

packages/effect/src/unstable/httpapi/HttpApiGroup.ts:366–380  ·  view source on GitHub ↗
(options: {
  readonly identifier: Id
  readonly topLevel: TopLevel
  readonly endpoints: Record.ReadonlyRecord<string, HttpApiEndpoint.Constraint>
  readonly annotations: Context.Context<never>
})

Source from the content-addressed store, hash-verified

364})
365
366const makeProto = <
367 Id extends string,
368 Endpoints extends HttpApiEndpoint.Constraint,
369 TopLevel extends (true | false)
370>(options: {
371 readonly identifier: Id
372 readonly topLevel: TopLevel
373 readonly endpoints: Record.ReadonlyRecord<string, HttpApiEndpoint.Constraint>
374 readonly annotations: Context.Context<never>
375}): HttpApiGroup<Id, Endpoints, TopLevel> => {
376 function HttpApiGroup() {}
377 Object.setPrototypeOf(HttpApiGroup, Proto)
378 HttpApiGroup.key = `effect/httpapi/HttpApiGroup/${options.identifier}`
379 return Object.assign(HttpApiGroup, options) as any
380}
381
382/**
383 * Creates an empty `HttpApiGroup` with the supplied identifier.

Callers 8

addFunction · 0.70
prefixFunction · 0.70
middlewareFunction · 0.70
annotateMergeFunction · 0.70
annotateFunction · 0.70
annotateEndpointsMergeFunction · 0.70
annotateEndpointsFunction · 0.70
makeFunction · 0.70

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected