MCPcopy Index your code
hub / github.com/Effect-TS/effect / makeProto

Function makeProto

packages/rpc/src/Rpc.ts:619–639  ·  view source on GitHub ↗
(options: {
  readonly _tag: Tag
  readonly payloadSchema: Payload
  readonly successSchema: Success
  readonly errorSchema: Error
  readonly defectSchema: Schema.Schema<unknown, any>
  readonly annotations: Context_.Context<never>
  readonly middlewares: ReadonlySet<Middleware>
})

Source from the content-addressed store, hash-verified

617}
618
619const makeProto = <
620 const Tag extends string,
621 Payload extends Schema.Schema.Any,
622 Success extends Schema.Schema.Any,
623 Error extends Schema.Schema.All,
624 Middleware extends RpcMiddleware.TagClassAny
625>(options: {
626 readonly _tag: Tag
627 readonly payloadSchema: Payload
628 readonly successSchema: Success
629 readonly errorSchema: Error
630 readonly defectSchema: Schema.Schema<unknown, any>
631 readonly annotations: Context_.Context<never>
632 readonly middlewares: ReadonlySet<Middleware>
633}): Rpc<Tag, Payload, Success, Error, Middleware> => {
634 function Rpc() {}
635 Object.setPrototypeOf(Rpc, Proto)
636 Object.assign(Rpc, options)
637 Rpc.key = `@effect/rpc/Rpc/${options._tag}`
638 return Rpc as any
639}
640
641/**
642 * @since 1.0.0

Callers 9

setSuccessFunction · 0.70
setErrorFunction · 0.70
setPayloadFunction · 0.70
middlewareFunction · 0.70
prefixFunction · 0.70
annotateFunction · 0.70
annotateContextFunction · 0.70
makeFunction · 0.70
fromTaggedRequestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected