Function isErrorWithStack

  • Type guard for determining whether the given value is an error object with a stack property, such as an instance of Error.

    Returns

    A boolean.

    Parameters

    • error: unknown

      The object to check.

    Returns error is {
        stack: string;
    }