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

Function addHttpApi

packages/effect/src/unstable/httpapi/HttpApi.ts:154–171  ·  view source on GitHub ↗
(
    this: Top,
    api: Top
  )

Source from the content-addressed store, hash-verified

152 })
153 },
154 addHttpApi(
155 this: Top,
156 api: Top
157 ) {
158 const newGroups = { ...this.groups }
159 for (const key of Object.keys(api.groups)) {
160 const group = api.groups[key]
161 InternalRecord.assignProperty(
162 newGroups,
163 key,
164 group.annotateMerge(Context.merge(api.annotations, group.annotations))
165 )
166 }
167 return makeProto({
168 ...optionsFromApi(this),
169 groups: newGroups
170 })
171 },
172 prefix(this: Top, prefix: PathInput) {
173 return makeProto({
174 ...optionsFromApi(this),

Callers

nothing calls this directly

Calls 4

optionsFromApiFunction · 0.85
mergeMethod · 0.80
makeProtoFunction · 0.70
annotateMergeMethod · 0.65

Tested by

no test coverage detected