1 |
|
2 | export type ErrorValid = Errlop | Error;
|
3 |
|
4 | export interface ErrorProperties {
|
5 |
|
6 | message: string;
|
7 |
|
8 | code: string | number;
|
9 |
|
10 | level: string | number;
|
11 |
|
12 | parent: ErrorValid | null;
|
13 |
|
14 | ancestors: Array<ErrorValid>;
|
15 |
|
16 | exitCode: number | null;
|
17 |
|
18 | orphanStack: string;
|
19 |
|
20 | stack: string;
|
21 | }
|
22 |
|
23 | export type ErrorInput = Errlop | Error | Partial<ErrorProperties> | string | any;
|
24 |
|
25 | export default class Errlop extends Error implements ErrorProperties {
|
26 | parent: ErrorValid | null;
|
27 | ancestors: Array<ErrorValid>;
|
28 | exitCode: number | null;
|
29 | orphanStack: string;
|
30 | stack: string;
|
31 | message: string;
|
32 | code: string | number;
|
33 | level: string | number;
|
34 |
|
35 | klass: typeof Errlop;
|
36 |
|
37 | constructor(input: ErrorInput, parent?: ErrorInput);
|
38 | /** The separator to use for the stack entries */
|
39 | static stackSeparator: string;
|
40 | /** Check whether or not the value is an Errlop instance */
|
41 | static isErrlop(value: Errlop): true;
|
42 | static isErrlop(value?: any): value is Errlop;
|
43 | /** Check whether or not the value is an Errlop or Error instance. */
|
44 | static isError(value: ErrorValid): true;
|
45 | static isError(value?: any): value is ErrorValid;
|
46 | /** Ensure that the value is an Errlop instance */
|
47 | static ensure(value: ErrorInput): Errlop;
|
48 | /**
|
49 | * Syntactic sugar for Errlop class creation.
|
50 | * Enables `Errlop.create(...)` to achieve `new Errlop(...)`
|
51 | */
|
52 | static create(input: ErrorInput, parent?: ErrorInput): Errlop;
|
53 | }
|
54 | //# sourceMappingURL=index.d.ts.map |
\ | No newline at end of file |