fix(types): type the i18n config key with the augmentable ModuleOptions interface - #4139
fix(types): type the i18n config key with the augmentable ModuleOptions interface#4139lazerg wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe Nuxt module augmentation now types Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized type-only change makes the i18n configuration keys augmentable without changing runtime behavior, and no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🔗 Linked issue
📚 Description
ModuleOptionsis an interface, so companion modules can extend it through declaration merging. Thei18nkey onNuxtConfigandNuxtOptionsis typed with theUserNuxtI18nOptionsalias instead, which an augmentation never reaches, so adding a custom key underi18nfails with TS2353 even though the value survives at runtime.Both keys now point at
ModuleOptions. It extendsUserNuxtI18nOptionsand adds no members, so the exposed type stays the same and only augmentability changes.Summary by CodeRabbit