• Parameters

    • assertion: unknown

      will be asserted

    • message: GuardMessage = 'Assertion failed'

      if a string, we will use it as the error message, if it is a function, we will call it to produce the error message (can be used to avoid costly message generations)

    Returns asserts assertion

    GuardError - if the assertion fails