Why
BlogPost in app/[slug]/page.tsx is exported without a return-type annotation at the Next.js route boundary, leaving its contract incomplete where other page components in the same project already annotate their return types.
Current state
app/[slug]/page.tsx line 37 exports async function BlogPost({ params }: Props) with no return type. The Likes and Blog page components in the same project already annotate their return types as Promise<ReactElement> or equivalent.
Ideal state
BlogPost carries an explicit return type: Promise<ReactElement> (or the correct JSX type for this component).
- The signature is consistent with other page components in the codebase.
- A reader can understand the contract from the signature alone.
Starting points
app/[slug]/page.tsx — line 37 (the function signature to annotate)
- Other page components (e.g.,
Likes, Blog) — reference for the return type used in the project
QA plan
- Open
app/[slug]/page.tsx and verify the BlogPost function signature includes a return-type annotation.
- Change the return type to an incompatible type — expect a compile error.
- Run
tsc --noEmit — expect no type errors.
Done when
BlogPost has an explicit return-type annotation consistent with other page components in the project.
Why
BlogPostinapp/[slug]/page.tsxis exported without a return-type annotation at the Next.js route boundary, leaving its contract incomplete where other page components in the same project already annotate their return types.Current state
app/[slug]/page.tsxline 37 exportsasync function BlogPost({ params }: Props)with no return type. TheLikesandBlogpage components in the same project already annotate their return types asPromise<ReactElement>or equivalent.Ideal state
BlogPostcarries an explicit return type:Promise<ReactElement>(or the correct JSX type for this component).Starting points
app/[slug]/page.tsx— line 37 (the function signature to annotate)Likes,Blog) — reference for the return type used in the projectQA plan
app/[slug]/page.tsxand verify theBlogPostfunction signature includes a return-type annotation.tsc --noEmit— expect no type errors.Done when
BlogPosthas an explicit return-type annotation consistent with other page components in the project.