-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Union | not surrounded by spaces in type declaration #49858
Comments
my setting:
|
Can you explain what you are seeing and what you expected? A|B is correctly detecting the | as a JsTypeOperator
Its the string | number that's incorrectly seeing it as a BinaryOperator
Whilst we could fix it so there are spaces around the JsTypeOperator (all the time), or even add an option to control that, I think the string | number would be ALOT harder to get right in the situation where you don't want spaces not so much in the string and number case but in the const sample = A | B case, any thoughts? |
There are unit tests to assert there is no space between them, if yo wanted
Then I think we'd need to add a new option
|
The text was updated successfully, but these errors were encountered: