Which project does this relate to?
Start
Describe the bug
The boilerplate code in the Server Entry Point TanStack Start docs page is giving type errors.
import handler, { createServerEntry } from '@tanstack/react-start/server-entry'
type MyRequestContext = {
hello: string
foo: number
}
declare module '@tanstack/react-start' {
interface Register {
server: {
requestContext: MyRequestContext
}
}
}
export default createServerEntry({
async fetch(request) {
return handler.fetch(request, { context: { hello: 'world', foo: 123 } })
},
})
Complete minimal reproducer
https://github.com/flexdinesh/tanstack-start-request-context-repro/blob/main/src/server.ts
Steps to Reproduce the Bug
- bootstrap a new tanstack app
pnpm dlx @tanstack/cli@latest create
- create src/server.ts file
- copy paste the code from docs
Expected behavior
The types should be inferred and shouldn't show an error
Screenshots or Videos
Platform
- Router / Start Version: 1.169.2
- OS: macOS
- Bundler: vite
- Bundler Version: 8.0.12
Additional context
No response
Which project does this relate to?
Start
Describe the bug
The boilerplate code in the Server Entry Point TanStack Start docs page is giving type errors.
Complete minimal reproducer
https://github.com/flexdinesh/tanstack-start-request-context-repro/blob/main/src/server.ts
Steps to Reproduce the Bug
pnpm dlx @tanstack/cli@latest createExpected behavior
The types should be inferred and shouldn't show an error
Screenshots or Videos
Platform
Additional context
No response