Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Sidebar #893

Open
2 tasks
IStarWatcher opened this issue Nov 12, 2024 · 1 comment
Open
2 tasks

[Bug]: Sidebar #893

IStarWatcher opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@IStarWatcher
Copy link

Reproduction

https://github.com/unovue/shadcn-vue/blob/dev/apps/www/src/lib/registry/default/ui/sidebar/SidebarMenuButton.vue

Describe the bug

when building the project (tsc-vue -b), an error appeared in the SidebarMenuButton component related to type incompatibility between the SidebarMenuButtonChild component and the properties passed to it
the error itself:
'''
src/components/ui/sidebar/SidebarMenuButton.vue:30:4 - error TS2345: Argument of type '{ isActive: boolean; class: HTMLAttributes["class"]; asChild: boolean; as: AsTag | Component; variant: "default" | "outline"; size: "default" | ... 1 more ... | "lg"; }' is not assignable to parameter of type 'Partial<{ size: "default" | "sm" | "lg"; as: string; variant: "default" | "outline"; }> & Omit<{ readonly variant?: "default" | "outline"; readonly size?: "default" | "sm" | "lg"; readonly isActive?: boolean; readonly class?: any; readonly asChild?: boolean; readonly as?: AsTag | Component; } & VNodeProps & AllowedC...'.
Type '{ isActive: boolean; class: HTMLAttributes["class"]; asChild: boolean; as: AsTag | Component; variant: "default" | "outline"; size: "default" | ... 1 more ... | "lg"; }' is not assignable to type 'Partial<{ size: "default" | "sm" | "lg"; as: string; variant: "default" | "outline"; }>'.
Types of property 'as' are incompatible.
Type 'AsTag | Component' is not assignable to type 'string'.
Type 'ComponentOptions<any, any, any, ComputedOptions, MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>' is not assignable to type 'string'.

30
'''
'''
src/components/ui/sidebar/SidebarMenuButton.vue:36:8 - error TS2345: Argument of type '{ isActive: boolean; class: HTMLAttributes["class"]; asChild: boolean; as: AsTag | Component; variant: "default" | "outline"; size: "default" | ... 1 more ... | "lg"; }' is not assignable to parameter of type 'Partial<{ size: "default" | "sm" | "lg"; as: string; variant: "default" | "outline"; }> & Omit<{ readonly variant?: "default" | "outline"; readonly size?: "default" | "sm" | "lg"; readonly isActive?: boolean; readonly class?: any; readonly asChild?: boolean; readonly as?: AsTag | Component; } & VNodeProps & AllowedC...'.
Type '{ isActive: boolean; class: HTMLAttributes["class"]; asChild: boolean; as: AsTag | Component; variant: "default" | "outline"; size: "default" | ... 1 more ... | "lg"; }' is not assignable to type 'Partial<{ size: "default" | "sm" | "lg"; as: string; variant: "default" | "outline"; }>'.
Types of property 'as' are incompatible.
Type 'AsTag | Component' is not assignable to type 'string'.
Type 'ComponentOptions<any, any, any, ComputedOptions, MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>' is not assignable to type 'string'.

36
'''

System Info

System:
  Binaries:
    node - 22.11.0
    npm - 10.9.0
  npmPackages:
    "typescript": "5.6.3",
    "vue": "^3.5.12",
    "radix-vue": "^1.9.8",

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@IStarWatcher IStarWatcher added the bug Something isn't working label Nov 12, 2024
@brokuka
Copy link

brokuka commented Nov 16, 2024

image
Some strange bug too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants