Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(nuxt): typed props for layout property in definePageMeta#34409

Open
KazariEX wants to merge 1 commit intonuxt:mainfrom
KazariEX:feat/typed-layout-props
Open

feat(nuxt): typed props for layout property in definePageMeta#34409
KazariEX wants to merge 1 commit intonuxt:mainfrom
KazariEX:feat/typed-layout-props

Conversation

@KazariEX
Copy link
Member

@KazariEX KazariEX commented Mar 1, 2026

🔗 Linked issue

no response

📚 Description

no response

@KazariEX KazariEX requested a review from danielroe as a code owner March 1, 2026 05:03
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 1, 2026

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@34409

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@34409

nuxt

npm i https://pkg.pr.new/nuxt@34409

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@34409

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@34409

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@34409

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@34409

commit: cbd7374

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96bd51a and cbd7374.

📒 Files selected for processing (1)
  • packages/nuxt/src/pages/module.ts

Walkthrough

The PageMeta.layout type signature in the Nuxt module declaration was updated to implement stronger type safety for layout properties. The change restructures the layout property definition from a union type with generic Record<string, any> props to a mapped-type structure that associates specific layout keys with their corresponding prop types from the NuxtLayouts mapping. This modification replaces the single generic props definition with per-layout prop types indexed by LayoutKey.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is empty with no substantive content provided by the author, making it impossible to assess relevance to the changeset. Provide a brief description explaining the motivation, benefits, or context of the typed layout props enhancement.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: implementing typed props for the layout property in definePageMeta, which matches the type signature update from generic Record to per-layout typed NuxtLayouts[K].
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 1, 2026

Merging this PR will not alter performance

✅ 20 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing KazariEX:feat/typed-layout-props (cbd7374) with main (96bd51a)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant