Function isNonNullable

Determines if a value is not null nor undefined.

isNonNullable(1); // => true
isNonNullable(null); // => false
isNonNullable(undefined); // => false
  • Type Parameters

    • T

      The type of the value to check.

    Parameters

    • x: T

      The value to check.

    Returns x is NonNullable<T>

    A boolean indicating if the value is not null or undefined.