UNPKG

assertthat

Version:
17 lines (16 loc) 821 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.prettyPrintIncompatibleTypeDiff = void 0; const chalk_1 = __importDefault(require("chalk")); const common_tags_1 = require("common-tags"); const prettyPrint_1 = require("./prettyPrint"); const prettyPrintIncompatibleTypeDiff = function (incompatibleTypeDiff, depth = 0) { return (0, common_tags_1.oneLine) ` ${chalk_1.default.red((0, prettyPrint_1.prettyPrint)(incompatibleTypeDiff.actual, depth + 1))} ${chalk_1.default.green((0, prettyPrint_1.prettyPrint)(incompatibleTypeDiff.expected, depth + 1))} `; }; exports.prettyPrintIncompatibleTypeDiff = prettyPrintIncompatibleTypeDiff;