fix(server): make callable extension type augmentation work in published builds - #1755
Merged
dinwwwh merged 1 commit intoJul 30, 2026
Conversation
…d of '../procedure-decorated'
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
callable.tsmodule augmentation fix — Changes the module augmentation target from a relative path (../procedure-decorated) to the bare package specifier (@orpc/server), matching the pattern used by every other extension (@orpc/effect,@orpc/next,@orpc/openapi).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
More templates
@orpc/ai-sdk
@orpc/arktype
@orpc/bun
@orpc/client
@orpc/cloudflare
@orpc/contract
@orpc/experimental-effect
@orpc/evlog
@orpc/json-schema
@orpc/nest
@orpc/next
@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! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
import '@orpc/server/extensions/callable'works at runtime, but in the published package.callable()fails type-checking:Root cause
The source augments
declare module '../procedure-decorated', which declaration bundling rewrites todeclare module "../index". That extensionless path resolves todist/index.d.ts, while consumers get their types fromdist/index.d.mtsvia the exports map — so the augmentation merges into a module the consumer never uses.The monorepo never sees this because dev exports point at
src.Fix
Augment
declare module '@orpc/server'instead, matching every other extension in the repo (next, effect, openapi). The bare specifier survives bundling and resolves to the same entry the consumer imports.Verification
pnpm testandpnpm type:checkpassdistworks