assertthat
Version:
assertthat provides fluent TDD.
12 lines (11 loc) • 486 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.prettyPrintResult = void 0;
const prettyPrint_1 = require("../typeAware/prettyPrint");
const prettyPrintResult = function (value, depth = 0) {
if (value.hasValue()) {
return `ValueResult(${(0, prettyPrint_1.prettyPrint)(value.value, depth + 1)})`;
}
return `ErrorResult(${(0, prettyPrint_1.prettyPrint)(value.error, depth + 1)})`;
};
exports.prettyPrintResult = prettyPrintResult;