Unverified Commit b6834b1b authored by Joseph's avatar Joseph Committed by GitHub

docs: Type helpers don't need to be imported (#84265)

Let's be more clear about the usage of these types.
parent a843a49b
...@@ -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
......
...@@ -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
......
...@@ -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
......
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