You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VSCode the file contents below will cause an error stating: "Type annotations can only be used in TypeScript files.js(8010)" even though the script tag includes lang="ts". This will show up on the "type" declaration "export let labels: string[];" line where "string[]" will have the red squiggle line below it.
Moving the "left shift" out of the @const and calling it in a function works around the issue.
ex: {@const mask = doShift(1,indx)}
I assume it has to do with parsing inside the "html" section the "<" is causing the issue.
The file will compile and work, this seems to be just an issue with the plugin.
Describe the bug
In VSCode the file contents below will cause an error stating: "Type annotations can only be used in TypeScript files.js(8010)" even though the script tag includes lang="ts". This will show up on the "type" declaration "export let labels: string[];" line where "string[]" will have the red squiggle line below it.
Moving the "left shift" out of the @const and calling it in a function works around the issue.
ex: {@const mask = doShift(1,indx)}
I assume it has to do with parsing inside the "html" section the "<" is causing the issue.
The file will compile and work, this seems to be just an issue with the plugin.
Reproduction
Expected behaviour
I would assume no error displayed under the "string[]" type declaration.
System Info
OS: [Windows 11]
IDE: [VSCode 1.67.2]
Svelte for VS Code: v105.16.1
Which package is the issue about?
Svelte for VS Code
Additional Information, eg. Screenshots
The text was updated successfully, but these errors were encountered: