Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eight-dingos-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/react-start-rsc': patch
---

Re-export `RenderableServerComponent`, `RenderableServerComponentAttributes`, `RenderableServerComponentBuilder`, and `AnyRenderableServerComponent` from the package's public entries. Without these, consumers with `declaration: true` hit TS2742 on `renderServerComponent` calls and are forced to annotate handlers as `Promise<any>`.
8 changes: 7 additions & 1 deletion packages/react-start-rsc/src/index.rsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
// This file is used when importing from RSC (React Server Components) context

// Types are always available
export type { AnyCompositeComponent } from './ServerComponentTypes'
export type {
AnyCompositeComponent,
AnyRenderableServerComponent,
RenderableServerComponent,
RenderableServerComponentAttributes,
RenderableServerComponentBuilder,
} from './ServerComponentTypes'

// New API: renderServerComponent - renders element to renderable proxy
export { renderServerComponent } from './renderServerComponent.js'
Expand Down
8 changes: 7 additions & 1 deletion packages/react-start-rsc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
// This file is used when importing outside of RSC (React Server Components) context

// Types are always available
export type { AnyCompositeComponent } from './ServerComponentTypes'
export type {
AnyCompositeComponent,
AnyRenderableServerComponent,
RenderableServerComponent,
RenderableServerComponentAttributes,
RenderableServerComponentBuilder,
} from './ServerComponentTypes'

// CSS hrefs symbol for type-safe access
export { SERVER_COMPONENT_CSS_HREFS } from './ServerComponentTypes'
Expand Down
Loading