Ati/cl 269 fix vue tsc ts7022 errors#44
Closed
ati7697 wants to merge 2 commits into
Closed
Conversation
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>
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.
Summary
Fixes the
TS7022errors thatnpm run build(andvue-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
*Rootand updates the template tag to match. Same shape thatCalendar.vue(CalendarRoot),Popover.vueand other working wrappers already use.src/components/stepper/StepperDescription.vuesrc/components/stepper/StepperIndicator.vuesrc/components/stepper/StepperItem.vuesrc/components/toggle/Toggle.vuesrc/components/toggle-group/ToggleGroupItem.vueAnything the reviewer needs to know
npx vue-tsc --noEmitpassing clean with no other diff.<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 tomain🤖 Generated with Claude Code