Skip to content

fix(react-start-rsc): re-export renderable types from public entries#7278

Merged
schiller-manuel merged 2 commits intoTanStack:mainfrom
dake3601:rsc-types
Apr 28, 2026
Merged

fix(react-start-rsc): re-export renderable types from public entries#7278
schiller-manuel merged 2 commits intoTanStack:mainfrom
dake3601:rsc-types

Conversation

@dake3601
Copy link
Copy Markdown
Contributor

@dake3601 dake3601 commented Apr 27, 2026

Issue

renderServerComponent returns Promise<RenderableServerComponentBuilder<TNode>>,
but RenderableServerComponentBuilder isn't re-exported from the public entries.

Using declaration: true hits TS2742:

  > The inferred type of 'getChatHistory' cannot be named without a reference
  > to '.../ServerComponentTypes'. This is likely not portable.

Fix

Re-export RendaleServerComponent types.

Summary by CodeRabbit

  • Type System Improvements
    • Expanded exported server-component type definitions across package entry points, making richer TypeScript declarations available. This improves editor tooling and type-checking and reduces the need for ad-hoc type workarounds when using server-component APIs.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4002901-df69-4a85-8a38-a564d770167a

📥 Commits

Reviewing files that changed from the base of the PR and between dfbcb6f and 0510b1c.

📒 Files selected for processing (1)
  • .changeset/eight-dingos-occur.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/eight-dingos-occur.md

📝 Walkthrough

Walkthrough

This PR expands type exports from ServerComponentTypes in two entrypoints, adding AnyRenderableServerComponent, RenderableServerComponent, RenderableServerComponentAttributes, and RenderableServerComponentBuilder alongside AnyCompositeComponent. No runtime code or control flow changed.

Changes

Cohort / File(s) Summary
Type Export Expansion
packages/react-start-rsc/src/index.rsc.ts, packages/react-start-rsc/src/index.ts
Public type exports updated to re-export AnyRenderableServerComponent, RenderableServerComponent, RenderableServerComponentAttributes, and RenderableServerComponentBuilder in addition to AnyCompositeComponent.
Release Changeset
.changeset/eight-dingos-occur.md
Adds a changeset documenting the re-exports for a patch release of @tanstack/react-start-rsc to surface the new type exports to consumers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through types with glee,
I added four friends to the tree,
RSC and normal fold,
Exports now bold —
Hooray for tidy API spree! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: re-exporting renderable server component types from public entry points to resolve TS2742 errors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Apr 27, 2026

View your CI Pipeline Execution ↗ for commit 0510b1c

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 1m View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-27 23:29:19 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

Bundle Size Benchmarks

  • Commit: b0024d6310f1
  • Measured at: 2026-04-27T23:29:42.869Z
  • Baseline source: history:b0024d6310f1
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 87.30 KiB 0 B (0.00%) 274.68 KiB 75.83 KiB █████████▁▁
react-router.full 90.80 KiB 0 B (0.00%) 286.19 KiB 79.00 KiB ▁▁▁▁▁▁▁▁▁██
solid-router.minimal 35.55 KiB 0 B (0.00%) 106.95 KiB 31.97 KiB ▁▁▁▁▁████▁▁
solid-router.full 40.28 KiB 0 B (0.00%) 121.16 KiB 36.16 KiB ▁▄▄▄▄▆███▆▆
vue-router.minimal 53.30 KiB 0 B (0.00%) 152.09 KiB 47.88 KiB █████████▁▁
vue-router.full 58.44 KiB 0 B (0.00%) 168.27 KiB 52.33 KiB ▁▁▁▁▁▁▁▁▁██
react-start.minimal 101.92 KiB 0 B (0.00%) 322.84 KiB 88.06 KiB ▁▁▁▁▁▁▁▁▁██
react-start.full 105.34 KiB 0 B (0.00%) 333.17 KiB 90.98 KiB █████████▁▁
react-start.rsbuild.minimal 101.45 KiB 0 B (0.00%) 325.78 KiB 87.12 KiB ▁▁▁▁▁▁▁▁▁██
react-start.rsbuild.full 104.76 KiB 0 B (0.00%) 336.47 KiB 89.88 KiB ▁▁▁▁▁▁▁▁▁██
solid-start.minimal 49.55 KiB 0 B (0.00%) 152.77 KiB 43.68 KiB ▁▁▁▁▁████▂▂
solid-start.full 55.33 KiB 0 B (0.00%) 169.68 KiB 48.71 KiB ▁▄▄▄▄▅███▆▆

Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 27, 2026

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7278

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7278

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7278

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7278

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7278

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7278

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7278

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7278

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7278

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7278

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7278

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7278

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7278

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7278

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7278

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7278

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7278

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7278

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7278

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7278

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7278

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7278

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7278

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7278

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7278

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7278

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7278

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7278

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7278

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7278

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7278

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7278

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7278

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7278

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7278

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7278

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7278

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7278

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7278

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7278

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7278

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7278

commit: 0510b1c

@schiller-manuel
Copy link
Copy Markdown
Contributor

@copilot add a changeset

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 27, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing dake3601:rsc-types (0510b1c) with main (b0024d6)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@dake3601
Copy link
Copy Markdown
Contributor Author

Added changeset, I think copilot might not have access to my fork.

@schiller-manuel schiller-manuel merged commit d6decca into TanStack:main Apr 28, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants