Closed RayGuo-ergou closed 2 weeks ago
Thanks for the PR @RayGuo-ergou ! Can you share more details of the error you are having? It's weird that such error being thrown, as internally the component should be able to refer those types correctly.
It's only happening when the build reference and expose this type for my library. e.g. I have the props type
// types.ts
export type MyProps = CalendarRootProps & {
...
}
// index.ts
export type * from './types'
or even just use in Calendar.vue
, because the build will create a type declare file for each component, will also see this error.
I will create a reproduction repo later.
Hi @zernonia, here's a reproduction of this issue: https://github.com/RayGuo-ergou/radix-reproduction
It's actually caused by th vite-plugin-dts
because that plugin is to generate type declare files.
After manually export the type:
Description
Export typo
MultipleCalendarRootProps
andSingleCalendarRootProps
used byCalendarRootProps
.Motivation
I was working on build an UI library based on radix-vue/shadcn-vue, this error shows up when build:
This seems a typescript limitation that interface of type alias should also be exposed.
I have also tried:
which will also work because it's an interface, but I think they are not functionally equivalent.