(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>
})
| 617 | } |
| 618 | |
| 619 | const 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 |
no outgoing calls
no test coverage detected