Skip to content
tRPC

Packages and stability

The entry points of @trpc12/trpc, the framework packages, and what experimental_ and @stability promise.

On this page

Everything server- and client-side is one package, @trpc12/trpc, split into entry points:

EntryFor
@trpc12/trpc/serverinitTrpc, routers, handlers, callers, Publisher
@trpc12/trpc/clientcreateTrpcClient, links, safe
@trpc12/trpc/middlewareonStart, onSuccess, onError, onFinish, rateLimit, experimental_lock
@trpc12/trpc/actionsexperimental_createAction, experimental_createCallable
@trpc12/trpc/effectcreateEffectClient
@trpc12/trpc/httpserve, toHttpEffect on Effect's HttpServer
@trpc12/trpc/cloudflarehibernating WebSockets, publisher and locks on Durable Objects; Workers Traces
@trpc12/trpc/aws-lambdatoLambdaHandler for API Gateway, ALB and Lambda@Edge
@trpc12/trpc/socketserveSocket on Effect's SocketServer (TCP, TLS)
@trpc12/trpc/openapicreateOpenApiHandler, generateOpenApi, openApiLink
@trpc12/trpc/interopcreateV11Handler, fromV11Link for v11 code
@trpc12/trpc/contractcontract-first routers, toContract
@trpc12/trpc/serializerjsonSerializer, danSON, createSyncSerializer
@trpc12/trpc/extendbuilding blocks for integrations

Framework packages sit on top: @trpc12/tanstack-query and its React, Preact, Vue, Solid, Svelte, Angular and Lit adapters (TanStack Query), @trpc12/nest (NestJS), the experimental React packages (React without TanStack Query) and the @trpc12/upgrade codemod (Migrating from v11).

Stability

An export whose name starts with experimental_ (such as experimental_durableLink) may still change in a minor release, and so may every export of a package whose name starts with experimental- (such as @trpc12/experimental-react), whose exports have no prefix. When one becomes stable, it gets its name without the prefix, and the experimental_ name stays as a deprecated alias until the next major. npx @trpc12/upgrade rewrites those imports.

Every export's JSDoc carries @stability (stable or experimental) and @since. Until 12.0.0, prereleases promise nothing; @stability says how the export is planned to ship.

Internal entry points

@trpc12/trpc/internal holds types that declaration emit refers to. Don't import it; it has no semver. @trpc12/trpc/internal/testing is a semi-public TestServer Effect layer for real-server tests (with @effect/vitest's it.layer); it has no compatibility promise either. Test in process with createRouterClient or localLink (Server-side calls).