tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

Inconsistent support for primitive types #286

Closed niekvanderkooy closed 2 years ago

niekvanderkooy commented 2 years ago

Apologies if this problem is covered by another issue, I have read some of the typescript-related issues, and have not come across my specific problem.

I have a .svelte file as seen below. As you can see, type hinting string works as expected, but boolean and number are not. Additionally, calling my foo function correctly presents an error when not passing a string as the first argument, but the other two arguments are 'ignored', while when defining a bar function with a number as first argument, passing a string as first argument is correctly seen as an error.

image

I am using plugin version 0.22.0 and intellij (specifically PyCharm in my case) 2022.1.

niekvanderkooy commented 2 years ago

Apologies, it seems this was an intellij issue, see https://intellij-support.jetbrains.com/hc/en-us/community/posts/206351109--solved-TypeScript-Unresolved-basetypes . Invalidating caches of the IDE solved the issue.