-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting svelte(missing-declaration) warnings for props #826
Comments
I'm not able to reproduce this given your code snippet. For me a file with that content produces no warnings. |
Did some more digging around it, turns out having |
The problem is that TypeScript's transpilation is producing wrong results in this case. This is how the script content looks afterwards: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.name = void 0;
exports.name = 'John Doe';
//# sourceMappingURL=Test.svelte.js.map This is handed to the Svelte compiler which expects some kind of So to some extend it's "works as designed" from all parties involved but the combination leads to strange results. I'm not sure why you would want to set |
I have a shared tsconfig with a node application which is why Would this be a helpful thing to note in the docs somewhere? It took me a while to figure out exactly what was wrong with my setup since it's not immediately obvious, so maybe it'll help someone else... |
Describe the bug
I have this component code:
I get a warning for
svelte(missing-declaration)
forname
when I use it on the last line there. If I remove the inline export, the warning goes away:Using svelte-check v1.1.35. Anyone know what I'm doing wrong here?
Expected behavior
No warning for prop usage.
System (please complete the following information):
svelte-check
The text was updated successfully, but these errors were encountered: