Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix next/navigation type augmentation #66489

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

unstubbable
Copy link
Contributor

@unstubbable unstubbable commented Jun 3, 2024

Follow-up from #66461 (comment)

When using app dir and pages dir together, the navigation compatibility types as introduced in #45919 are added to next-env.d.ts with the following triple-slash directive:

/// <reference types="next/navigation-types/compat/navigation" />

This augments the types from next/navigation (source). But TypeScript fails to do the augmentation and reports the following errors (excerpt):

Type error: Overload signatures must all be exported or non-exported.

> 11 |   export function useSearchParams(): ReadonlyURLSearchParams | null

However, this error is suppressed in most Next.js projects, because skipLibCheck is set to true per default. It only arises if users explicitly set it to false, e.g. if they don't mind the longer compilation times and want to avoid that third-party dependencies are accidentally untyped because of compile errors. 1

The error is caused by using a separate export declaration for those functions. If we use export modifiers on the function declarations the augmentation can be fixed.

I've verified that the e2e test test/e2e/app-dir/use-params fails on the first commit of this PR (setting skipLibCheck to false), and succeeds on the second commit.

Footnotes

  1. I don't want to open a can of worms, but maybe we should consider not using "skipLibCheck": true as a default compiler setting.

@ijjk
Copy link
Member

ijjk commented Jun 3, 2024

Stats from current PR

Default Build
General
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
buildDuration 19.3s 15.8s N/A
buildDurationCached 8.9s 8.4s N/A
nodeModulesSize 358 MB 358 MB N/A
nextStartRea..uration (ms) 408ms 428ms N/A
Client Bundles (main, webpack)
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
2358-HASH.js gzip 35.6 kB 35.6 kB N/A
2741.HASH.js gzip 171 B 170 B N/A
56e3f737-HASH.js gzip 51.4 kB 51.5 kB N/A
5751-HASH.js gzip 5.05 kB 5.04 kB N/A
framework-HASH.js gzip 56.5 kB 56.5 kB N/A
main-app-HASH.js gzip 222 B 221 B N/A
main-HASH.js gzip 32.3 kB 32.3 kB N/A
webpack-HASH.js gzip 1.71 kB 1.7 kB N/A
Overall change 0 B 0 B
Legacy Client Bundles (polyfills)
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 192 B 191 B N/A
amp-HASH.js gzip 511 B 506 B N/A
css-HASH.js gzip 342 B 343 B N/A
dynamic-HASH.js gzip 2.53 kB 2.52 kB N/A
edge-ssr-HASH.js gzip 266 B 264 B N/A
head-HASH.js gzip 364 B 365 B N/A
hooks-HASH.js gzip 392 B 390 B N/A
image-HASH.js gzip 4.27 kB 4.27 kB N/A
index-HASH.js gzip 267 B 268 B N/A
link-HASH.js gzip 2.69 kB 2.69 kB N/A
routerDirect..HASH.js gzip 327 B 328 B N/A
script-HASH.js gzip 396 B 397 B N/A
withRouter-HASH.js gzip 323 B 325 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 299 B 299 B
Client Build Manifests
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
_buildManifest.js gzip 486 B 484 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
index.html gzip 522 B 523 B N/A
link.html gzip 534 B 536 B N/A
withRouter.html gzip 518 B 518 B
Overall change 518 B 518 B
Edge SSR bundle Size
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
edge-ssr.js gzip 124 kB 124 kB N/A
page.js gzip 166 kB 166 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
middleware-b..fest.js gzip 661 B 662 B N/A
middleware-r..fest.js gzip 158 B 156 B N/A
middleware.js gzip 29.6 kB 29.6 kB N/A
edge-runtime..pack.js gzip 1.02 kB 1.02 kB
Overall change 1.02 kB 1.02 kB
Next Runtimes
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
app-page-exp...dev.js gzip 185 kB 185 kB
app-page-exp..prod.js gzip 112 kB 112 kB
app-page-tur..prod.js gzip 123 kB 123 kB
app-page-tur..prod.js gzip 119 kB 119 kB
app-page.run...dev.js gzip 177 kB 177 kB
app-page.run..prod.js gzip 109 kB 109 kB
app-route-ex...dev.js gzip 24.7 kB 24.7 kB
app-route-ex..prod.js gzip 18.5 kB 18.5 kB
app-route-tu..prod.js gzip 18.5 kB 18.5 kB
app-route-tu..prod.js gzip 18.4 kB 18.4 kB
app-route.ru...dev.js gzip 24.4 kB 24.4 kB
app-route.ru..prod.js gzip 18.4 kB 18.4 kB
pages-api-tu..prod.js gzip 9.53 kB 9.53 kB
pages-api.ru...dev.js gzip 9.8 kB 9.8 kB
pages-api.ru..prod.js gzip 9.53 kB 9.53 kB
pages-turbo...prod.js gzip 21.4 kB 21.4 kB
pages.runtim...dev.js gzip 22 kB 22 kB
pages.runtim..prod.js gzip 21.4 kB 21.4 kB
server.runti..prod.js gzip 52.1 kB 52.1 kB
Overall change 1.09 MB 1.09 MB
build cache
vercel/next.js canary unstubbable/next.js fix-navigation-types Change
0.pack gzip 1.67 MB 1.67 MB N/A
index.pack gzip 129 kB 129 kB N/A
Overall change 0 B 0 B
Diff details
Diff for page.js
@@ -15,7 +15,7 @@
       /***/
     },
 
-    /***/ 2105: /***/ (
+    /***/ 4202: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -30,7 +30,7 @@
         default: () => /* binding */ nHandler,
       });
 
-      // NAMESPACE OBJECT: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-stats38qVng%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // NAMESPACE OBJECT: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-stats38qVng%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       var page_next_edge_ssr_entry_namespaceObject = {};
       __webpack_require__.r(page_next_edge_ssr_entry_namespaceObject);
       __webpack_require__.d(page_next_edge_ssr_entry_namespaceObject, {
@@ -71,24 +71,24 @@
         tree: () => tree,
       });
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/web/globals.js
-      var globals = __webpack_require__(6034);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
-      var adapter = __webpack_require__(7565);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 88 modules
-      var render = __webpack_require__(6058);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
-      var incremental_cache = __webpack_require__(3656);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/app-render/app-render.js + 50 modules
-      var app_render = __webpack_require__(9984);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/future/route-modules/app-page/module.compiled.js
-      var module_compiled = __webpack_require__(1506);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/future/route-kind.js
-      var route_kind = __webpack_require__(7216);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/client/components/error-boundary.js
-      var error_boundary = __webpack_require__(2561);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/app-render/entry-base.js + 10 modules
-      var entry_base = __webpack_require__(4134); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-stats38qVng%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/web/globals.js
+      var globals = __webpack_require__(210);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
+      var adapter = __webpack_require__(9203);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 88 modules
+      var render = __webpack_require__(703);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 3 modules
+      var incremental_cache = __webpack_require__(3392);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/app-render/app-render.js + 50 modules
+      var app_render = __webpack_require__(7982);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/future/route-modules/app-page/module.compiled.js
+      var module_compiled = __webpack_require__(3572);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/future/route-kind.js
+      var route_kind = __webpack_require__(3923);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/client/components/error-boundary.js
+      var error_boundary = __webpack_require__(7434);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/app-render/entry-base.js + 10 modules
+      var entry_base = __webpack_require__(7276); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-stats38qVng%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       // We inject the tree and pages here so that we can use them in the route
       // module.
       const tree = {
@@ -105,7 +105,7 @@
                     page: [
                       () =>
                         Promise.resolve(/* import() eager */).then(
-                          __webpack_require__.bind(__webpack_require__, 2287)
+                          __webpack_require__.bind(__webpack_require__, 8236)
                         ),
                       "/tmp/next-stats38qVng/stats-app/app/app-edge-ssr/page.js",
                     ],
@@ -119,14 +119,14 @@
             layout: [
               () =>
                 Promise.resolve(/* import() eager */).then(
-                  __webpack_require__.bind(__webpack_require__, 8369)
+                  __webpack_require__.bind(__webpack_require__, 2716)
                 ),
               "/tmp/next-stats38qVng/stats-app/app/layout.js",
             ],
             "not-found": [
               () =>
                 Promise.resolve(/* import() eager */).then(
-                  __webpack_require__.bind(__webpack_require__, 6309)
+                  __webpack_require__.bind(__webpack_require__, 4186)
                 ),
               "next/dist/client/components/not-found-error",
             ],
@@ -162,12 +162,12 @@
       });
 
       //# sourceMappingURL=app-page.js.map
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/lib/page-types.js
-      var page_types = __webpack_require__(8119);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/app-render/encryption-utils.js
-      var encryption_utils = __webpack_require__(3866);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/esm/server/app-render/action-utils.js
-      var action_utils = __webpack_require__(1679); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VFeHRlbnNpb25zIjpbInRzeCIsInRzIiwianN4IiwianMiXSwicG93ZXJlZEJ5SGVhZGVyIjp0cnVlLCJjb21wcmVzcyI6dHJ1ZSwiaW1hZ2VzIjp7ImRldmljZVNpemVzIjpbNjQwLDc1MCw4MjgsMTA4MCwxMjAwLDE5MjAsMjA0OCwzODQwXSwiaW1hZ2VTaXplcyI6WzE2LDMyLDQ4LDY0LDk2LDEyOCwyNTYsMzg0XSwicGF0aCI6Ii9fbmV4dC9pbWFnZSIsImxvYWRlciI6ImRlZmF1bHQiLCJsb2FkZXJGaWxlIjoiIiwiZG9tYWlucyI6W10sImRpc2FibGVTdGF0aWNJbWFnZXMiOmZhbHNlLCJtaW5pbXVtQ2FjaGVUVEwiOjYwLCJmb3JtYXR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zL21kIiwicmVhY3QtaWNvbnMvcGkiLCJyZWFjdC1pY29ucy9yaSIsInJlYWN0LWljb25zL3J4IiwicmVhY3QtaWNvbnMvc2kiLCJyZWFjdC1pY29ucy9zbCIsInJlYWN0LWljb25zL3RiIiwicmVhY3QtaWNvbnMvdGZpIiwicmVhY3QtaWNvbnMvdGkiLCJyZWFjdC1pY29ucy92c2MiLCJyZWFjdC1pY29ucy93aSJdfSwiYnVuZGxlUGFnZXNSb3V0ZXJEZXBlbmRlbmNpZXMiOmZhbHNlLCJjb25maWdGaWxlIjoiL3RtcC9uZXh0LXN0YXRzMzhxVm5nL3N0YXRzLWFwcC9uZXh0LmNvbmZpZy5qcyIsImNvbmZpZ0ZpbGVOYW1lIjoibmV4dC5jb25maWcuanMifQ==","pagesType":"app","appDirLoader":"bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGYXBwLWVkZ2Utc3NyJTJGcGFnZSZwYWdlPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZVBhdGg9cHJpdmF0ZS1uZXh0LWFwcC1kaXIlMkZhcHAtZWRnZS1zc3IlMkZwYWdlLmpzJmFwcERpcj0lMkZ0bXAlMkZuZXh0LXN0YXRzMzhxVm5nJTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JnByZWZlcnJlZFJlZ2lvbj0mbWlkZGxld2FyZUNvbmZpZz1lMzAlM0Qh","sriEnabled":false,"middlewareConfig":"e30="}!
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/lib/page-types.js
+      var page_types = __webpack_require__(3431);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/app-render/encryption-utils.js
+      var encryption_utils = __webpack_require__(5289);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/esm/server/app-render/action-utils.js
+      var action_utils = __webpack_require__(1863); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VF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m5nJTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JnByZWZlcnJlZFJlZ2lvbj0mbWlkZGxld2FyZUNvbmZpZz1lMzAlM0Qh","sriEnabled":false,"middlewareConfig":"e30="}!
       var _self___RSC_MANIFEST;
 
       const incrementalCacheHandler = null;
@@ -426,47 +426,47 @@
       /***/
     },
 
-    /***/ 7111: /***/ (
+    /***/ 4720: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2300)
+        __webpack_require__.bind(__webpack_require__, 7156)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3447)
+        __webpack_require__.bind(__webpack_require__, 209)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4596)
+        __webpack_require__.bind(__webpack_require__, 3612)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5542)
+        __webpack_require__.bind(__webpack_require__, 6231)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3314)
+        __webpack_require__.bind(__webpack_require__, 8106)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9654)
+        __webpack_require__.bind(__webpack_require__, 6002)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9870)
+        __webpack_require__.bind(__webpack_require__, 5585)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1713)
+        __webpack_require__.bind(__webpack_require__, 7135)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 959)
+        __webpack_require__.bind(__webpack_require__, 579)
       );
 
       /***/
     },
 
-    /***/ 3158: /***/ () => {
+    /***/ 3906: /***/ () => {
       /***/
     },
 
-    /***/ 2287: /***/ (
+    /***/ 8236: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -486,7 +486,7 @@
       /***/
     },
 
-    /***/ 8369: /***/ (
+    /***/ 2716: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -498,7 +498,7 @@
         /* harmony export */
       });
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(3046);
+        __webpack_require__(5868);
 
       function RootLayout({ children }) {
         return /*#__PURE__*/ (0,
@@ -517,7 +517,7 @@
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ __webpack_require__.O(0, [374, 641], () => __webpack_exec__(2105));
+    /******/ __webpack_require__.O(0, [19, 784], () => __webpack_exec__(4202));
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)[
       "middleware_app/app-edge-ssr/page"
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [8358],
   {
-    /***/ 4176: /***/ (
+    /***/ 5930: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(2010);
+          return __webpack_require__(3052);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 9626: /***/ (module, exports, __webpack_require__) => {
+    /***/ 1892: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,15 +40,15 @@
         __webpack_require__(7141)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(8940)
+        __webpack_require__(1951)
       );
-      const _getimgprops = __webpack_require__(1395);
-      const _imageconfig = __webpack_require__(2568);
-      const _imageconfigcontextsharedruntime = __webpack_require__(9067);
-      const _warnonce = __webpack_require__(3082);
-      const _routercontextsharedruntime = __webpack_require__(9818);
+      const _getimgprops = __webpack_require__(6033);
+      const _imageconfig = __webpack_require__(9782);
+      const _imageconfigcontextsharedruntime = __webpack_require__(3392);
+      const _warnonce = __webpack_require__(6433);
+      const _routercontextsharedruntime = __webpack_require__(3918);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3978)
+        __webpack_require__(646)
       );
       // This is replaced by webpack define plugin
       const configEnv = {
@@ -376,7 +376,7 @@
       /***/
     },
 
-    /***/ 1395: /***/ (
+    /***/ 6033: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -392,9 +392,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(3082);
-      const _imageblursvg = __webpack_require__(8846);
-      const _imageconfig = __webpack_require__(2568);
+      const _warnonce = __webpack_require__(6433);
+      const _imageblursvg = __webpack_require__(6547);
+      const _imageconfig = __webpack_require__(9782);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -769,7 +769,7 @@
       /***/
     },
 
-    /***/ 8846: /***/ (__unused_webpack_module, exports) => {
+    /***/ 6547: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -824,7 +824,7 @@
       /***/
     },
 
-    /***/ 5626: /***/ (
+    /***/ 9915: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -851,10 +851,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(1478);
-      const _getimgprops = __webpack_require__(1395);
-      const _imagecomponent = __webpack_require__(9626);
+      const _getimgprops = __webpack_require__(6033);
+      const _imagecomponent = __webpack_require__(1892);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3978)
+        __webpack_require__(646)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -886,7 +886,7 @@
       /***/
     },
 
-    /***/ 3978: /***/ (__unused_webpack_module, exports) => {
+    /***/ 646: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -921,7 +921,7 @@
       /***/
     },
 
-    /***/ 2010: /***/ (
+    /***/ 3052: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -938,8 +938,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/[email protected]/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(5134);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_fxmik4ojtenl5wvndfh5uokf6a/node_modules/next/image.js
-      var next_image = __webpack_require__(7365);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-f994737d14-20240522_react_3yjmd2pnnuuncmihyqifk2hdsq/node_modules/next/image.js
+      var next_image = __webpack_require__(7027);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -969,12 +969,12 @@
       /***/
     },
 
-    /***/ 7365: /***/ (
+    /***/ 7027: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(5626);
+      module.exports = __webpack_require__(9915);
 
       /***/
     },
@@ -984,7 +984,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(4176)
+      __webpack_exec__(5930)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 2358-HASH.js

Diff too large to display

Commit: 38ad43c

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, this error is suppressed in most Next.js projects, because skipLibCheck is set to true per default.

Well, well, well.

It's kinda annoying that TypeScript enforces this pattern. Basically in

function foo() {}

export {foo}

we can never augment foo?

Also: Do we need to change all client component APIs? Might be best to move the comments to each export now that these are client component APIs like we had before.

@@ -2,7 +2,7 @@
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"skipLibCheck": false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus points if we default to true here in our tests. Test authors should opt-into disabling lib check. "skipLibCheck": false, really helps getting more test coverage for our types.

@unstubbable
Copy link
Contributor Author

unstubbable commented Jun 3, 2024

However, this error is suppressed in most Next.js projects, because skipLibCheck is set to true per default.

Well, well, well.

Didn't you read my footnote? 😆

It's kinda annoying that TypeScript enforces this pattern. Basically in

function foo() {}

export {foo}

we can never augment foo?

Couldn't find too much about this, but it was mentioned here: microsoft/TypeScript#14080 (comment)

Also: Do we need to change all client component APIs?

The following exports we wouldn't need to change because they are not augmented, but I would still include them in the change for consistency (I know, I know): useRouter, useServerInsertedHTML, ServerInsertedHTMLContext. Do you see any risk here?

Might be best to move the comments to each export now that these are client component APIs like we had before.

All of them mention already in their JSDoc comment that they are client component APIs.

@@ -2,7 +2,7 @@
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"skipLibCheck": false,
Copy link
Member

@eps1lon eps1lon Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ignored in the e2e test as far as I can tell. The tsconfig in the generated, temporary test folder uses skipLibCheck: true. There are more issues with declarations than what this PR attempts to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, it does fail to build for me with the first commit, also in isolation. How did you check this?

❯ pnpm testonly-start test/e2e/app-dir/use-params

> [email protected] testonly-start <snip>/next.js
> cross-env NEXT_TEST_MODE=start pnpm testonly "test/e2e/app-dir/use-params"


> [email protected] testonly <snip>/next.js
> jest --runInBand "test/e2e/app-dir/use-params"

Using test mode: start in test folder e2e
packageJson?? {}
Creating test directory with isolated next... (use NEXT_SKIP_ISOLATE=1 to opt-out)
Creating next instance in:
/private/var/folders/qs/g2b94nfj79538hg_1y6t2g500000gn/T/next-install-9e8b658884cf0348e5a6db59fb80d2d5041906754abb0b2571364f41d00d50a3
Creating temp repo dir /private/var/folders/qs/g2b94nfj79538hg_1y6t2g500000gn/T/next-repo-ff065aed6eec90e35ce5e2a1813a1ebe6774e4f4a3fe87705ad6fc245410b2a0
{
  swcDirectory: '<snip>/next.js/packages/next-swc/native'
}
  console.log
    using swc dep { nextSwcVersion: undefined, nextSwcPkg: undefined }

      at log (../.github/actions/next-stats-action/src/prepare/repo-setup.js:168:23)


 RUNS  test/e2e/app-dir/use-params/use-params.test.ts
Packages: +35
+++++++++++++++++++++++++++++++++++
Progress: resolved 53, reused 34, downloaded 2, added 35, done

dependencies:
+ @types/node 20.14.0
+ @types/react 18.3.3
+ @types/react-dom 18.3.0
+ next 15.0.0-canary.7
+ react 19.0.0-rc-f994737d14-20240522
+ react-dom 19.0.0-rc-f994737d14-20240522
+ typescript 5.4.5
created next.js install, writing test files
  console.log
    running pnpm next build

      at NextStartInstance.log [as start] (lib/next-modes/next-start.ts:86:13)

  ▲ Next.js 15.0.0-canary.7

   Creating an optimized production build ...
 ✓ Compiled successfully
   Linting and checking validity of types ...


===== TS errors =====

[Test Mode] ./node_modules/.pnpm/file+..+next-repo-ff065aed6eec90e35ce5e2a1813a1ebe6774e4f4a3fe87705ad6fc245410b2a0+packages+n_36co7dw5syrhkh2w56ltmezm4i/node_modules/next/navigation-types/compat/navigation.d.ts:11:19
Type error: Overload signatures must all be exported or non-exported.

   9 |    * ready.
  10 |    */
> 11 |   export function useSearchParams(): ReadonlyURLSearchParams | null
     |                   ^

@eps1lon
Copy link
Member

eps1lon commented Jun 3, 2024

Didn't you read my #66489 (comment)? 😆

I use a high contrast theme, have my system font size on large, and my cursor 3x the normal size. I don't read smallprint 😅

The following exports we wouldn't need to change because they are not augmented, but I would still include them in the change for consistency (I know, I know): useRouter, useServerInsertedHTML, ServerInsertedHTMLContext. Do you see any risk here?

So I just double checked because this looked way more like a TS bug. The fix isn't to change how we export but change the augmentation. The augmentation needs to follow the pattern of the module it augments not the other way around:

declare module 'next/navigation' {
  /**
   * Get a read-only URLSearchParams object. For example searchParams.get('foo') would return 'bar' when ?foo=bar
   * Learn more about URLSearchParams here: https://developer.mozilla.org/docs/Web/API/URLSearchParams
   *
   * If used from `pages/`, the hook may return `null` when the router is not
   * ready.
   */
  function useSearchParams(): ReadonlyURLSearchParams | null

  /**
   * Get the current pathname. For example, if the URL is
   * https://example.com/foo?bar=baz, the pathname would be /foo.
   *
   * If the hook is accessed from `pages/`, the pathname may be `null` when the
   * router is not ready.
   */
  function usePathname(): string | null

  /**
   * Get the current parameters. For example useParams() on /dashboard/[team]
   * where pathname is /dashboard/nextjs would return { team: 'nextjs' }
   *
   * If used from `pages/`, the hook will return `null`.
   */
  function useParams<
    T extends Record<string, string | string[]> = Record<
      string,
      string | string[]
    >,
  >(): T | null

  /**
   * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
   * that lets you read the active route segments **below** the Layout it is called from.
   *
   * If used from `pages/`, the hook will return `null`.
   */
  function useSelectedLayoutSegments(): string[] | null

  /**
   * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook
   * that lets you read the active route segment **one level below** the Layout it is called from.
   *
   * If used from `pages/`, the hook will return `null`.
   */
  function useSelectedLayoutSegment(): string | null
}

@unstubbable
Copy link
Contributor Author

The following exports we wouldn't need to change because they are not augmented, but I would still include them in the change for consistency (I know, I know): useRouter, useServerInsertedHTML, ServerInsertedHTMLContext. Do you see any risk here?

So I just double checked because this looked way more like a TS bug. The fix isn't to change how we export but change the augmentation. The augmentation needs to follow the pattern of the module it augments not the other way around:

This does not work for me, I get this error:

./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/navigation-types/compat/navigation.d.ts:11:12
Type error: Overload signatures must all be exported or non-exported.

   9 |    * ready.
  10 |    */
> 11 |   function useSearchParams(): ReadonlyURLSearchParams | null
     |            ^
  12 |
  13 |   /**
  14 |    * Get the current pathname. For example, if the URL is

In case your testing this in my repro or in an e2e app, make sure to delete .next between next build runs when editing the .d.ts files.

Copy link

@Haeven Haeven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still failing build

@eps1lon
Copy link
Member

eps1lon commented Jun 3, 2024

In case your testing this in my repro or in an e2e app, make sure to delete .next between next build runs when editing the .d.ts files.

Yeah, it's because we can't use export {} in an ambient context. I'll file a TypeScript issue. Seems like TS enforces export function for augmenting function overloads.

@eps1lon
Copy link
Member

eps1lon commented Jun 3, 2024

Let's see if there's a better workaround: microsoft/TypeScript#58756

Until then, let's fix the user error.

@eps1lon eps1lon enabled auto-merge (squash) June 3, 2024 17:51
@eps1lon eps1lon merged commit 4f2e65b into vercel:canary Jun 3, 2024
74 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants