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

Function add

packages/effect/src/unstable/httpapi/HttpApiGroup.ts:308–317  ·  view source on GitHub ↗
(this: Top, ...toAdd: NonEmptyReadonlyArray<HttpApiEndpoint.Top>)

Source from the content-addressed store, hash-verified

306const Proto = {
307 [TypeId]: TypeId,
308 add(this: Top, ...toAdd: NonEmptyReadonlyArray<HttpApiEndpoint.Top>) {
309 const endpoints = { ...this.endpoints }
310 for (const endpoint of toAdd) {
311 InternalRecord.assignProperty(endpoints, endpoint.identifier, endpoint)
312 }
313 return makeProto({
314 ...optionsFromGroup(this),
315 endpoints
316 })
317 },
318 prefix(this: Top, prefix: PathInput) {
319 return makeProto({
320 ...optionsFromGroup(this),

Callers

nothing calls this directly

Calls 2

optionsFromGroupFunction · 0.85
makeProtoFunction · 0.70

Tested by

no test coverage detected