• Parameters

    • assertion: undefined | boolean

      will be asserted

    • message: GuardMessage = 'Assertion failed'

      if a string, will be used as error message, if a function, will be called to produce the error message (can be used to avoid costly message generations)

    Returns asserts assertion

    GuardError - if the assertion fails