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
[TypeScript] Declaring variable as type, without a value, without a semicolon, as the last item in the <script>, messes up syntax highlighting in VS Code
#1993
Closed
D-Marc1 opened this issue
Apr 23, 2023
· 1 comment
Notice how even on GitHub's syntax highlighter, you can see the difference between by first example and last 3 ones.
Expected behaviour
The expected behavior is that declaring a variable as a type as the last item in the <script>, without setting it to value, without semicolons, shouldn't break the syntax highlighting.
System Info
OS: MacOS
IDE: VSCode
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
Syntax highlighting breaking
Syntax highlighting working
The text was updated successfully, but these errors were encountered:
Describe the bug
Declaring the final item in the
<script>
as a type, without setting a value, without a semicolon, messes up the syntax highlighter:Reproduction
Say I have the following Svelte file:
This will mess up the syntax highlighting.
However, the syntax highlighting is fixed by setting a default value to the variable, using a semicolon or setting a variable to a value under it:
Setting default value to variable
Using a semicolon
Setting default value to a variable as the last item in the
<script>
Notice how even on GitHub's syntax highlighter, you can see the difference between by first example and last 3 ones.
Expected behaviour
The expected behavior is that declaring a variable as a type as the last item in the
<script>
, without setting it to value, without semicolons, shouldn't break the syntax highlighting.System Info
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
Syntax highlighting breaking
Syntax highlighting working
The text was updated successfully, but these errors were encountered: