Skip to content

isDefined ​

Identifies if a value is neither null nor undefined.

Type Definitions ​

ts
/**
 * @param val - The value.
 * @returns If the value is defined.
 */
function isDefined<T>(val: T): val is Exclude<T, null | undefined>

Released under the MIT License.