diff --git a/.changeset/thick-sloths-write.md b/.changeset/thick-sloths-write.md new file mode 100644 index 0000000000..71a7dbf532 --- /dev/null +++ b/.changeset/thick-sloths-write.md @@ -0,0 +1,9 @@ +--- +'@tanstack/start-client-core': patch +'@tanstack/start-server-core': patch +'@tanstack/react-start': patch +'@tanstack/solid-start': patch +'@tanstack/vue-start': patch +--- + +refactor(start): export and use its own `Register` interface diff --git a/docs/start/framework/react/guide/server-entry-point.md b/docs/start/framework/react/guide/server-entry-point.md index 5acc8ee550..90d6b2270c 100644 --- a/docs/start/framework/react/guide/server-entry-point.md +++ b/docs/start/framework/react/guide/server-entry-point.md @@ -64,7 +64,7 @@ export default createServerEntry({ When your server needs to pass additional, typed data into request handlers (for example, authenticated user info, a database connection, or per-request flags), register a request context type via TypeScript module augmentation. The registered context is delivered as the second argument to the server `fetch` handler and is available throughout the server-side middleware chain — including global middleware, request/function middleware, server routes, server functions, and the router itself. -To add types for your request context, augment the `Register` interface from `@tanstack/react-router` with a `server.requestContext` property. The runtime `context` you pass to `handler.fetch` will then match that type. Example: +To add types for your request context, augment the `Register` interface from `@tanstack/react-start` with a `server.requestContext` property. The runtime `context` you pass to `handler.fetch` will then match that type. Example: ```tsx import handler, { createServerEntry } from '@tanstack/react-start/server-entry' @@ -74,7 +74,7 @@ type MyRequestContext = { foo: number } -declare module '@tanstack/react-router' { +declare module '@tanstack/react-start' { interface Register { server: { requestContext: MyRequestContext diff --git a/docs/start/framework/solid/guide/server-entry-point.md b/docs/start/framework/solid/guide/server-entry-point.md index 80c226eaae..ef261fe9b6 100644 --- a/docs/start/framework/solid/guide/server-entry-point.md +++ b/docs/start/framework/solid/guide/server-entry-point.md @@ -1,9 +1,5 @@ --- ref: docs/start/framework/react/guide/server-entry-point.md replace: - { - '@tanstack/react-start': '@tanstack/solid-start', - '@tanstack/react-router': '@tanstack/solid-router', - 'React': 'SolidJS', - } + { '@tanstack/react-start': '@tanstack/solid-start', 'React': 'SolidJS' } --- diff --git a/e2e/react-start/basic-auth/src/routeTree.gen.ts b/e2e/react-start/basic-auth/src/routeTree.gen.ts index 6be84444eb..d59223be49 100644 --- a/e2e/react-start/basic-auth/src/routeTree.gen.ts +++ b/e2e/react-start/basic-auth/src/routeTree.gen.ts @@ -217,7 +217,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts b/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts index 4219501f5e..b643895af5 100644 --- a/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts +++ b/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/basic-react-query/src/routeTree.gen.ts b/e2e/react-start/basic-react-query/src/routeTree.gen.ts index a1bed86dfa..dd60ad2c5e 100644 --- a/e2e/react-start/basic-react-query/src/routeTree.gen.ts +++ b/e2e/react-start/basic-react-query/src/routeTree.gen.ts @@ -452,7 +452,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/basic-tsr-config/src/routeTree.gen.ts b/e2e/react-start/basic-tsr-config/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/e2e/react-start/basic-tsr-config/src/routeTree.gen.ts +++ b/e2e/react-start/basic-tsr-config/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/basic/src/routeTree.gen.ts b/e2e/react-start/basic/src/routeTree.gen.ts index b32796cafc..695ae52b52 100644 --- a/e2e/react-start/basic/src/routeTree.gen.ts +++ b/e2e/react-start/basic/src/routeTree.gen.ts @@ -1639,7 +1639,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/basic/src/server.ts b/e2e/react-start/basic/src/server.ts index 00d13b4d17..c89ad5e942 100644 --- a/e2e/react-start/basic/src/server.ts +++ b/e2e/react-start/basic/src/server.ts @@ -4,8 +4,21 @@ import handler from '@tanstack/react-start/server-entry' console.log("[server-entry]: using custom server entry in 'src/server.ts'") +declare module '@tanstack/react-start' { + interface Register { + server: { + /** + * This is just a test to make sure that the typing of the request context is working correctly in the custom server entry. + */ + requestContext: { + foo: string + } + } + } +} + export default { fetch(request: Request) { - return handler.fetch(request) + return handler.fetch(request, { context: { foo: 'bar' } }) }, } diff --git a/e2e/react-start/csp/src/routeTree.gen.ts b/e2e/react-start/csp/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/e2e/react-start/csp/src/routeTree.gen.ts +++ b/e2e/react-start/csp/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/css-inline/src/routeTree.gen.ts b/e2e/react-start/css-inline/src/routeTree.gen.ts index f663ab1b4e..b9cadca69c 100644 --- a/e2e/react-start/css-inline/src/routeTree.gen.ts +++ b/e2e/react-start/css-inline/src/routeTree.gen.ts @@ -161,7 +161,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/css-modules/src/routeTree.gen.ts b/e2e/react-start/css-modules/src/routeTree.gen.ts index d19ae80e5a..dbd3edbe31 100644 --- a/e2e/react-start/css-modules/src/routeTree.gen.ts +++ b/e2e/react-start/css-modules/src/routeTree.gen.ts @@ -114,7 +114,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/custom-basepath/src/routeTree.gen.ts b/e2e/react-start/custom-basepath/src/routeTree.gen.ts index 9aacbfbdf0..7cede0f08f 100644 --- a/e2e/react-start/custom-basepath/src/routeTree.gen.ts +++ b/e2e/react-start/custom-basepath/src/routeTree.gen.ts @@ -380,7 +380,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/custom-server-rsbuild/src/routeTree.gen.ts b/e2e/react-start/custom-server-rsbuild/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/e2e/react-start/custom-server-rsbuild/src/routeTree.gen.ts +++ b/e2e/react-start/custom-server-rsbuild/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts b/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts +++ b/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/early-hints/src/routeTree.gen.ts b/e2e/react-start/early-hints/src/routeTree.gen.ts index 14e2fd341e..1bf2705bc2 100644 --- a/e2e/react-start/early-hints/src/routeTree.gen.ts +++ b/e2e/react-start/early-hints/src/routeTree.gen.ts @@ -217,7 +217,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts b/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts index 198d538cd1..dd68e795d7 100644 --- a/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts +++ b/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts @@ -933,7 +933,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/hmr/src/routeTree.gen.ts b/e2e/react-start/hmr/src/routeTree.gen.ts index d2baf5bef6..27e8072778 100644 --- a/e2e/react-start/hmr/src/routeTree.gen.ts +++ b/e2e/react-start/hmr/src/routeTree.gen.ts @@ -278,7 +278,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts b/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts index 421daf2790..961a2cf97f 100644 --- a/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts +++ b/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts b/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts index 44861559e3..37fb94caaa 100644 --- a/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts +++ b/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts @@ -96,7 +96,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/query-integration/src/routeTree.gen.ts b/e2e/react-start/query-integration/src/routeTree.gen.ts index 22c6f3293d..0b9566e4fa 100644 --- a/e2e/react-start/query-integration/src/routeTree.gen.ts +++ b/e2e/react-start/query-integration/src/routeTree.gen.ts @@ -123,7 +123,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/rsc/src/routeTree.gen.ts b/e2e/react-start/rsc/src/routeTree.gen.ts index 015d3edf82..a579379b85 100644 --- a/e2e/react-start/rsc/src/routeTree.gen.ts +++ b/e2e/react-start/rsc/src/routeTree.gen.ts @@ -1030,7 +1030,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/scroll-restoration/src/routeTree.gen.ts b/e2e/react-start/scroll-restoration/src/routeTree.gen.ts index 5194bbc556..ce21340a2a 100644 --- a/e2e/react-start/scroll-restoration/src/routeTree.gen.ts +++ b/e2e/react-start/scroll-restoration/src/routeTree.gen.ts @@ -169,7 +169,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/selective-ssr/src/routeTree.gen.ts b/e2e/react-start/selective-ssr/src/routeTree.gen.ts index 188cd5c91a..6f9c704582 100644 --- a/e2e/react-start/selective-ssr/src/routeTree.gen.ts +++ b/e2e/react-start/selective-ssr/src/routeTree.gen.ts @@ -104,7 +104,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/serialization-adapters/src/routeTree.gen.ts b/e2e/react-start/serialization-adapters/src/routeTree.gen.ts index 3536724473..83b1b4a990 100644 --- a/e2e/react-start/serialization-adapters/src/routeTree.gen.ts +++ b/e2e/react-start/serialization-adapters/src/routeTree.gen.ts @@ -192,7 +192,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.tsx' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/server-functions-global-middleware/src/routeTree.gen.ts b/e2e/react-start/server-functions-global-middleware/src/routeTree.gen.ts index 6fb74e28a2..adb8b06dd9 100644 --- a/e2e/react-start/server-functions-global-middleware/src/routeTree.gen.ts +++ b/e2e/react-start/server-functions-global-middleware/src/routeTree.gen.ts @@ -148,7 +148,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/server-functions/src/routeTree.gen.ts b/e2e/react-start/server-functions/src/routeTree.gen.ts index 249a9c42ce..7363a26383 100644 --- a/e2e/react-start/server-functions/src/routeTree.gen.ts +++ b/e2e/react-start/server-functions/src/routeTree.gen.ts @@ -979,7 +979,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/server-routes-global-middleware/src/routeTree.gen.ts b/e2e/react-start/server-routes-global-middleware/src/routeTree.gen.ts index 6ec0a95128..08001d1dbe 100644 --- a/e2e/react-start/server-routes-global-middleware/src/routeTree.gen.ts +++ b/e2e/react-start/server-routes-global-middleware/src/routeTree.gen.ts @@ -79,7 +79,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/server-routes/src/routeTree.gen.ts b/e2e/react-start/server-routes/src/routeTree.gen.ts index 2b8bac6e09..12efb3afe8 100644 --- a/e2e/react-start/server-routes/src/routeTree.gen.ts +++ b/e2e/react-start/server-routes/src/routeTree.gen.ts @@ -312,7 +312,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/spa-mode/src/routeTree.gen.ts b/e2e/react-start/spa-mode/src/routeTree.gen.ts index 188cd5c91a..6f9c704582 100644 --- a/e2e/react-start/spa-mode/src/routeTree.gen.ts +++ b/e2e/react-start/spa-mode/src/routeTree.gen.ts @@ -104,7 +104,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/split-base-and-basepath/src/routeTree.gen.ts b/e2e/react-start/split-base-and-basepath/src/routeTree.gen.ts index 421daf2790..961a2cf97f 100644 --- a/e2e/react-start/split-base-and-basepath/src/routeTree.gen.ts +++ b/e2e/react-start/split-base-and-basepath/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/start-manifest/src/routeTree.gen.ts b/e2e/react-start/start-manifest/src/routeTree.gen.ts index b7ee033842..3f841a1c22 100644 --- a/e2e/react-start/start-manifest/src/routeTree.gen.ts +++ b/e2e/react-start/start-manifest/src/routeTree.gen.ts @@ -337,7 +337,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/static-server-functions/src/routeTree.gen.ts b/e2e/react-start/static-server-functions/src/routeTree.gen.ts index fa19f26a67..094908eab6 100644 --- a/e2e/react-start/static-server-functions/src/routeTree.gen.ts +++ b/e2e/react-start/static-server-functions/src/routeTree.gen.ts @@ -103,7 +103,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/streaming-ssr/src/routeTree.gen.ts b/e2e/react-start/streaming-ssr/src/routeTree.gen.ts index fb1073a34c..7c519fe6ea 100644 --- a/e2e/react-start/streaming-ssr/src/routeTree.gen.ts +++ b/e2e/react-start/streaming-ssr/src/routeTree.gen.ts @@ -253,7 +253,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts b/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts index 421daf2790..961a2cf97f 100644 --- a/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts +++ b/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/virtual-routes/src/routeTree.gen.ts b/e2e/react-start/virtual-routes/src/routeTree.gen.ts index 6a1de929b3..a2eb583e99 100644 --- a/e2e/react-start/virtual-routes/src/routeTree.gen.ts +++ b/e2e/react-start/virtual-routes/src/routeTree.gen.ts @@ -339,7 +339,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/react-start/website/src/routeTree.gen.ts b/e2e/react-start/website/src/routeTree.gen.ts index e26402107f..98547c848c 100644 --- a/e2e/react-start/website/src/routeTree.gen.ts +++ b/e2e/react-start/website/src/routeTree.gen.ts @@ -307,7 +307,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/basic-auth/src/routeTree.gen.ts b/e2e/solid-start/basic-auth/src/routeTree.gen.ts index 7019a6c21a..3d744aa482 100644 --- a/e2e/solid-start/basic-auth/src/routeTree.gen.ts +++ b/e2e/solid-start/basic-auth/src/routeTree.gen.ts @@ -217,7 +217,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/basic-cloudflare/src/routeTree.gen.ts b/e2e/solid-start/basic-cloudflare/src/routeTree.gen.ts index 2bd11546dd..f6c48d800f 100644 --- a/e2e/solid-start/basic-cloudflare/src/routeTree.gen.ts +++ b/e2e/solid-start/basic-cloudflare/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/basic-solid-query/src/routeTree.gen.ts b/e2e/solid-start/basic-solid-query/src/routeTree.gen.ts index ee02d13d55..4dd1e22901 100644 --- a/e2e/solid-start/basic-solid-query/src/routeTree.gen.ts +++ b/e2e/solid-start/basic-solid-query/src/routeTree.gen.ts @@ -431,7 +431,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/basic-tsr-config/src/app/routeTree.gen.ts b/e2e/solid-start/basic-tsr-config/src/app/routeTree.gen.ts index 4776246e1f..0b42d85050 100644 --- a/e2e/solid-start/basic-tsr-config/src/app/routeTree.gen.ts +++ b/e2e/solid-start/basic-tsr-config/src/app/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/basic/src/routeTree.gen.ts b/e2e/solid-start/basic/src/routeTree.gen.ts index c9fba32156..3e3d03a1f5 100644 --- a/e2e/solid-start/basic/src/routeTree.gen.ts +++ b/e2e/solid-start/basic/src/routeTree.gen.ts @@ -1420,7 +1420,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/basic/src/server.ts b/e2e/solid-start/basic/src/server.ts index d48e6df349..a6095893b6 100644 --- a/e2e/solid-start/basic/src/server.ts +++ b/e2e/solid-start/basic/src/server.ts @@ -4,8 +4,21 @@ import handler from '@tanstack/solid-start/server-entry' console.log("[server-entry]: using custom server entry in 'src/server.ts'") +declare module '@tanstack/solid-start' { + interface Register { + server: { + /** + * This is just a test to make sure that the typing of the request context is working correctly in the custom server entry. + */ + requestContext: { + foo: string + } + } + } +} + export default { fetch(request: Request) { - return handler.fetch(request) + return handler.fetch(request, { context: { foo: 'bar' } }) }, } diff --git a/e2e/solid-start/csp/src/routeTree.gen.ts b/e2e/solid-start/csp/src/routeTree.gen.ts index 4776246e1f..0b42d85050 100644 --- a/e2e/solid-start/csp/src/routeTree.gen.ts +++ b/e2e/solid-start/csp/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/custom-basepath/src/routeTree.gen.ts b/e2e/solid-start/custom-basepath/src/routeTree.gen.ts index f87b2b3731..bc9a6cb807 100644 --- a/e2e/solid-start/custom-basepath/src/routeTree.gen.ts +++ b/e2e/solid-start/custom-basepath/src/routeTree.gen.ts @@ -380,7 +380,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/query-integration/src/routeTree.gen.ts b/e2e/solid-start/query-integration/src/routeTree.gen.ts index bdd2163038..35dbd19c3c 100644 --- a/e2e/solid-start/query-integration/src/routeTree.gen.ts +++ b/e2e/solid-start/query-integration/src/routeTree.gen.ts @@ -96,7 +96,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/scroll-restoration/src/routeTree.gen.ts b/e2e/solid-start/scroll-restoration/src/routeTree.gen.ts index 4b8d19fbef..1fdf9f2a01 100644 --- a/e2e/solid-start/scroll-restoration/src/routeTree.gen.ts +++ b/e2e/solid-start/scroll-restoration/src/routeTree.gen.ts @@ -119,7 +119,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/selective-ssr/src/routeTree.gen.ts b/e2e/solid-start/selective-ssr/src/routeTree.gen.ts index df2b865e51..0418833763 100644 --- a/e2e/solid-start/selective-ssr/src/routeTree.gen.ts +++ b/e2e/solid-start/selective-ssr/src/routeTree.gen.ts @@ -128,7 +128,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/serialization-adapters/src/routeTree.gen.ts b/e2e/solid-start/serialization-adapters/src/routeTree.gen.ts index 09d0211154..a2ce3cf082 100644 --- a/e2e/solid-start/serialization-adapters/src/routeTree.gen.ts +++ b/e2e/solid-start/serialization-adapters/src/routeTree.gen.ts @@ -170,7 +170,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.tsx' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/server-functions/src/routeTree.gen.ts b/e2e/solid-start/server-functions/src/routeTree.gen.ts index 329a70726e..1ff8f70e53 100644 --- a/e2e/solid-start/server-functions/src/routeTree.gen.ts +++ b/e2e/solid-start/server-functions/src/routeTree.gen.ts @@ -676,7 +676,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/server-routes/src/routeTree.gen.ts b/e2e/solid-start/server-routes/src/routeTree.gen.ts index 87cd58b0ea..f4c6c5f9f5 100644 --- a/e2e/solid-start/server-routes/src/routeTree.gen.ts +++ b/e2e/solid-start/server-routes/src/routeTree.gen.ts @@ -249,7 +249,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/solid-query-layout-suspense/src/routeTree.gen.ts b/e2e/solid-start/solid-query-layout-suspense/src/routeTree.gen.ts index e120a08bd4..1022dd64fe 100644 --- a/e2e/solid-start/solid-query-layout-suspense/src/routeTree.gen.ts +++ b/e2e/solid-start/solid-query-layout-suspense/src/routeTree.gen.ts @@ -105,7 +105,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/spa-mode/src/routeTree.gen.ts b/e2e/solid-start/spa-mode/src/routeTree.gen.ts index 423535df71..46fe28757f 100644 --- a/e2e/solid-start/spa-mode/src/routeTree.gen.ts +++ b/e2e/solid-start/spa-mode/src/routeTree.gen.ts @@ -104,7 +104,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/start-manifest/src/routeTree.gen.ts b/e2e/solid-start/start-manifest/src/routeTree.gen.ts index 982f80b150..4f0cd9f3ab 100644 --- a/e2e/solid-start/start-manifest/src/routeTree.gen.ts +++ b/e2e/solid-start/start-manifest/src/routeTree.gen.ts @@ -337,7 +337,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/virtual-routes/src/routeTree.gen.ts b/e2e/solid-start/virtual-routes/src/routeTree.gen.ts index 810468171a..53767b3e6e 100644 --- a/e2e/solid-start/virtual-routes/src/routeTree.gen.ts +++ b/e2e/solid-start/virtual-routes/src/routeTree.gen.ts @@ -339,7 +339,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/solid-start/website/src/routeTree.gen.ts b/e2e/solid-start/website/src/routeTree.gen.ts index c37e78d2f1..30c3be7e49 100644 --- a/e2e/solid-start/website/src/routeTree.gen.ts +++ b/e2e/solid-start/website/src/routeTree.gen.ts @@ -284,7 +284,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/basic-auth/src/routeTree.gen.ts b/e2e/vue-start/basic-auth/src/routeTree.gen.ts index a0a61b0279..a350627d35 100644 --- a/e2e/vue-start/basic-auth/src/routeTree.gen.ts +++ b/e2e/vue-start/basic-auth/src/routeTree.gen.ts @@ -217,7 +217,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts b/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts index 30451e7ab7..9051282209 100644 --- a/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts +++ b/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/basic-tsr-config/src/app/routeTree.gen.ts b/e2e/vue-start/basic-tsr-config/src/app/routeTree.gen.ts index 7a8d4c0038..13117e1c91 100644 --- a/e2e/vue-start/basic-tsr-config/src/app/routeTree.gen.ts +++ b/e2e/vue-start/basic-tsr-config/src/app/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts b/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts index 2c514d54ea..ed7301fa36 100644 --- a/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts +++ b/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts @@ -431,7 +431,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/basic/src/routeTree.gen.ts b/e2e/vue-start/basic/src/routeTree.gen.ts index 016a292835..e9818ce51d 100644 --- a/e2e/vue-start/basic/src/routeTree.gen.ts +++ b/e2e/vue-start/basic/src/routeTree.gen.ts @@ -1355,7 +1355,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/basic/src/server.ts b/e2e/vue-start/basic/src/server.ts index 8195b0ae95..249f259356 100644 --- a/e2e/vue-start/basic/src/server.ts +++ b/e2e/vue-start/basic/src/server.ts @@ -4,8 +4,21 @@ import handler from '@tanstack/vue-start/server-entry' console.log("[server-entry]: using custom server entry in 'src/server.ts'") +declare module '@tanstack/vue-start' { + interface Register { + server: { + /** + * This is just a test to make sure that the typing of the request context is working correctly in the custom server entry. + */ + requestContext: { + foo: string + } + } + } +} + export default { fetch(request: Request) { - return handler.fetch(request) + return handler.fetch(request, { context: { foo: 'bar' } }) }, } diff --git a/e2e/vue-start/custom-basepath/src/routeTree.gen.ts b/e2e/vue-start/custom-basepath/src/routeTree.gen.ts index ea7e127d8e..4817b9d9d2 100644 --- a/e2e/vue-start/custom-basepath/src/routeTree.gen.ts +++ b/e2e/vue-start/custom-basepath/src/routeTree.gen.ts @@ -359,7 +359,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/query-integration/src/routeTree.gen.ts b/e2e/vue-start/query-integration/src/routeTree.gen.ts index d4d30083a0..47c172284d 100644 --- a/e2e/vue-start/query-integration/src/routeTree.gen.ts +++ b/e2e/vue-start/query-integration/src/routeTree.gen.ts @@ -96,7 +96,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts b/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts index 86dc966e78..a364746c15 100644 --- a/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts +++ b/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts @@ -119,7 +119,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/selective-ssr/src/routeTree.gen.ts b/e2e/vue-start/selective-ssr/src/routeTree.gen.ts index 474705b7e7..968cf85947 100644 --- a/e2e/vue-start/selective-ssr/src/routeTree.gen.ts +++ b/e2e/vue-start/selective-ssr/src/routeTree.gen.ts @@ -104,7 +104,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts b/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts index 79b17ac82b..7940576f5f 100644 --- a/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts +++ b/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts @@ -170,7 +170,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.tsx' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/server-functions/src/routeTree.gen.ts b/e2e/vue-start/server-functions/src/routeTree.gen.ts index 43a6eb4ae6..c2a3cd2430 100644 --- a/e2e/vue-start/server-functions/src/routeTree.gen.ts +++ b/e2e/vue-start/server-functions/src/routeTree.gen.ts @@ -655,7 +655,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/server-routes/src/routeTree.gen.ts b/e2e/vue-start/server-routes/src/routeTree.gen.ts index 7d9d463772..19b58571ef 100644 --- a/e2e/vue-start/server-routes/src/routeTree.gen.ts +++ b/e2e/vue-start/server-routes/src/routeTree.gen.ts @@ -249,7 +249,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/spa-mode/src/routeTree.gen.ts b/e2e/vue-start/spa-mode/src/routeTree.gen.ts index 474705b7e7..968cf85947 100644 --- a/e2e/vue-start/spa-mode/src/routeTree.gen.ts +++ b/e2e/vue-start/spa-mode/src/routeTree.gen.ts @@ -104,7 +104,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/start-manifest/src/routeTree.gen.ts b/e2e/vue-start/start-manifest/src/routeTree.gen.ts index 357d3be62b..a61e4eb0a7 100644 --- a/e2e/vue-start/start-manifest/src/routeTree.gen.ts +++ b/e2e/vue-start/start-manifest/src/routeTree.gen.ts @@ -337,7 +337,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/virtual-routes/src/routeTree.gen.ts b/e2e/vue-start/virtual-routes/src/routeTree.gen.ts index 94664b2e5b..4feb41d263 100644 --- a/e2e/vue-start/virtual-routes/src/routeTree.gen.ts +++ b/e2e/vue-start/virtual-routes/src/routeTree.gen.ts @@ -339,7 +339,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/e2e/vue-start/website/src/routeTree.gen.ts b/e2e/vue-start/website/src/routeTree.gen.ts index e7b58aae2a..c7db0922c8 100644 --- a/e2e/vue-start/website/src/routeTree.gen.ts +++ b/e2e/vue-start/website/src/routeTree.gen.ts @@ -284,7 +284,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { +declare module '@tanstack/vue-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-bare/src/routeTree.gen.ts b/examples/react/start-bare/src/routeTree.gen.ts index 421daf2790..961a2cf97f 100644 --- a/examples/react/start-bare/src/routeTree.gen.ts +++ b/examples/react/start-bare/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-basic-auth/src/routeTree.gen.ts b/examples/react/start-basic-auth/src/routeTree.gen.ts index 389f656645..51ff88d9eb 100644 --- a/examples/react/start-basic-auth/src/routeTree.gen.ts +++ b/examples/react/start-basic-auth/src/routeTree.gen.ts @@ -216,7 +216,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-basic-authjs/src/routeTree.gen.ts b/examples/react/start-basic-authjs/src/routeTree.gen.ts index 2f59e4ba33..f87ff005f6 100644 --- a/examples/react/start-basic-authjs/src/routeTree.gen.ts +++ b/examples/react/start-basic-authjs/src/routeTree.gen.ts @@ -114,7 +114,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-basic-cloudflare/src/routeTree.gen.ts b/examples/react/start-basic-cloudflare/src/routeTree.gen.ts index 0bd698a666..529ba584af 100644 --- a/examples/react/start-basic-cloudflare/src/routeTree.gen.ts +++ b/examples/react/start-basic-cloudflare/src/routeTree.gen.ts @@ -439,7 +439,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-basic-react-query/src/routeTree.gen.ts b/examples/react/start-basic-react-query/src/routeTree.gen.ts index a3a4ddf49f..4fbd694688 100644 --- a/examples/react/start-basic-react-query/src/routeTree.gen.ts +++ b/examples/react/start-basic-react-query/src/routeTree.gen.ts @@ -422,7 +422,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-basic-static/src/routeTree.gen.ts b/examples/react/start-basic-static/src/routeTree.gen.ts index ddc8fc320a..31e50c0dbb 100644 --- a/examples/react/start-basic-static/src/routeTree.gen.ts +++ b/examples/react/start-basic-static/src/routeTree.gen.ts @@ -366,7 +366,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-basic/src/routeTree.gen.ts b/examples/react/start-basic/src/routeTree.gen.ts index 0bd698a666..529ba584af 100644 --- a/examples/react/start-basic/src/routeTree.gen.ts +++ b/examples/react/start-basic/src/routeTree.gen.ts @@ -439,7 +439,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-bun/src/routeTree.gen.ts b/examples/react/start-bun/src/routeTree.gen.ts index 18fbc9b60e..b6b913e071 100644 --- a/examples/react/start-bun/src/routeTree.gen.ts +++ b/examples/react/start-bun/src/routeTree.gen.ts @@ -127,7 +127,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-clerk-basic/src/routeTree.gen.ts b/examples/react/start-clerk-basic/src/routeTree.gen.ts index 04f57442e2..7c7fb2bee8 100644 --- a/examples/react/start-clerk-basic/src/routeTree.gen.ts +++ b/examples/react/start-clerk-basic/src/routeTree.gen.ts @@ -172,7 +172,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-convex-trellaux/src/routeTree.gen.ts b/examples/react/start-convex-trellaux/src/routeTree.gen.ts index 0b6ddaa12c..620e332a68 100644 --- a/examples/react/start-convex-trellaux/src/routeTree.gen.ts +++ b/examples/react/start-convex-trellaux/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-counter/src/routeTree.gen.ts b/examples/react/start-counter/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/examples/react/start-counter/src/routeTree.gen.ts +++ b/examples/react/start-counter/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-i18n-paraglide/src/routeTree.gen.ts b/examples/react/start-i18n-paraglide/src/routeTree.gen.ts index 421daf2790..961a2cf97f 100644 --- a/examples/react/start-i18n-paraglide/src/routeTree.gen.ts +++ b/examples/react/start-i18n-paraglide/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-large/src/routeTree.gen.ts b/examples/react/start-large/src/routeTree.gen.ts index 03cc2b9080..36d368265a 100644 --- a/examples/react/start-large/src/routeTree.gen.ts +++ b/examples/react/start-large/src/routeTree.gen.ts @@ -231,7 +231,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-material-ui/src/routeTree.gen.ts b/examples/react/start-material-ui/src/routeTree.gen.ts index 421daf2790..961a2cf97f 100644 --- a/examples/react/start-material-ui/src/routeTree.gen.ts +++ b/examples/react/start-material-ui/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-rscs/src/routeTree.gen.ts b/examples/react/start-rscs/src/routeTree.gen.ts index ca4cef3864..6ed6a97788 100644 --- a/examples/react/start-rscs/src/routeTree.gen.ts +++ b/examples/react/start-rscs/src/routeTree.gen.ts @@ -169,7 +169,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-streaming-data-from-server-functions/src/routeTree.gen.ts b/examples/react/start-streaming-data-from-server-functions/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/examples/react/start-streaming-data-from-server-functions/src/routeTree.gen.ts +++ b/examples/react/start-streaming-data-from-server-functions/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-supabase-basic/src/routeTree.gen.ts b/examples/react/start-supabase-basic/src/routeTree.gen.ts index 6be84444eb..d59223be49 100644 --- a/examples/react/start-supabase-basic/src/routeTree.gen.ts +++ b/examples/react/start-supabase-basic/src/routeTree.gen.ts @@ -217,7 +217,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-tailwind-v4/src/routeTree.gen.ts b/examples/react/start-tailwind-v4/src/routeTree.gen.ts index dceedffdc1..1d03b977ce 100644 --- a/examples/react/start-tailwind-v4/src/routeTree.gen.ts +++ b/examples/react/start-tailwind-v4/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-trellaux/src/routeTree.gen.ts b/examples/react/start-trellaux/src/routeTree.gen.ts index 0b6ddaa12c..620e332a68 100644 --- a/examples/react/start-trellaux/src/routeTree.gen.ts +++ b/examples/react/start-trellaux/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/react/start-workos/src/routeTree.gen.ts b/examples/react/start-workos/src/routeTree.gen.ts index 49009fc848..102d49c2a5 100644 --- a/examples/react/start-workos/src/routeTree.gen.ts +++ b/examples/react/start-workos/src/routeTree.gen.ts @@ -164,7 +164,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { +declare module '@tanstack/react-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-auth/src/routeTree.gen.ts b/examples/solid/start-basic-auth/src/routeTree.gen.ts index bad0f1b074..ccc270d994 100644 --- a/examples/solid/start-basic-auth/src/routeTree.gen.ts +++ b/examples/solid/start-basic-auth/src/routeTree.gen.ts @@ -216,7 +216,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-authjs/src/routeTree.gen.ts b/examples/solid/start-basic-authjs/src/routeTree.gen.ts index e772ba9c3e..16ddd978fe 100644 --- a/examples/solid/start-basic-authjs/src/routeTree.gen.ts +++ b/examples/solid/start-basic-authjs/src/routeTree.gen.ts @@ -114,7 +114,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts b/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts index c3f6976d03..d9432a265e 100644 --- a/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts +++ b/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts @@ -439,7 +439,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-netlify/src/routeTree.gen.ts b/examples/solid/start-basic-netlify/src/routeTree.gen.ts index c3f6976d03..d9432a265e 100644 --- a/examples/solid/start-basic-netlify/src/routeTree.gen.ts +++ b/examples/solid/start-basic-netlify/src/routeTree.gen.ts @@ -439,7 +439,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-nitro/src/routeTree.gen.ts b/examples/solid/start-basic-nitro/src/routeTree.gen.ts index c3f6976d03..d9432a265e 100644 --- a/examples/solid/start-basic-nitro/src/routeTree.gen.ts +++ b/examples/solid/start-basic-nitro/src/routeTree.gen.ts @@ -439,7 +439,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-solid-query/src/routeTree.gen.ts b/examples/solid/start-basic-solid-query/src/routeTree.gen.ts index 226b599b8c..01e99cf1fe 100644 --- a/examples/solid/start-basic-solid-query/src/routeTree.gen.ts +++ b/examples/solid/start-basic-solid-query/src/routeTree.gen.ts @@ -422,7 +422,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic-static/src/routeTree.gen.ts b/examples/solid/start-basic-static/src/routeTree.gen.ts index 7cad5523aa..3c97166b2c 100644 --- a/examples/solid/start-basic-static/src/routeTree.gen.ts +++ b/examples/solid/start-basic-static/src/routeTree.gen.ts @@ -366,7 +366,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-basic/src/routeTree.gen.ts b/examples/solid/start-basic/src/routeTree.gen.ts index 722133b41e..829424fac1 100644 --- a/examples/solid/start-basic/src/routeTree.gen.ts +++ b/examples/solid/start-basic/src/routeTree.gen.ts @@ -418,7 +418,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-bun/src/routeTree.gen.ts b/examples/solid/start-bun/src/routeTree.gen.ts index 19009b2f5b..60c40d6fbe 100644 --- a/examples/solid/start-bun/src/routeTree.gen.ts +++ b/examples/solid/start-bun/src/routeTree.gen.ts @@ -127,7 +127,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-convex-better-auth/src/routeTree.gen.ts b/examples/solid/start-convex-better-auth/src/routeTree.gen.ts index 27dc0ca88c..ac6f971997 100644 --- a/examples/solid/start-convex-better-auth/src/routeTree.gen.ts +++ b/examples/solid/start-convex-better-auth/src/routeTree.gen.ts @@ -144,7 +144,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-counter/src/routeTree.gen.ts b/examples/solid/start-counter/src/routeTree.gen.ts index 3cc45c071e..09fbfcbcbe 100644 --- a/examples/solid/start-counter/src/routeTree.gen.ts +++ b/examples/solid/start-counter/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts b/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts index 3cc45c071e..09fbfcbcbe 100644 --- a/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts +++ b/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts @@ -78,7 +78,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-large/src/routeTree.gen.ts b/examples/solid/start-large/src/routeTree.gen.ts index 3fb99e1aca..3495a3e623 100644 --- a/examples/solid/start-large/src/routeTree.gen.ts +++ b/examples/solid/start-large/src/routeTree.gen.ts @@ -231,7 +231,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts b/examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts index 4776246e1f..0b42d85050 100644 --- a/examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts +++ b/examples/solid/start-streaming-data-from-server-functions/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-supabase-basic/src/routeTree.gen.ts b/examples/solid/start-supabase-basic/src/routeTree.gen.ts index 7019a6c21a..3d744aa482 100644 --- a/examples/solid/start-supabase-basic/src/routeTree.gen.ts +++ b/examples/solid/start-supabase-basic/src/routeTree.gen.ts @@ -217,7 +217,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/examples/solid/start-tailwind-v4/src/routeTree.gen.ts b/examples/solid/start-tailwind-v4/src/routeTree.gen.ts index 4776246e1f..0b42d85050 100644 --- a/examples/solid/start-tailwind-v4/src/routeTree.gen.ts +++ b/examples/solid/start-tailwind-v4/src/routeTree.gen.ts @@ -60,7 +60,7 @@ export const routeTree = rootRouteImport import type { getRouter } from './router.tsx' import type { createStart } from '@tanstack/solid-start' -declare module '@tanstack/solid-start' { +declare module '@tanstack/solid-router' { interface Register { ssr: true router: Awaited> diff --git a/packages/react-start/src/default-entry/server.ts b/packages/react-start/src/default-entry/server.ts index 8e734a7e49..32e023fe92 100644 --- a/packages/react-start/src/default-entry/server.ts +++ b/packages/react-start/src/default-entry/server.ts @@ -2,7 +2,7 @@ import { createStartHandler, defaultStreamHandler, } from '@tanstack/react-start/server' -import type { Register } from '@tanstack/react-router' +import type { Register } from '@tanstack/react-start' import type { RequestHandler } from '@tanstack/react-start/server' const fetch = createStartHandler(defaultStreamHandler) diff --git a/packages/solid-start/src/default-entry/server.ts b/packages/solid-start/src/default-entry/server.ts index b8f3105c6a..0b452ada3c 100644 --- a/packages/solid-start/src/default-entry/server.ts +++ b/packages/solid-start/src/default-entry/server.ts @@ -2,7 +2,7 @@ import { createStartHandler, defaultStreamHandler, } from '@tanstack/solid-start/server' -import type { Register } from '@tanstack/solid-router' +import type { Register } from '@tanstack/solid-start' import type { RequestHandler } from '@tanstack/solid-start/server' const fetch = createStartHandler(defaultStreamHandler) diff --git a/packages/start-client-core/src/createMiddleware.ts b/packages/start-client-core/src/createMiddleware.ts index 8f4ff474fc..af54b5bdcd 100644 --- a/packages/start-client-core/src/createMiddleware.ts +++ b/packages/start-client-core/src/createMiddleware.ts @@ -12,11 +12,11 @@ import type { Constrain, Expand, IntersectAssign, - Register, ResolveValidatorInput, ResolveValidatorOutput, ValidateSerializableInput, } from '@tanstack/router-core' +import type { Register } from './register' export type CreateMiddlewareFn = ( options?: { diff --git a/packages/start-client-core/src/createStart.ts b/packages/start-client-core/src/createStart.ts index e59adb452b..39113beab0 100644 --- a/packages/start-client-core/src/createStart.ts +++ b/packages/start-client-core/src/createStart.ts @@ -1,5 +1,6 @@ import { createMiddleware } from './createMiddleware' import type { TSS_SERVER_FUNCTION } from './constants' +import type { Register } from './register' import type { AnyFunctionMiddleware, AnyRequestMiddleware, @@ -8,7 +9,6 @@ import type { import type { CustomFetch } from './createServerFn' import type { AnySerializationAdapter, - Register, SSROption, } from '@tanstack/router-core' diff --git a/packages/start-client-core/src/index.tsx b/packages/start-client-core/src/index.tsx index 5bf09c4440..ac83ff177c 100644 --- a/packages/start-client-core/src/index.tsx +++ b/packages/start-client-core/src/index.tsx @@ -126,7 +126,7 @@ export type { StartInstance, StartInstanceOptions, } from './createStart' -export type { Register } from '@tanstack/router-core' +export type { Register } from './register' export { getRouterInstance } from './getRouterInstance' export { getDefaultSerovalPlugins } from './getDefaultSerovalPlugins' diff --git a/packages/start-client-core/src/register.ts b/packages/start-client-core/src/register.ts new file mode 100644 index 0000000000..1821c69c6c --- /dev/null +++ b/packages/start-client-core/src/register.ts @@ -0,0 +1,3 @@ +import type { Register as RouterCoreRegister } from '@tanstack/router-core' + +export interface Register extends RouterCoreRegister {} diff --git a/packages/start-plugin-core/src/start-router-plugin/route-tree-footer.ts b/packages/start-plugin-core/src/start-router-plugin/route-tree-footer.ts index c56ffbf90d..36257d8f3c 100644 --- a/packages/start-plugin-core/src/start-router-plugin/route-tree-footer.ts +++ b/packages/start-plugin-core/src/start-router-plugin/route-tree-footer.ts @@ -55,7 +55,7 @@ function buildRouteTreeFileFooter(opts: { appendFooterBlock( footer, - `declare module '@tanstack/${opts.framework}-start' { + `declare module '@tanstack/${opts.framework}-router' { interface Register { ssr: true router: Awaited>`, diff --git a/packages/start-server-core/src/createStartHandler.ts b/packages/start-server-core/src/createStartHandler.ts index 7d47388a3c..5c498b4395 100644 --- a/packages/start-server-core/src/createStartHandler.ts +++ b/packages/start-server-core/src/createStartHandler.ts @@ -36,6 +36,7 @@ import type { AnyFunctionMiddleware, AnyRequestMiddleware, AnyStartInstanceOptions, + Register, RouteMethod, RouteMethodHandlerFn, RouterEntry, @@ -46,7 +47,6 @@ import type { AnyRoute, AnyRouter, AnySerializationAdapter, - Register, } from '@tanstack/router-core' import type { HandlerCallback } from '@tanstack/router-core/ssr/server' import type { FinalManifestOptions } from './finalManifest' diff --git a/packages/vue-start/src/default-entry/server.ts b/packages/vue-start/src/default-entry/server.ts index 5729a469d3..94ac3011ec 100644 --- a/packages/vue-start/src/default-entry/server.ts +++ b/packages/vue-start/src/default-entry/server.ts @@ -2,7 +2,7 @@ import { createStartHandler, defaultStreamHandler, } from '@tanstack/vue-start/server' -import type { Register } from '@tanstack/vue-router' +import type { Register } from '@tanstack/vue-start' import type { RequestHandler } from '@tanstack/vue-start/server' const fetch = createStartHandler(defaultStreamHandler)