#VSCode Errors on Shorthand React Prop Syntax
1 messages · Page 1 of 1 (latest)
So basically ur code works, u just don't want those red lines, right?
That's right
Can u tell what u see when u hover on them?
many things :3
Although u should try to at least look at these errors once but if u don't want to i think this might help https://learn.microsoft.com/en-us/visualstudio/code-quality/in-source-suppression-overview?view=vs-2022&tabs=csharp
That would surpress those errors even in valid cases though correct? I still want the errors to show when they're legit, just not here :p
Yes ur right
Oh also I'm using VIsual Studio Code, not VS :)
These errors must be occurring because u must have something wrong in ur code maybe or ur using a buggy extension
I don't think I'm using any extension, should I be?
Nothing is wrong with my code though, if i just put the prop names in it all goes away
Depends on u but i personally code in js, python, go and i do use extensions because they make everything so easy
So why not let it be like this?
Because I prefer the shorthand syntax sugar :)
Oh, I thought this syntax was a feature of Bun 🤔
Oh sorry, misinformation. It has been discussed here: https://github.com/microsoft/TypeScript/issues/52057
It's a shame they don't want to move it forward. We apparently will have to wait for another major framework to support it so it gets some traction. Or a big YouTuber makes a move on it.
(Most) spec maintainers are hell. Not the first great feature that is an obvious thing that should be supported but one or a few guys are just against changes due to their brains' wiring.
I don't like {x, y, z}. {x} {y} is better for readability and it's easier to implement. With enough effort it would be possible to gather the community to work for it.
I get the point that TS should only accept it if JSX does, although it could be less radical as it has been in the past and helped the improvement of JS.
But JSX is frozen. No changes there. So we depend on them and they don't move.
ah ok thanks for this. So is there no way for Bun to get around this then? Could the Bun extension maybe modify the TS language server, or do something else clever? 🤔