Typescript Error when defining custom elements as a consumer in Svelte v4 #8936
Labels
good first issue
A small, encapsulated issue, ideal for a new contributor to Svelte to tackle.
types / typescript
Milestone
Describe the bug
When enabling custom elements compiler option, defining a custom element tag name using
Component.element
(as per the v4 docs) produces a type error. The__SvelteComponent_
type cannot resolveelement
.Reproduction
Stackblitz: https://stackblitz.com/edit/vitejs-vite-3sffk2?file=src%2Fmain.ts
Logs
System Info
System: OS: Linux 5.0 undefined CPU: (2) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 16.20.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.4.2 - /usr/local/bin/npm pnpm: 8.6.3 - /usr/local/bin/pnpm npmPackages: svelte: ^4.0.3 => 4.0.4
Severity
annoyance
The text was updated successfully, but these errors were encountered: