Function isDefined

Check if the value is defined (not null or undefined)

  • Type Parameters

    • T = unknown

    Parameters

    • val: T

      Value to check

    Returns val is NonNullable<T>

    Whether the value is defined (not null or undefined)