Repository navigation
Conversation
… type` `ProcedureContract` (@orpc/server), `AsyncIteratorClass` (@orpc/contract, @orpc/publisher) and `OpenAPIV3_0`/`OpenAPIV3_1`/`OpenAPIV3_2` (@orpc/openapi) were re-exported with `export type`. The bundled .d.mts drops the `type` modifier and declares them as value exports, while the runtime modules did not export them. A value import (an import without `type` under `verbatimModuleSyntax`, `instanceof`, ...) type-checked and then failed at load with "does not provide an export named ...". Re-export them as values so the runtime matches the declarations. The classes are already value exports of @orpc/contract, @orpc/client and @orpc/server, and the @openapi-spec/types modules are empty at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U63hBfpeESmJiHXznRFzjN
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
orpc | 494334c | Commit Preview URL Branch Preview URL |
Oct 24 2026, 01:33 PM |
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
More templates
@orpc/ai-sdk
@orpc/arktype
@orpc/bun
@orpc/client
@orpc/cloudflare
@orpc/contract
@orpc/effect
@orpc/evlog
@orpc/hibernation
@orpc/json-schema
@orpc/experimental-lock
@orpc/mcp
@orpc/msw
@orpc/nest
@orpc/next
@orpc/node
@orpc/openapi
@orpc/opentelemetry
@orpc/pinia-colada
@orpc/pino
@orpc/publisher
@orpc/ratelimit
@orpc/server
@orpc/shared
@orpc/swr
@orpc/tanstack-query
@orpc/trpc
@orpc/valibot
@orpc/zod
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
@orpc/server—ProcedureContractmoved out of the type-only@orpc/contractre-export list into the valueexport { … } from '@orpc/contract'list.@orpc/contract/@orpc/publisher—AsyncIteratorClassre-exported from@orpc/sharedas a value instead ofexport type.@orpc/openapi—OpenAPIV3_0/1/2switched fromimport type * as+export typetoimport * as+export, so the namespaces exist at runtime.
I reproduced the defect independently: reverting only the @orpc/contract index change and rebuilding produces a dist/index.d.mts that declares export { AsyncIteratorClass, … } as a value while dist/index.mjs exports nothing by that name — exactly the dts/runtime split described. On the branch, the built .mjs for all four packages exports the six names, and the .d.mts declarations are unchanged in what they expose. @openapi-spec/types/v3.x resolves to 1-byte empty .mjs modules, so the namespace re-exports safely yield {} at runtime, and the package was already a declared dependency. I also swept every export type in packages/*/src — all remaining ones are genuine type aliases/interfaces/callbacks, no export type * anywhere, so the six listed are the complete set.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Problem
Six re-exports used
export typefor something that is a runtime value:@orpc/serverProcedureContract@orpc/contract@orpc/contractAsyncIteratorClass@orpc/shared@orpc/publisherAsyncIteratorClass@orpc/shared@orpc/openapiOpenAPIV3_0,OpenAPIV3_1,OpenAPIV3_2@openapi-spec/typesThe bundled
.d.mtsdrops thetypemodifier, so each one is declared as a value export (declare class …/import * as …plusexport { … }). The runtime module did not export them. As a result, these type-check but crash when the module loads:x instanceof ProcedureContract;verbatimModuleSyntax, even an import withouttypethat is used only in type positions. That combination is common, for example in Vite's templates.The
OpenAPIV3_xnamespaces are affected the same way. The repo's lint rule tells users to get them from@orpc/*rather than@openapi-spec/types.Fix
Re-export them as values so the runtime matches the declarations:
@orpc/server:ProcedureContractmoves into the valueexport { … } from '@orpc/contract'list.@orpc/contract,@orpc/publisher:export { AsyncIteratorClass } from '@orpc/shared'.@orpc/openapi:types.tsimports the three namespaces withimport * asand re-exports them with a plainexport { … }.Nothing new becomes public:
ProcedureContractis already a value export of@orpc/contract.AsyncIteratorClassis already a value export of@orpc/clientand@orpc/server; these re-exports are the same class object.@openapi-spec/typesmodules are empty (1 byte) at runtime and were already a runtime dependency of@orpc/openapi.The emitted
.d.mtsdeclarations do not change.Verification
export typere-export of a runtime value, across all entry points of every package, was found with the TypeScript checker. These six are the complete list.pnpm lint,pnpm type:check(including the playgrounds and@orpc/nest), the tests of the touched and dependent packages, andpnpm docs:validatepass.mainand from this branch. On each of the 72 entry points, the names the.d.mtsexports as values were compared with the runtime module's exports:main: the six names above are missing at runtime;@orpc/nextand@orpc/cloudflarecannot load in plain Node, so their runtime exports could not be compared; they have no affected re-exports.Generated by Claude Code