UNPKG

636 BTypeScriptView Raw
1import { StructFailure } from './failure';
2/**
3 * `StructError` objects are thrown (or returned) by Superstruct when its
4 * validation fails. The error represents the first error encountered during
5 * validation. But they also have an `error.failures` property that holds
6 * information for all of the failures encountered.
7 */
8export declare class StructError extends TypeError {
9 value: any;
10 type: string;
11 path: Array<number | string>;
12 branch: Array<any>;
13 failures: () => Iterable<StructFailure>;
14 [key: string]: any;
15 constructor(failure: StructFailure, iterable: Iterable<StructFailure>);
16}