Skip to content

Starting v104.4.4 lines of code above $storename cause "Type Foo has no call signatures" etc. errors (with latest dependencies) #859

@vatro

Description

@vatro

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 Classes let 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 Prettier semi: 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):

  • Windows 10
  • IDE: VSCode
  • "Svelte for VSCode" >= v104.4.4

Additional context
tsconfig.js

{
    "extends": "@tsconfig/svelte/tsconfig.json",
   
    "compilerOptions": {
        
        // tested, none of these have something to do with the errors
        "target": "ESNext",
        "strict": true,
        "strictNullChecks": false,
        "noImplicitAny": false,
        "strictFunctionTypes": true,

        // "Svelte for VSCode Problem": "no call signatures" etc. errors: 
        // v103.0.0: ok
        // v104.0.0: ok
        // v104.0.0: ok
        // v104.4.0: ok
        // v104.4.3: ok
        // v104.4.4: errors start

    },
    "include": [
        "src/**/*"
    ],
    "exclude": [
        "node_modules/*",
        "__sapper__/*",
        "public/*"
    ]
} 

Svelte 3.35.0
TypeScript 4.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions