1 | export interface ErrorLike {
|
2 | message: string;
|
3 | code?: string;
|
4 | }
|
5 | export declare const isErrorLike: (val: any) => val is ErrorLike;
|
6 | /**
|
7 | * Ensures a value is a proper Error, copying all properties if needed.
|
8 | */
|
9 | export declare const asError: (err: any) => Error;
|
10 | /**
|
11 | * An Error that aggregates multiple errors.
|
12 | */
|
13 | export interface AggregateError extends Error {
|
14 | name: 'AggregateError';
|
15 | errors: Error[];
|
16 | }
|
17 | /**
|
18 | * Creates an AggregateError from multiple ErrorLikes.
|
19 | *
|
20 | * @param errors errors or ErrorLikes to aggregate
|
21 | */
|
22 | export declare const createAggregateError: (errors?: ErrorLike[]) => AggregateError;
|