Skip to content

fix(openapi): preserve event iterator return type in JsonifiedClient - #1798

Merged
dinwwwh merged 1 commit into
1.xfrom
claude/pr-1797-v1-d53998
Aug 7, 2026
Merged

fix(openapi): preserve event iterator return type in JsonifiedClient#1798
dinwwwh merged 1 commit into
1.xfrom
claude/pr-1797-v1-d53998

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Aug 7, 2026

Copy link
Copy Markdown
Member

v1 port of #1797. JsonifiedClient was losing an event iterator's return type: a contract with eventIterator(z.number(), z.number()) produced an iterator with TReturn = any instead of the jsonified return type. AsyncIteratorClass's return(value?: any) signature made TypeScript infer TReturn as any when matched against AsyncIteratorObject<infer U, infer V>, since inference works off actual method signatures rather than the implements clause.

Fixes #1796

Fixes

Testing

  • New type tests cover JsonifiedValue over AsyncIteratorClass/AsyncGenerator/AsyncIteratorObject and the end-to-end reproduction through JsonifiedClient (using v1's eventIterator + ContractRouterClient); three assertions fail before the fix and pass after.
  • Root tsc -b, tsc --noEmit, and eslint are clean.

@pullfrog

pullfrog Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
  • Checkout PR and read full diff
  • Triage: understand JsonifiedClient / JsonifiedValue type changes
  • Read the PR summary file
  • Verify tests actually catch the bug
  • Dispatch specialists if needed
  • Submit review

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orpc Ready Ready Preview Aug 7, 2026 12:28am

@dinwwwh dinwwwh changed the title fix(openapi-client): preserve event iterator return type in JsonifiedClient fix(openapi): preserve event iterator return type in JsonifiedClient Aug 7, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@1798

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1798

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1798

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1798

@orpc/experimental-durable-iterator

npm i https://pkg.pr.new/@orpc/experimental-durable-iterator@1798

@orpc/hey-api

npm i https://pkg.pr.new/@orpc/hey-api@1798

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1798

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1798

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1798

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1798

@orpc/openapi-client

npm i https://pkg.pr.new/@orpc/openapi-client@1798

@orpc/otel

npm i https://pkg.pr.new/@orpc/otel@1798

@orpc/experimental-pino

npm i https://pkg.pr.new/@orpc/experimental-pino@1798

@orpc/experimental-publisher

npm i https://pkg.pr.new/@orpc/experimental-publisher@1798

@orpc/experimental-publisher-durable-object

npm i https://pkg.pr.new/@orpc/experimental-publisher-durable-object@1798

@orpc/experimental-ratelimit

npm i https://pkg.pr.new/@orpc/experimental-ratelimit@1798

@orpc/react

npm i https://pkg.pr.new/@orpc/react@1798

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@1798

@orpc/experimental-react-swr

npm i https://pkg.pr.new/@orpc/experimental-react-swr@1798

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1798

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1798

@orpc/solid-query

npm i https://pkg.pr.new/@orpc/solid-query@1798

@orpc/standard-server

npm i https://pkg.pr.new/@orpc/standard-server@1798

@orpc/standard-server-aws-lambda

npm i https://pkg.pr.new/@orpc/standard-server-aws-lambda@1798

@orpc/standard-server-fastify

npm i https://pkg.pr.new/@orpc/standard-server-fastify@1798

@orpc/standard-server-fetch

npm i https://pkg.pr.new/@orpc/standard-server-fetch@1798

@orpc/standard-server-node

npm i https://pkg.pr.new/@orpc/standard-server-node@1798

@orpc/standard-server-peer

npm i https://pkg.pr.new/@orpc/standard-server-peer@1798

@orpc/svelte-query

npm i https://pkg.pr.new/@orpc/svelte-query@1798

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1798

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@1798

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1798

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@1798

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@1798

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1798

commit: b8acf1b

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dinwwwh
dinwwwh merged commit 17551f0 into 1.x Aug 7, 2026
6 of 7 checks passed
@dinwwwh
dinwwwh deleted the claude/pr-1797-v1-d53998 branch August 8, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant