Unverified Commit 9817442e authored by Sjoerd van Bommel's avatar Sjoerd van Bommel Committed by GitHub

docs: add optional catch-all segments typescript example (#60237)

Closes https://github.com/vercel/next.js/issues/60235
parent e566f329
...@@ -120,6 +120,7 @@ export default function Page({ params }) { ...@@ -120,6 +120,7 @@ export default function Page({ params }) {
| ----------------------------------- | ---------------------------------------- | | ----------------------------------- | ---------------------------------------- |
| `app/blog/[slug]/page.js` | `{ slug: string }` | | `app/blog/[slug]/page.js` | `{ slug: string }` |
| `app/shop/[...slug]/page.js` | `{ slug: string[] }` | | `app/shop/[...slug]/page.js` | `{ slug: string[] }` |
| `app/shop/[[...slug]]/page.js` | `{ slug?: string[] }` |
| `app/[categoryId]/[itemId]/page.js` | `{ categoryId: string, itemId: string }` | | `app/[categoryId]/[itemId]/page.js` | `{ categoryId: string, itemId: string }` |
> **Good to know**: This may be done automatically by the [TypeScript plugin](/docs/app/building-your-application/configuring/typescript#typescript-plugin) in the future. > **Good to know**: This may be done automatically by the [TypeScript plugin](/docs/app/building-your-application/configuring/typescript#typescript-plugin) in the future.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment