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

Function makeProto

packages/effect/src/unstable/httpapi/HttpApi.ts:204–214  ·  view source on GitHub ↗
(
  options: {
    readonly identifier: Id
    readonly groups: Record.ReadonlyRecord<string, HttpApiGroup.Constraint>
    readonly annotations: Context.Context<never>
  }
)

Source from the content-addressed store, hash-verified

202})
203
204const makeProto = <Id extends string, Groups extends HttpApiGroup.Constraint>(
205 options: {
206 readonly identifier: Id
207 readonly groups: Record.ReadonlyRecord<string, HttpApiGroup.Constraint>
208 readonly annotations: Context.Context<never>
209 }
210): HttpApi<Id, Groups> => {
211 function HttpApi() {}
212 Object.setPrototypeOf(HttpApi, Proto)
213 return Object.assign(HttpApi, options) as any
214}
215
216/**
217 * Creates an empty `HttpApi` with the supplied identifier.

Callers 7

addFunction · 0.70
addHttpApiFunction · 0.70
prefixFunction · 0.70
middlewareFunction · 0.70
annotateFunction · 0.70
annotateMergeFunction · 0.70
makeFunction · 0.70

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected