-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Disable Elvis ligature (?:) for optional TypeScript properties #970
Comments
Interesting! I’ll mark it as a conflict but I’m not sure what can I do, except removing ligature altogether |
It's used as ternary if operator in PHP. Spaces are not required. |
@jdreesen Wouldn't that be |
I know some languages (C?) use |
Right, but you can do |
Sad to see this go (I use it a lot in Kotlin, ObjC, and others), but I understand why it did |
Kotlin uses ?: (elvis operator). It is conventionally surrounded by spaces. This is an unfortunate change for Kotlin users 😢 |
I don't know languages where
?:
is used as an operator well, but in TypeScript the sequence comes up a lot in interfaces, denoting optional properties in an interface:The two characters don't form an operator here, they just happen to be next to each other, so the ligature is odd. Is
?:
always (or at least usually) surrounded by spaces when it's used as an operator? Maybe it would work to only apply the ligature to:?
, with the preceding space? (I don't have much experience with ligatures like this, so I have no idea if I'm asking for something reasonable.)The text was updated successfully, but these errors were encountered: