-
Notifications
You must be signed in to change notification settings - Fork 483
Open
Description
The Generate Dynamic Embed Images guide in the Base documentation contains an incorrect TypeScript typing for params in Next.js App Router examples.
Currently, the documentation types params as a Promise<{ username: string }> and accesses it using:
const { username } = await params;However, in Next.js App Router:
- params is always a synchronous object
- is not a Promise
- its type is { username: string }
Using the code in the current example results in an error:
TS2741: Property ‘username’ is missing in type ‘Promise<{ username: string; }>’ but required in type '{ username: string; }'
After the correction, the code compiles without errors.
This issue has been addressed in PR#1108
The PR updates all affected examples to the correct typing and removes await params.
Metadata
Metadata
Assignees
Labels
No labels