Allow bitwise test on undefined
#22230
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Suggestion
An idea for TypeScript
TypeScript Version: 2.8.0-dev.20180228
Search Terms: undefined strictNullChecks bitwise and or
(ref: #22088 (comment))
Code
Expected behavior:
No error.
&
and|
work well on undefined values:undefined | 2
is2
,undefined & 2
is0
. Contrast withundefined + 2
which isNaN
.Actual behavior:
The text was updated successfully, but these errors were encountered: