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

Function prefix

packages/effect/src/unstable/rpc/RpcGroup.ts:316–326  ·  view source on GitHub ↗
(this: RpcGroup<any>, prefix: Prefix)

Source from the content-addressed store, hash-verified

314 })
315 },
316 prefix<const Prefix extends string>(this: RpcGroup<any>, prefix: Prefix) {
317 const requests = new Map<string, any>()
318 for (const rpc of this.requests.values()) {
319 const newRpc = rpc.prefix(prefix)
320 requests.set(newRpc._tag, newRpc)
321 }
322 return makeProto({
323 requests,
324 annotations: this.annotations
325 })
326 },
327 toLayer(this: RpcGroup<any>, build: Effect.Effect<Record<string, (request: any) => any>>) {
328 return Layer.effectContext(this.toHandlers(build))
329 },

Callers

nothing calls this directly

Calls 3

makeProtoFunction · 0.70
prefixMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected