Skip to content

Conversation

@evshank
Copy link

@evshank evshank commented Feb 4, 2026

What changed? Why?
Fixed incorrect TypeScript typing of params in the Generate Dynamic Embed Images guide.

Originally, params was typed as a Promise<{ username: string }> and accessed using await params, which does not match the Next.js App Router API. In Next.js App Router:

  • params is always a synchronous object
  • is not a Promise
  • its type is { username: string } in these examples

The incorrect typing caused TypeScript errors (TS2741: Property 'username' is missing in type 'Promise<{ username: string; }>' but required in type '{ username: string; }') in the API route, generateMetadata, and page components.

All examples have now been updated to:

  • type params correctly as { username: string }
  • remove await
  • access values directly via params.username

This ensures the examples compile cleanly in TypeScript and align with the Next.js App Router contract.


Notes to reviewers

N/A


How has it been tested?

Verified that TypeScript compilation passes with no errors (tsc --noEmit)

@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@evshank
Copy link
Author

evshank commented Feb 4, 2026

@roethke @youssefea Guys, can you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants