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
When having a function with generic type params in an object and the generic type params wrap into multiple lines, the TS syntax highlighting is broken.
To reproduce, just paste the following code in a .ts file and see the broken output:
Issues like this have been repeatedly opened and closed as wontfix/design limitation. See #767 and its siblings.
Unfortunately this issue has been known for 5 years and activity here has slowed significantly, down to just basically bare minimum maintenance. The best advice I can give you is "try to format your code a different way", or consider using a different editor.
Issues like this have been repeatedly opened and closed as wontfix/design limitation. See #767 and its siblings.
This is very sad, as typescript is not just any language, it's a language created by Microsoft.
The best advice I can give you is "try to format your code a different way", or consider using a different editor.
So you suggest I should create an issue at prettier to not break generic arguments into multiple lines if the function is defined in an object? I don't think it's prettiers responsibility to handle this case, and such an issue would be closed as wontfix, as it's actually the wanted behavior.
Type: Bug
When having a function with generic type params in an object and the generic type params wrap into multiple lines, the TS syntax highlighting is broken.
To reproduce, just paste the following code in a
.ts
file and see the broken output:For reference, I added the same function but outside of the object which shows the correct/broken highlight in comparison:
VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:42:52.765Z)
OS version: Darwin x64 22.6.0
Modes:
The text was updated successfully, but these errors were encountered: