Commit 10e1e0e
authored
fix(server): make callable extension type augmentation work in published builds (#1755)
## Problem
`import '@orpc/server/extensions/callable'` works at runtime, but in the
published package `.callable()` fails type-checking:
```
Property 'callable' does not exist on type 'DecoratedProcedure<...>'
```
## Root cause
The source augments `declare module '../procedure-decorated'`, which
declaration bundling rewrites to `declare module "../index"`. That
extensionless path resolves to `dist/index.d.ts`, while consumers get
their types from `dist/index.d.mts` via 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 test` and `pnpm type:check` pass
- The built `dist` works1 parent 21251bb commit 10e1e0e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments