The comparison issue for TS #66430
Unanswered
HAIXIN-ZHANG
asked this question in
Request a new @types package
Replies: 1 comment
-
You can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
just wondering why TS does not support something like
String?.length ==> 0
orArray?.length ==> 0
. As TS is already supported to useArray?.length == 0
orArray?.length === 0
. but why no==>, =>, ==<, =<
.If we want to do something like
if (String?.length >0) {}
we currently have to make it toif (String && String.length >0) {}
orif (!String?.length ===0) {}
, but if we follow the Syntax logic of TS, it should have a Syntax likeif (String?.length ==>0) {}
Beta Was this translation helpful? Give feedback.
All reactions