Modules
Elixir server library for elixir-ts-rpc — a typed RPC layer between Elixir and TypeScript. Pre-1.0, so APIs may change. Start with Getting started.
Generates the TypeScript client from an RPC router.
Request-scoped context threaded through middleware and into handlers.
Teaches the library about a type it does not know.
Core dispatch pipeline: lookup → middleware → validate input → invoke handler → validate output → serialize.
Captures @spec and @type ASTs at handler-compile time. Exposes them
through the __rpc_specs__/0 and __rpc_types__/0 accessors.
Behaviour for procedure middleware.
Built-in middleware that puts static values into ctx.assigns.
Envelope threaded through the middleware pipeline for a single procedure
invocation. Middleware receive and return a %Resolution{}.
Macro-based DSL for defining RPC procedures in a router module. See Getting started for the surrounding setup.
Structured error returned from the dispatcher pipeline.
RpcElixir.Dispatcher owns the promotion rules for typed handler errors.
See Handling errors for the guide.
Type system for RPC procedure input and output specs.
EXPERIMENTAL backend. It reads signatures inferred by Elixir's set-theoretic
type system. The source is the ExCk BEAM chunk, not user-written @spec.
Reads classic @spec declarations from a compiled module's BEAM debug info,
via Code.Typespec. Translates them into the internal %{kind: ...} IR used
by handlers, routers, and codegen.
Built-in branded-number custom type. A DateTime crosses the wire as epoch
milliseconds. The emitted TypeScript brand is EpochMillis
(number & { readonly __brand: "EpochMillis" }). It stops callers passing a
bare number where an instant is expected.
Dev-only GenServer that triggers recompilation on router source changes.
Mix Tasks
Mix compiler that regenerates the TypeScript client on recompile.
Generates a TypeScript client file from a router module.
Watches Elixir sources and regenerates the TypeScript client on change.