Asserts that a value is a non-null object or function.
Unlike isObjectOrFunction, this function does not narrow the value to a generic object type. Instead, it
preserves the existing static type of the variable while removing primitive and nullish union members.
This assertion accepts all JavaScript reference values, including arrays, functions, class constructors, ordinary
objects, and specialized built-in objects.
Asserts that a value is a non-null object or function.
Unlike isObjectOrFunction, this function does not narrow the value to a generic object type. Instead, it preserves the existing static type of the variable while removing primitive and nullish union members.
This assertion accepts all JavaScript reference values, including arrays, functions, class constructors, ordinary objects, and specialized built-in objects.
Use this function when: