Chok’s Typescript Utilities
    Preparing search index...

    Function nonEmpty

    • Type asserts that t is truthy. Throws an error if t is null or undefined.

      Type Parameters

      • T

      Parameters

      • t: undefined | null | number | false | "" | 0n | T
      • varName: string = "value"

        The variable name to include in the error to throw when t is empty. Defaults to 'value'.

      Returns T