Code inspection (IntelliJ and GitHub) says that the following code can be simplified:
type Something = string | number | boolean | object
function isSomething(a: unknown): a is Something {
return a != undefined && a != null;
}
because a != null is always true. Why is that? AFAIK undefined and null are different values.
null == undefinedistrue. If you really need to distinguishundefinedandnull, use the===and!==operators.