fix(types): type prose components in app config#269
Merged
Conversation
TVConfig treated the `prose` app-config key as a flat component config, but prose is itself a namespace of prose components. Recurse TVConfig for the prose key so nested prose component configs are typed. b24ui's TVConfig is a single merged mapped type, so the conditional applies once. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs upstream nuxt/ui commit
d56e39a— fix(types): type prose components in app config (#6711).What
TVConfigtreated every app-config key as a flat component config, so theprosekey — itself a namespace of prose components (prose.prompt,prose.pre, …) — wasn't typed correctly. The fix recursesTVConfig<T[P]>whenP extends 'prose', so nested prose component configs get proper typing.Adaptation
Upstream applies the conditional to both halves of its intersected mapped type (the base/slots/variants block and the separate
compoundVariantsblock). b24ui'sTVConfigdiverges — it's a single mapped type that already foldscompoundVariantsinto theK extends …union — so the fix collapses to one edit on b24ui's single[P in keyof T]?::Same semantics:
appConfig.b24ui.prose.<component>is now recursively typed viaTVConfiginstead of as a flat component config.Verify (
CI=true)dev:prepare·lint·typecheck·test·build— all green. Type-only change; typecheck (vue-tsc+ allnuxt typecheckprojects) resolves the recursion with no regressions. Suite 5477 passed / 6 skipped. No snapshot changes.Ledger: cursor advanced to
d56e39a; previous entry0f2b9dareconciled to PR #268.🤖 Generated with Claude Code
Generated by Claude Code