Function isTrue

  • Asserts that the value is true (strict equality).

    Parameters

    • val: boolean

      Value to check

    • OptionalerrorOrMessage: string | Error

      Error object or message to throw if the value is not true

    Returns asserts val is true