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 the code snippet above, notice the incorrect syntax highlighting of the function body's first expression (return new Promise(...)). The effect of the incorrect syntax is most visible in Visual Studio Code (notice lines 4 and 11):
Here is the expected syntax highlighting:
Interestingly, the issue on line 4 can be fixed by wrapping the return type in parentheses, but this does not fix the issue on line 11:
Furthermore, it appears as though the syntax highlighting of an arrow function's name and return type is dependent on the arrangement of its parameters:
This bug cannot be attributed to VS Code as it also appears in VS Code Insiders, and continues to appear even after I have disabled all extensions.
The text was updated successfully, but these errors were encountered:
mgthomas99
changed the title
Syntax fails when : <type> is on a new line
Syntax fails when : <type> is on a separate line to function declaration
Oct 31, 2018
mgthomas99
changed the title
Syntax fails when : <type> is on a separate line to function declaration
Syntax fails when function declaration return type is on a separate line
Oct 31, 2018
TS and JS Grammar Extension version: 0.0.46 / latest
Code
In the code snippet above, notice the incorrect syntax highlighting of the function body's first expression (
return new Promise(...)
). The effect of the incorrect syntax is most visible in Visual Studio Code (notice lines 4 and 11):Here is the expected syntax highlighting:
Interestingly, the issue on line 4 can be fixed by wrapping the return type in parentheses, but this does not fix the issue on line 11:
Furthermore, it appears as though the syntax highlighting of an arrow function's name and return type is dependent on the arrangement of its parameters:
This bug cannot be attributed to VS Code as it also appears in VS Code Insiders, and continues to appear even after I have disabled all extensions.
The text was updated successfully, but these errors were encountered: