Mohamed-Kaizen / unplugin-svelte-components

On-demand components auto importing for Svelte
MIT License
37 stars 7 forks source link

'ComponentName' is not definedsvelte(missing-declaration) #2

Closed hartwm closed 1 year ago

hartwm commented 2 years ago

This is probably less of a bug and more of a typescript newbie question. I am using your package successfully to autoimport in sveltekit and its generating components.d.ts, however, my VS code is still showing errors all over the place. The code compiles and works, but it's unusable in terms of visual feedback. Am I missing something else I need to do?

Mohamed-Kaizen commented 2 years ago

The d.ts file will silence errors by typescript that it cannot find the module. The mentioned warning here is from the Svelte compiler, which cannot be silenced like this. There currently isn't a way to silence a warning across svelte-check.

hallefsantos commented 1 year ago

@Mohamed-Kaizen did you find a solution for that? I'm having the same error.

Mohamed-Kaizen commented 1 year ago

The only way to silence the warning in VS code, is this 👇

image