Function isError

  • Type guard to check if error is an Error instance

    Parameters

    • error: unknown

      Value to check

    Returns error is Error

    true if the value is an Error, false otherwise