- If either operand of a operator is nullable, and neither operand is of type
any
orstring
. - If either operand of a
<
,>
,<=
,>=
, orin
operator is nullable. - If the operand of a ,
-
,~
,++
, or—
unary operator is nullable.An operand is considered nullable if the type of the operand isnull
orundefined
or a union type that includesnull
orundefined
. Note that the union type case only only occurs in—strictNullChecks
mode because andundefined
disappear from unions in classic type checking mode.