eos is the default Effect-aware procedure builder exported from effect-orpc.
import.ts
Basic use
basic.ts
Common methods
| Method | Purpose |
|---|---|
.$context<T>() | Set the initial oRPC context type. |
.provide(layer) | Provide a base Effect layer. |
.provide(tag, provider) | Provide a request-scoped service. |
.provideOptional(tag, provider) | Optionally provide a request-scoped service. |
.errors(map) | Add oRPC and tagged Effect errors. |
.input(schema) | Define input validation. |
.output(schema) | Define output validation. |
.use(middleware) | Add native or Effect middleware. |
.traced(name) | Override the Effect span name. |
.handler(fn) | Define a standard oRPC handler. |
.effect(fn) | Define an Effect handler. |
.prefix(prefix) | Prefix routes in a router. |
.tag(...tags) | Tag routes for OpenAPI. |
.router(router) | Apply options to a router. |
.lazy(loader) | Apply options to a lazy router. |