Chok’s Typescript Utilities
    Preparing search index...

    Function assert

    • Type asserts that t is truthy. Throws an error with errorMessage if t is falsy.

      Type Parameters

      • T

      Parameters

      • t: undefined | null | number | false | "" | 0n | T
      • errorMessage: string

      Returns asserts t is T