Skip to content

fix(types): type prose components in app config#269

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-d56e39a
Jul 10, 2026
Merged

fix(types): type prose components in app config#269
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-d56e39a

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Syncs upstream nuxt/ui commit d56e39afix(types): type prose components in app config (#6711).

What

TVConfig treated every app-config key as a flat component config, so the prose key — itself a namespace of prose components (prose.prompt, prose.pre, …) — wasn't typed correctly. The fix recurses TVConfig<T[P]> when P 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 compoundVariants block). b24ui's TVConfig diverges — it's a single mapped type that already folds compoundVariants into the K extends … union — so the fix collapses to one edit on b24ui's single [P in keyof T]?::

[P in keyof T]?: P extends 'prose' ? TVConfig<T[P]> : {}

Same semantics: appConfig.b24ui.prose.<component> is now recursively typed via TVConfig instead of as a flat component config.

Verify (CI=true)

dev:prepare · lint · typecheck · test · build — all green. Type-only change; typecheck (vue-tsc + all nuxt typecheck projects) resolves the recursion with no regressions. Suite 5477 passed / 6 skipped. No snapshot changes.

Ledger: cursor advanced to d56e39a; previous entry 0f2b9da reconciled to PR #268.

🤖 Generated with Claude Code


Generated by Claude Code

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
@IgorShevchik IgorShevchik merged commit 7289009 into main Jul 10, 2026
1 check passed
@IgorShevchik IgorShevchik deleted the sync/nuxt-d56e39a branch July 10, 2026 18:22
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