Repository navigation
fix(next): rename UserSeverFunctionOptions typo to UseServerFunctionOptions - #2420
Conversation
…onOptions` The options type for `useServerFunction` was misspelled. The old name is kept as a deprecated type alias exported from `@orpc/next/hooks`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PA8Ff7L1iws43MSJ4
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: |
The misspelled name never shipped in v1, so no alias is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVaw7PA8Ff7L1iws43MSJ4
There was a problem hiding this comment.
Reviewed changes
This PR fixes a typo in the type name UserSeverFunctionOptions to UseServerFunctionOptions across the packages/next/src/hooks module. A @deprecated type alias is exported to maintain backward compatibility for beta users.
- Rename type: Updated the interface name and all internal references to use the correct spelling.
- Backward compatibility: Added a
@deprecatedaliasUserSeverFunctionOptionsinindex.tsso existing consumers don't break. - Verification: Ran
pnpm vitest run packages/next, all 31 tests passed.
No issues found. Ready to merge.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Reviewed changes
This follow-up commit removes the deprecated UserSeverFunctionOptions alias from packages/next/src/hooks/index.ts, leaving the PR as a clean, direct rename to UseServerFunctionOptions.
- Dropped deprecated alias: The misspelled name only existed in v2 betas (v1 used
UseServerActionOptions), so the author chose not to carry a deprecated export forward. - Final scope: 2 files changed (
server-function.tsandoptimistic-server-function.ts), no alias inindex.ts. - Verification: Re-ran
pnpm vitest run packages/next; all 31 tests pass with the alias removed.
The breaking change is intentional and justified in the PR body. Ready to merge.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |

The options type for
useServerFunction(also extended byuseOptimisticServerFunction's options) was misspelled asUserSeverFunctionOptions. Renamed toUseServerFunctionOptionsinpackages/next/src/hooks.No deprecated alias: the misspelled name only exists in v2 betas (v1 used
UseServerActionOptions).Checks: root
tsc,eslint packages/next/src/hooks,vitest run packages/next(31 tests) pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01VVaw7PA8Ff7L1iws43MSJ4