-
-
Notifications
You must be signed in to change notification settings - Fork 209
export const function is declared but its value is never read #2717
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
Comments
Ensure they are read as part of exporting the types #2717
Ensure they are read as part of exporting the types #2717
Seems like this specific situation is still not fixed but it should work now when there is no explict type annotation. |
You're right, we tested svelte check 4.1.6 and still getting the error. The type definition is important to have. Can you just mark anything with export as something to ignore? |
@dummdidumm Did you remember why
If I understand correctly, this is the reason why only the typed export const is unused. But not really sure what the intention is here. |
uuuh I think I wanted to have it the other way around - i.e. only those that don't have a type are omitted. The reasoning was that those without a type are referenced as |
Describe the bug
I've highlighted the important parts to explain the issue but basically trying to add type definition to an exported const function throws a ts error. This is similar to #2268 but doesn't involve bindings.

Reproduction
app.ts
App.svelte
Expected behaviour
No errors are thrown for any exports
System Info
Which package is the issue about?
No response
Additional Information, eg. Screenshots
Note adding //@ts-ignore silences the error, everything does work but would rather not ignore all these errors
The text was updated successfully, but these errors were encountered: