UNPKG

320 BJavaScriptView Raw
1import { PathReporter } from './PathReporter';
2import { isLeft } from 'fp-ts/es6/Either';
3/**
4 * @since 1.0.0
5 * @deprecated
6 */
7export var ThrowReporter = {
8 report: function (validation) {
9 if (isLeft(validation)) {
10 throw new Error(PathReporter.report(validation).join('\n'));
11 }
12 }
13};