Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
b6834b1b
Unverified
Commit
b6834b1b
authored
Sep 30, 2025
by
Joseph
Committed by
GitHub
Sep 30, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: Type helpers don't need to be imported (#84265)
Let's be more clear about the usage of these types.
parent
a843a49b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
+3
-0
layout.mdx
docs/01-app/03-api-reference/03-file-conventions/layout.mdx
+1
-0
page.mdx
docs/01-app/03-api-reference/03-file-conventions/page.mdx
+1
-0
route.mdx
docs/01-app/03-api-reference/03-file-conventions/route.mdx
+1
-0
No files found.
docs/01-app/03-api-reference/03-file-conventions/layout.mdx
View file @
b6834b1b
...
@@ -105,6 +105,7 @@ export default function Layout(props: LayoutProps<'/dashboard'>) {
...
@@ -105,6 +105,7 @@ export default function Layout(props: LayoutProps<'/dashboard'>) {
> **Good to know**:
> **Good to know**:
>
>
> - Types are generated during `next dev`, `next build` or `next typegen`.
> - Types are generated during `next dev`, `next build` or `next typegen`.
> - After type generation, the `LayoutProps` helper is globally available. It doesn'
t
need
to
be
imported
.
### Root Layout
### Root Layout
...
...
docs/01-app/03-api-reference/03-file-conventions/page.mdx
View file @
b6834b1b
...
@@ -135,6 +135,7 @@ export default async function Page(props: PageProps<'/blog/[slug]'>) {
...
@@ -135,6 +135,7 @@ export default async function Page(props: PageProps<'/blog/[slug]'>) {
>
-
Using
a
literal
route
(
e
.
g
.
`'/blog/[slug]'`
)
enables
autocomplete
and
strict
keys
for
`params`
.
>
-
Using
a
literal
route
(
e
.
g
.
`'/blog/[slug]'`
)
enables
autocomplete
and
strict
keys
for
`params`
.
>
-
Static
routes
resolve
`params`
to
`{}`
.
>
-
Static
routes
resolve
`params`
to
`{}`
.
>
-
Types
are
generated
during
`next dev`
,
`next build`
,
or
with
`next typegen`
.
>
-
Types
are
generated
during
`next dev`
,
`next build`
,
or
with
`next typegen`
.
>
-
After
type
generation
,
the
`PageProps`
helper
is
globally
available
.
It
doesn
't need to be imported.
## Examples
## Examples
...
...
docs/01-app/03-api-reference/03-file-conventions/route.mdx
View file @
b6834b1b
...
@@ -118,6 +118,7 @@ export async function GET(_req: NextRequest, ctx: RouteContext<'/users/[id]'>) {
...
@@ -118,6 +118,7 @@ export async function GET(_req: NextRequest, ctx: RouteContext<'/users/[id]'>) {
>
**
Good
to
know
**
>
**
Good
to
know
**
>
>
>
-
Types
are
generated
during
`next dev`
,
`next build`
or
`next typegen`
.
>
-
Types
are
generated
during
`next dev`
,
`next build`
or
`next typegen`
.
>
-
After
type
generation
,
the
`RouteContext`
helper
is
globally
available
.
It
doesn
't need to be imported.
## Examples
## Examples
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment