You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have added svelte-preprocess to a rather large existing project and started converting components one-by-one to lang="ts".
I also have added svelte-check to check for errors.
Unfortunately, converting to ts works only for lowest level components first, because you cannot pass any properties to a js component, which props are all indentified as "undefined". If you convert imported components to ts, even without specifying the type, then props are correctly identified as "any" and everything works.
Is the problem with svelte2tsx or a similar tool? I don't know if it's used behind-the-scenes by svelte-check or not.
To Reproduce
Use a js component with properties from a ts component, then build the project with npm run build
Expected behavior svelte-check should not emit any errors for existing properties, resulting in successful build.
System (please complete the following information):
OS: Linux (not relevant)
IDE: Intellij (not relevant)
Plugin/Package: svelte-check is used directly from snowpack
Additional context
Gradual migration of svelte components to TypeScript (the rest of code is TypeScript already)
The text was updated successfully, but these errors were encountered:
Describe the bug
I have added
svelte-preprocess
to a rather large existing project and started converting components one-by-one tolang="ts"
.I also have added
svelte-check
to check for errors.Unfortunately, converting to ts works only for lowest level components first, because you cannot pass any properties to a js component, which props are all indentified as "undefined". If you convert imported components to ts, even without specifying the type, then props are correctly identified as "any" and everything works.
Is the problem with svelte2tsx or a similar tool? I don't know if it's used behind-the-scenes by svelte-check or not.
To Reproduce
Use a js component with properties from a ts component, then build the project with
npm run build
Expected behavior
svelte-check
should not emit any errors for existing properties, resulting in successful build.System (please complete the following information):
svelte-check
is used directly from snowpackAdditional context
Gradual migration of svelte components to TypeScript (the rest of code is TypeScript already)
The text was updated successfully, but these errors were encountered: