Replies: 2 comments
-
Ok, so it seems that if a component has |
Beta Was this translation helpful? Give feedback.
0 replies
-
@dummdidumm, seems that you may know exactly what this is about? I see PR 2380 in the sveltejs/language-tools repository that implements the $$IsomorphicComponent interface. Any help would be highly appreciated. Cheers! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, everyone.
I have a Svelte v4 component library that is being upgraded to Svelte v5. It is an in-house Bootstrap library for an in-house variant of Bootstrap.
The problem I have happens when trying to add a particular component in
src/lib/index.ts
. I'll show what works:This works. But this is not what I want. If you notice, the names all start with an underscore. This is because what I really want to do is this:
Basically, to avoid importing multiple components whenever a dev is using the
DropdownMenu
component, I want to export a POJO object that groups them all together. This is when TypeScript throws error TS4023:If I hover in VS Code over
DropdownMenu
, I see this:Hence the title: What is this
$$IsomorphicComponent
type? Why isDropdownMenu
the only one that shows up like this? Maybe if I knew, I could devise a fix for this, so I guess I should start by learning what this type is and what makes a component be of this type.What baffles me is 2 things:
DropdownMenu
component, why exporting it directly works? Isn't it still of type$$IsomorphicComponent
, which I'm not exporting like the error message says? I guess not. See baffling fact 2.DropdownMenu.Root
is of type$$IsomorphicComponent
. However,_DropdownMenu
is not! See the following screenshot:So the variable named
_DropdownMenu
is not$$IsomorphicComponent
, but when assigned toDropdownMenu.Root
is????Beta Was this translation helpful? Give feedback.
All reactions