-
-
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
Starting v104.4.4 lines of code above $storename cause "Type Foo has no call signatures" etc. errors (with latest dependencies) #859
Comments
Could you provide a code snippet where this occurs? |
sorry, not atm, but they occur at many different places / cases + not always, mostly as I've described above. I couldn't figure out any "real" logic yet. Will take a look again at it later. EDIT: AND ☝️ before getting them, I believe I've updated all packages (Svelte for sure), so the latest Svelte / TS / RollUp etc. might also be the reason. Will check again later! |
As long as it's a reproducible code snippet I'm fine, you don't need to track down the logic |
@dummdidumm Ok, I was able to reproduce it:
BUG: When using "Svelte for VSCode" 1.0.4.44 or above, anything written above the adding a semicolon at the end of the affected lines, fixes errors: |
The store transformation now is prepended with a semicolon if it's the first thing in an expression statement because the statement above it could end without a semicolon, making JavaScript think that this is a function invocation sveltejs#859
The store transformation now is prepended with a semicolon if it's the first thing in an expression statement because the statement above it could end without a semicolon, making JavaScript think that this is a function invocation #859
Describe the bug
With (since) v104.4.4 (incl., last ok: v104.4.3) I get a lot of
"Type Foo has no call signatures"
errors in my project mostly after creating instances of Classeslet foo = new Foo()
, simple assignments to boolean values or to undefined, at the end of ternaries etc., yet not everywhere / always 🤔.👉 Adding an (optional) semicolon after the certain expressions fixes the errors!
EDIT: When using "Svelte for VSCode" 1.0.4.44 or above, anything written above the
$
prefixed store name causes errors (with currently latest versions of Svelte / Svelte ts-app template dependencies). Only lines above$storename
-lines are affected. Lines above reactive statements'$
are ok, see #859 (comment)To Reproduce
Since the problem doesn't seem to occur everywhere / always (?), maybe: take a bigger existing
semi: true
Svelte/TS component and remove them with Prettiersemi: false
with "Svelte for VSCode" >= v104.4.4 installed.EDIT: Meanwhile successfully reproduced, see #859 (comment)
Expected behavior
No errors as with <= v104.4.3
System (please complete the following information):
Additional context
tsconfig.js
Svelte 3.35.0
TypeScript 4.2.3
The text was updated successfully, but these errors were encountered: