Repository: TanStack/router (ts)

Issue:
Static route data is not enforced
### Describe the bug

When using `createFileRoute`, the option `staticData` is always optional.

### Your Example Website or App

https://stackblitz.com/edit/github-vnv6ze?file=src%2Froutes%2Findex.tsx

### Steps to Reproduce the Bug or Issue

1. Declare interface `StaticDataRouteOption` in `main.tsx`

### Expected behavior

The property `staticData` should be required when `StaticDataRouteOption` has any required properties.

### Screenshots or Videos

_No response_

### Platform

- OS: Windows
- Browser: Edge
- Version: 126.0.2592.102


### Additional context

_No response_

Pull request description:
fix(react-router): resolve staticData in createFileRoute
Resolves #1978 
`createFileRoute` didn't correctly resolve and enforce `staticData` even when it should. The return type for this function was always compiled down with typescript instead of using the "live" types. During the library build, the `StaticDataRouteOption` was empty, and it resulted in the `staticData` being always optional.

<img width="510" alt="Screenshot 2024-08-02 at 15 04 59" src="https://github.com/user-attachments/assets/434321f8-284b-45c4-beb9-c8a08f42f8cf">
<img width="622" alt="Screenshot 2024-08-02 at 15 05 29" src="https://github.com/user-attachments/assets/e6d091b5-fef2-4fa3-ad77-c2998bd18f14">
<img width="716" alt="Screenshot 2024-08-02 at 15 06 29" src="https://github.com/user-attachments/assets/75a7c082-5256-4abb-b4b6-86ff40974990">


Patch:
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 824d4e9ca..ef71d870a 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index 733047e22..a1f2763a7 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-file-based-codesplitting/package.json b/examples/react/basic-file-based-codesplitting/package.json
index c1459194e..e3cd4ae22 100644
--- a/examples/react/basic-file-based-codesplitting/package.json
+++ b/examples/react/basic-file-based-codesplitting/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index a852c0c69..c2f1d17da 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,8 +10,8 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 46086a9b4..569d7a83b 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,8 +12,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index 49a542242..07e279121 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,8 +12,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
     "redaxios": "^0.5.1"
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index e8edf086e..6b01b70a3 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,10 +11,10 @@
     "debug": "node --inspect-brk server"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index b2935c6ec..430b750d6 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,10 +11,10 @@
     "debug": "node --inspect-brk server"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 32b851553..9775e8bca 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,8 +10,8 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
     "redaxios": "^0.5.1"
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 0816af3b9..38ab4db80 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 4728f95d6..c986bd455 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index 60fa3954b..3a86c763c 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index 418e39f19..253954e2d 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index 22f24fb33..317d20768 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 90968b3f1..c8767b58a 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -12,8 +12,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index ced38c1a7..748d78577 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@radix-ui/react-dialog": "^1.1.1",
     "@tanstack/react-query": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index 7443162da..b6523e907 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index c138fc06d..315b5d3ec 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index 0a5783b15..543d36752 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -8,8 +8,8 @@
     "preview": "rsbuild preview"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "react": "^18.3.1",
     "react-dom": "^18.3.1"
   },
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index e65bf0932..10767b9ab 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,8 +7,8 @@
     "build": "webpack build"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "react": "^18.3.1",
     "react-dom": "^18.3.1"
   },
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index d8a291aeb..084a83c2d 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
   },
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index e01f0d5f5..bb1b33c4d 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -9,9 +9,9 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
     "@tanstack/react-virtual": "^3.8.3",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/router-devtools": "^1.46.3",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
   },
diff --git a/examples/react/start-basic-counter/package.json b/examples/react/start-basic-counter/package.json
index 8b0e6a6ba..093f4d75a 100644
--- a/examples/react/start-basic-counter/package.json
+++ b/examples/react/start-basic-counter/package.json
@@ -11,8 +11,8 @@
     "format": "prettier --write '**/*' --ignore-unknown"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/start": "^1.46.3",
     "@typescript-eslint/parser": "^7.17.0",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index ca7be77ac..6c612b296 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -14,11 +14,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/react-router-with-query": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/react-router-with-query": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "@typescript-eslint/parser": "^7.17.0",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.13",
