MCPcopy
hub / github.com/Effect-TS/effect / middleware

Function middleware

packages/rpc/src/Rpc.ts:573–583  ·  view source on GitHub ↗
(this: AnyWithProps, middleware: RpcMiddleware.TagClassAny)

Source from the content-addressed store, hash-verified

571 })
572 },
573 middleware(this: AnyWithProps, middleware: RpcMiddleware.TagClassAny) {
574 return makeProto({
575 _tag: this._tag,
576 payloadSchema: this.payloadSchema,
577 successSchema: this.successSchema,
578 errorSchema: this.errorSchema,
579 defectSchema: this.defectSchema,
580 annotations: this.annotations,
581 middlewares: new Set([...this.middlewares, middleware])
582 })
583 },
584 prefix(this: AnyWithProps, prefix: string) {
585 return makeProto({
586 _tag: `${prefix}${this._tag}`,

Callers 4

applyMiddlewareFunction · 0.70
layerClientFunction · 0.70
onEffectRequestFunction · 0.70
RpcClient.tsFile · 0.70

Calls 1

makeProtoFunction · 0.70

Tested by

no test coverage detected