Skip to content

Expose thread.toJSON() on the public Thread type#235

Open
jacehwang wants to merge 1 commit intovercel:mainfrom
jacehwang:fix/thread-tojson-public-type
Open

Expose thread.toJSON() on the public Thread type#235
jacehwang wants to merge 1 commit intovercel:mainfrom
jacehwang:fix/thread-tojson-public-type

Conversation

@jacehwang
Copy link

Summary

  • add toJSON(): SerializedThread to the public Thread interface
  • add a consumer-facing type regression test for import type { Thread } from "chat"
  • include a patch changeset for the public type fix

Problem

ThreadImpl already exposes toJSON() at runtime and the docs/examples use thread.toJSON(), but the public Thread type in dist/index.d.ts did not include that method. This caused consumer builds to fail with:

Property 'toJSON' does not exist on type 'Thread<...>'

Testing

  • pnpm validate

@vercel
Copy link
Contributor

vercel bot commented Mar 13, 2026

@jacehwang is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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