diff --git a/examples/react/start-basic-rsc/package.json b/examples/react/start-basic-rsc/package.json
index 07c504c46..6b07a5377 100644
--- a/examples/react/start-basic-rsc/package.json
+++ b/examples/react/start-basic-rsc/package.json
@@ -12,10 +12,10 @@
   },
   "dependencies": {
     "@babel/plugin-syntax-typescript": "^7.24.7",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "redaxios": "^0.5.1",
     "tailwind-merge": "^2.4.0",
     "vinxi": "0.4.1"
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 1c82bba74..8c7e06845 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -12,10 +12,10 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "@typescript-eslint/parser": "^7.17.0",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.13",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index e2f0ff53d..2e71d9850 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,11 +15,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/react-router-with-query": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/react-router-with-query": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "@typescript-eslint/parser": "^7.17.0",
     "@vitejs/plugin-react": "^4.3.1",
     "@convex-dev/react-query": "0.0.0-alpha.3",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 41c077871..b0e95abc6 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -13,11 +13,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.15",
     "@tanstack/react-query-devtools": "^5.51.15",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/react-router-with-query": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/react-router-with-query": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@tanstack/router-plugin": "^1.45.13",
-    "@tanstack/start": "^1.46.2",
+    "@tanstack/start": "^1.46.3",
     "@typescript-eslint/parser": "^7.17.0",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.13",
diff --git a/examples/react/wip-trpc-react-query/package.json b/examples/react/wip-trpc-react-query/package.json
index c33d19f04..3e9472df5 100644
--- a/examples/react/wip-trpc-react-query/package.json
+++ b/examples/react/wip-trpc-react-query/package.json
@@ -13,8 +13,8 @@
   "dependencies": {
     "@tanstack/react-query": "^4.36.1",
     "@tanstack/react-query-devtools": "^4.36.1",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@trpc/client": "^10.45.2",
     "@trpc/react-query": "^10.45.2",
     "@trpc/server": "^10.45.2",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index d90198acd..18ea7e3da 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "redaxios": "^0.5.1",
     "framer-motion": "^11.3.19",
     "immer": "^10.1.1",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 8c2bcad37..f8ffc4c54 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -13,8 +13,8 @@
   "dependencies": {
     "@tanstack/react-query": "^4.36.1",
     "@tanstack/react-query-devtools": "^4.36.1",
-    "@tanstack/react-router": "^1.46.2",
-    "@tanstack/router-devtools": "^1.46.2",
+    "@tanstack/react-router": "^1.46.3",
+    "@tanstack/router-devtools": "^1.46.3",
     "@trpc/client": "^10.45.2",
     "@trpc/react-query": "^10.45.2",
     "@trpc/server": "^10.45.2",
diff --git a/packages/react-router-with-query/package.json b/packages/react-router-with-query/package.json
index 33a11c0a3..f840135b0 100644
--- a/packages/react-router-with-query/package.json
+++ b/packages/react-router-with-query/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/react-router-with-query",
-  "version": "1.46.2",
+  "version": "1.46.3",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index d2f6b845d..adda43bbb 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/react-router",
-  "version": "1.46.2",
+  "version": "1.46.3",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/react-router/src/Match.tsx b/packages/react-router/src/Match.tsx
index 449617426..54b117108 100644
--- a/packages/react-router/src/Match.tsx
+++ b/packages/react-router/src/Match.tsx
@@ -141,6 +141,45 @@ export const MatchInner = React.memo(function MatchInnerImpl({
     return Comp ? <Comp key={matchId} /> : <Outlet />
   }, [matchId, route.options.component, router.options.defaultComponent])
 
+  React.useEffect(() => {
+    if (match.status === 'pending') {
+      // We're pending, and if we have a minPendingMs, we need to wait for it
+      const pendingMinMs =
+        route.options.pendingMinMs ?? router.options.defaultPendingMinMs
+
+      if (pendingMinMs && !match.minPendingPromise) {
+        // Create a promise that will resolve after the minPendingMs
+        if (!router.isServer) {
+          const minPendingPromise = createControlledPromise<void>()
+
+          router.updateMatch(match.id, (prev) => ({
+            ...prev,
+            minPendingPromise,
+          }))
+
+          const id = setTimeout(() => {
+            minPendingPromise.resolve()
+
+            // We've handled the minPendingPromise, so we can delete it
+            router.updateMatch(match.id, (prev) => ({
+              ...prev,
+              minPendingPromise: undefined,
+            }))
+          }, pendingMinMs)
+          return () => clearTimeout(id)
+        }
+      }
+    }
+    return undefined
+  }, [
+    match.id,
+    match.loadPromise,
+    match.minPendingPromise,
+    match.status,
+    route.options.pendingMinMs,
+    router,
+  ])
+
   // function useChangedDiff(value: any) {
   //   const ref = React.useRef(value)
   //   const changed = ref.current !== value
@@ -219,34 +258,6 @@ export const MatchInner = React.memo(function MatchInnerImpl({
   }
 
   if (match.status === 'pending') {
-    // We're pending, and if we have a minPendingMs, we need to wait for it
-    const pendingMinMs =
-      route.options.pendingMinMs ?? router.options.defaultPendingMinMs
-
-    if (pendingMinMs && !match.minPendingPromise) {
-      // Create a promise that will resolve after the minPendingMs
-      if (!router.isServer) {
-        const minPendingPromise = createControlledPromise<void>()
-
-        Promise.resolve().then(() => {
-          router.updateMatch(match.id, (prev) => ({
-            ...prev,
-            minPendingPromise,
-          }))
-        })
-
-        setTimeout(() => {
-          minPendingPromise.resolve()
-
-          // We've handled the minPendingPromise, so we can delete it
-          router.updateMatch(match.id, (prev) => ({
-            ...prev,
-            minPendingPromise: undefined,
-          }))
-        }, pendingMinMs)
-      }
-    }
-
     throw match.loadPromise
   }
 
diff --git a/packages/react-router/src/fileRoute.ts b/packages/react-router/src/fileRoute.ts
index 62695300d..640acda26 100644
--- a/packages/react-router/src/fileRoute.ts
+++ b/packages/react-router/src/fileRoute.ts
@@ -45,7 +45,9 @@ export function createFileRoute<
   TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'],
   TFullPath extends
     RouteConstraints['TFullPath'] = FileRoutesByPath[TFilePath]['fullPath'],
->(path: TFilePath) {
+>(
+  path: TFilePath,
+): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'] {
   return new FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>(path, {
     silent: true,
   }).createRoute
diff --git a/packages/router-devtools/package.json b/packages/router-devtools/package.json
index 9bd828a81..af9ba7baa 100644
--- a/packages/router-devtools/package.json
+++ b/packages/router-devtools/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-devtools",
-  "version": "1.46.2",
+  "version": "1.46.3",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/start/package.json b/packages/start/package.json
index 5c8d21850..b7b15ff17 100644
--- a/packages/start/package.json
+++ b/packages/start/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/start",
-  "version": "1.46.2",
+  "version": "1.46.3",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",


Test patch:
diff --git a/packages/react-router/tests/loaders.test.tsx b/packages/react-router/tests/loaders.test.tsx
index b6cb486fd..277dc9094 100644
--- a/packages/react-router/tests/loaders.test.tsx
+++ b/packages/react-router/tests/loaders.test.tsx
@@ -8,6 +8,7 @@ import {
 
 import { afterEach, describe, expect, test, vi } from 'vitest'
 
+import { z } from 'zod'
 import {
   Link,
   Outlet,
@@ -165,3 +166,61 @@ describe('loaders parentMatchPromise', () => {
     expect(nestedLoaderMock.mock.calls[0][0]).toBeInstanceOf(Promise)
   })
 })
+
+test('reproducer for #2031', async () => {
+  const rootRoute = createRootRoute({
+    beforeLoad: () => {
+      console.log('beforeload called')
+    },
+  })
+
+  const searchSchema = z.object({
+    data: z.string().array().default([]),
+  })
+
+  const indexRoute = createRoute({
+    getParentRoute: () => rootRoute,
+    path: '/',
+    component: () => <div>Index page</div>,
+
+    validateSearch: searchSchema,
+  })
+
+  const routeTree = rootRoute.addChildren([indexRoute])
+  const router = createRouter({ routeTree })
+
+  render(<RouterProvider router={router} />)
+
+  const indexElement = await screen.findByText('Index page')
+  expect(indexElement).toBeInTheDocument()
+})
+
+test('reproducer for #2053', async () => {
+  const rootRoute = createRootRoute({
+    beforeLoad: () => {
+      console.log('beforeload called')
+    },
+  })
+
+  const fooRoute = createRoute({
+    getParentRoute: () => rootRoute,
+    path: '/foo/$fooId',
+    component: () => {
+      const { fooId } = fooRoute.useParams()
+      return <div>fooId: {fooId}</div>
+    },
+  })
+
+  window.history.replaceState(null, 'root', '/foo/3ΚΑΠΠΑ')
+
+  const routeTree = rootRoute.addChildren([fooRoute])
+
+  const router = createRouter({
+    routeTree,
+  })
+
+  render(<RouterProvider router={router} />)
+
+  const fooElement = await screen.findByText('fooId: 3ΚΑΠΠΑ')
+  expect(fooElement).toBeInTheDocument()
+})