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

Function merge

packages/effect/src/unstable/rpc/RpcGroup.ts:261–278  ·  view source on GitHub ↗
(this: RpcGroup<any>, ...groups: ReadonlyArray<RpcGroup<any>>)

Source from the content-addressed store, hash-verified

259 })
260 },
261 merge(this: RpcGroup<any>, ...groups: ReadonlyArray<RpcGroup<any>>) {
262 const requests = new Map(this.requests)
263 const annotations = new Map(this.annotations.mapUnsafe)
264
265 for (const group of groups) {
266 for (const [tag, rpc] of group.requests) {
267 requests.set(tag, rpc)
268 }
269 for (const [key, value] of group.annotations.mapUnsafe) {
270 annotations.set(key, value)
271 }
272 }
273
274 return makeProto({
275 requests,
276 annotations: Context.makeUnsafe(annotations)
277 })
278 },
279 omit(this: RpcGroup<any>, ...tags: Array<string>) {
280 const requests = new Map(this.requests)
281 for (const tag of tags) {

Callers

nothing calls this directly

Calls 2

makeProtoFunction · 0.70
setMethod · 0.65

Tested by

no test coverage detected