Skip to content

Commit b6834b1

Browse files
authored
docs: Type helpers don't need to be imported (#84265)
Let's be more clear about the usage of these types.
1 parent a843a49 commit b6834b1

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

docs/01-app/03-api-reference/03-file-conventions/layout.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default function Layout(props: LayoutProps<'/dashboard'>) {
105105
> **Good to know**:
106106
>
107107
> - Types are generated during `next dev`, `next build` or `next typegen`.
108+
> - After type generation, the `LayoutProps` helper is globally available. It doesn't need to be imported.
108109
109110
### Root Layout
110111

docs/01-app/03-api-reference/03-file-conventions/page.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export default async function Page(props: PageProps<'/blog/[slug]'>) {
135135
> - Using a literal route (e.g. `'/blog/[slug]'`) enables autocomplete and strict keys for `params`.
136136
> - Static routes resolve `params` to `{}`.
137137
> - Types are generated during `next dev`, `next build`, or with `next typegen`.
138+
> - After type generation, the `PageProps` helper is globally available. It doesn't need to be imported.
138139
139140
## Examples
140141

docs/01-app/03-api-reference/03-file-conventions/route.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export async function GET(_req: NextRequest, ctx: RouteContext<'/users/[id]'>) {
118118
> **Good to know**
119119
>
120120
> - Types are generated during `next dev`, `next build` or `next typegen`.
121+
> - After type generation, the `RouteContext` helper is globally available. It doesn't need to be imported.
121122
122123
## Examples
123124

0 commit comments

Comments
 (0)