Skip to content

Ati/cl 269 fix vue tsc ts7022 errors#44

Closed
ati7697 wants to merge 2 commits into
mainfrom
ati/cl-269-fix-vue-tsc-ts7022-errors
Closed

Ati/cl 269 fix vue tsc ts7022 errors#44
ati7697 wants to merge 2 commits into
mainfrom
ati/cl-269-fix-vue-tsc-ts7022-errors

Conversation

@ati7697
Copy link
Copy Markdown
Contributor

@ati7697 ati7697 commented May 13, 2026

Summary

Fixes the TS7022 errors that npm run build (and vue-tsc) raises against five wrapper components. Each wrapper imported its reka-ui counterpart under the same identifier as the SFC's filename, so Vue's compiler resolved the template tag to the wrapper itself — vue-tsc then bailed on slot-type inference with '__VLS_2' implicitly has type 'any' because it … is referenced … in its own initializer.

The fix aliases the reka-ui import as *Root and updates the template tag to match. Same shape that Calendar.vue (CalendarRoot), Popover.vue and other working wrappers already use.

  • src/components/stepper/StepperDescription.vue
  • src/components/stepper/StepperIndicator.vue
  • src/components/stepper/StepperItem.vue
  • src/components/toggle/Toggle.vue
  • src/components/toggle-group/ToggleGroupItem.vue

Anything the reviewer needs to know

  • Zero runtime impact — only the local identifier and template tag name change. The compiled output is unchanged because Vue resolves both names to the same reka-ui component. Verified by npx vue-tsc --noEmit passing clean with no other diff.
  • No props/emits/slots surface area changes. Consumers of <Toggle>, <ToggleGroupItem>, <StepperItem> etc. don't see a difference.

Test plan

  • npm run build — no TS7022 errors (previously failed)
  • npm run dev — visit /components/stepper, /components/toggle, /components/toggle-group; confirm slot content renders identically to main

🤖 Generated with Claude Code

ati7697 and others added 2 commits May 13, 2026 10:29
Alias reka-ui imports as *Root so the template tag no longer collides
with the SFC's filename-derived component name, letting vue-tsc infer
slot types instead of treating the tag as a self-reference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ati7697 ati7697 requested a review from stevethomas May 13, 2026 00:34
@ati7697 ati7697 closed this May 14, 2026
@ati7697 ati7697 deleted the ati/cl-269-fix-vue-tsc-ts7022-errors branch May 14, 2026 01:30
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.

1 participant