-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Make TS top level errors in script explicit #753
Comments
The instance script is converted to something that is inside a function called |
Moving it out would expose it in the scope of the script module, which is unexpected |
True, so we need to make the error message a little clearer. That can be added here, I imagine something like |
Enhanced message. Omitted the |
I was confused why this threw an error,
Modifiers cannot appear here. ts(1184)
I didn't know but it makes sense that
declare
can only be used in the top-levelIt's not self-evident for svelte users that script blocks don't accept such typescript top-level statements
maybe could the extension hint that the statement should be moved to a script context module block
Even better, a "quick fix" to move it into a script module ?
The text was updated successfully, but these errors were encountered: