File size: 712 Bytes
c2b7eb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { StandardSchemaV1 } from '@standard-schema/spec';

/**
 * Creates and returns the dot path of an issue if possible.
 *
 * @param issue The issue to get the dot path from.
 *
 * @returns The dot path or null.
 */
declare function getDotPath(issue: StandardSchemaV1.Issue): string | null;

/**
 * A schema error with useful information.
 */
declare class SchemaError extends Error {
    /**
     * The schema issues.
     */
    readonly issues: ReadonlyArray<StandardSchemaV1.Issue>;
    /**
     * Creates a schema error with useful information.
     *
     * @param issues The schema issues.
     */
    constructor(issues: ReadonlyArray<StandardSchemaV1.Issue>);
}

export { SchemaError, getDotPath };