@devp0nt/error0 1.0.0-next.1 → 1.0.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.cts +186 -471
- package/dist/cjs/index.js +31 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +186 -471
- package/dist/esm/index.js +31 -18
- package/dist/esm/index.js.map +1 -1
- package/package.json +5 -3
- package/src/index.test.ts +14 -6
- package/src/index.ts +138 -117
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,110 +1,80 @@
|
|
|
1
1
|
import * as undici_types from 'undici-types';
|
|
2
2
|
import { Meta0 } from '@devp0nt/meta0';
|
|
3
|
-
import {
|
|
3
|
+
import { AxiosError, HttpStatusCode } from 'axios';
|
|
4
4
|
import { ZodError } from 'zod';
|
|
5
5
|
|
|
6
|
-
interface Error0Input {
|
|
7
|
-
message?: string;
|
|
8
|
-
tag?: string;
|
|
9
|
-
code?: string;
|
|
10
|
-
httpStatus?: HttpStatusCode | HttpStatusCodeString;
|
|
11
|
-
expected?: boolean | ExpectedFn;
|
|
12
|
-
clientMessage?: string;
|
|
13
|
-
cause?: Error0Cause;
|
|
14
|
-
stack?: string;
|
|
15
|
-
meta?: Meta0.Meta0OrValueTypeNullish;
|
|
16
|
-
zodError?: ZodError;
|
|
17
|
-
axiosError?: AxiosError;
|
|
18
|
-
}
|
|
19
|
-
interface Error0GeneralProps {
|
|
20
|
-
message: Error0Input['message'];
|
|
21
|
-
tag: Error0Input['tag'];
|
|
22
|
-
code: Error0Input['code'];
|
|
23
|
-
httpStatus: number | undefined;
|
|
24
|
-
expected: boolean | undefined;
|
|
25
|
-
clientMessage: Error0Input['clientMessage'];
|
|
26
|
-
anyMessage: string | undefined;
|
|
27
|
-
cause: Error0Input['cause'];
|
|
28
|
-
stack: Error['stack'];
|
|
29
|
-
meta: Meta0.ValueType;
|
|
30
|
-
zodError?: ZodError;
|
|
31
|
-
axiosError?: AxiosError;
|
|
32
|
-
}
|
|
33
|
-
type HttpStatusCodeString = keyof typeof HttpStatusCode;
|
|
34
|
-
type Error0Cause = Error | Error0 | unknown;
|
|
35
|
-
type ExpectedFn = (error: Error0GeneralProps) => boolean | undefined;
|
|
36
6
|
declare class Error0 extends Error {
|
|
37
7
|
readonly __I_AM_ERROR_0: true;
|
|
38
|
-
readonly tag?:
|
|
39
|
-
readonly code?:
|
|
40
|
-
readonly httpStatus?:
|
|
41
|
-
readonly expected?:
|
|
42
|
-
readonly clientMessage?:
|
|
43
|
-
readonly anyMessage?:
|
|
44
|
-
readonly cause?:
|
|
8
|
+
readonly tag?: Error0.GeneralProps['tag'];
|
|
9
|
+
readonly code?: Error0.GeneralProps['code'];
|
|
10
|
+
readonly httpStatus?: Error0.GeneralProps['httpStatus'];
|
|
11
|
+
readonly expected?: Error0.GeneralProps['expected'];
|
|
12
|
+
readonly clientMessage?: Error0.GeneralProps['clientMessage'];
|
|
13
|
+
readonly anyMessage?: Error0.GeneralProps['anyMessage'];
|
|
14
|
+
readonly cause?: Error0.GeneralProps['cause'];
|
|
45
15
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
46
|
-
readonly zodError?:
|
|
47
|
-
readonly axiosError?:
|
|
16
|
+
readonly zodError?: Error0.GeneralProps['zodError'];
|
|
17
|
+
readonly axiosError?: Error0.GeneralProps['axiosError'];
|
|
48
18
|
static defaultMessage: string;
|
|
49
|
-
static defaultCode?:
|
|
50
|
-
static defaultHttpStatus?:
|
|
51
|
-
static defaultExpected?:
|
|
52
|
-
static defaultClientMessage?:
|
|
19
|
+
static defaultCode?: Error0.GeneralProps['code'];
|
|
20
|
+
static defaultHttpStatus?: Error0.GeneralProps['httpStatus'];
|
|
21
|
+
static defaultExpected?: Error0.GeneralProps['expected'];
|
|
22
|
+
static defaultClientMessage?: Error0.GeneralProps['clientMessage'];
|
|
53
23
|
static defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
54
|
-
readonly propsOriginal:
|
|
24
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
55
25
|
constructor(message: string);
|
|
56
|
-
constructor(input:
|
|
57
|
-
constructor(message: string, input:
|
|
26
|
+
constructor(input: Error0.Input);
|
|
27
|
+
constructor(message: string, input: Error0.Input);
|
|
58
28
|
constructor(error: Error);
|
|
59
|
-
constructor(error: Error, input:
|
|
29
|
+
constructor(error: Error, input: Error0.Input);
|
|
60
30
|
constructor(value: unknown);
|
|
61
|
-
constructor(value: unknown, input:
|
|
31
|
+
constructor(value: unknown, input: Error0.Input);
|
|
62
32
|
static defaultMaxLevel: number;
|
|
63
|
-
static _safeParseInput(error0Input: Record<string, unknown>):
|
|
33
|
+
static _safeParseInput(error0Input: Record<string, unknown>): Error0.Input;
|
|
64
34
|
static _getSelfGeneralProps({ error0Input, message, stack, }: {
|
|
65
|
-
error0Input:
|
|
35
|
+
error0Input: Error0.Input;
|
|
66
36
|
message: string;
|
|
67
|
-
stack:
|
|
68
|
-
}):
|
|
69
|
-
static _getSelfPropsFloated(causesProps:
|
|
70
|
-
static _getExtraError0PropsByZodError(zodError: ZodError): Partial<
|
|
71
|
-
static _getExtraError0PropsByAxiosError(axiosError: AxiosError): Partial<
|
|
72
|
-
static _assignError0Props(error0Props:
|
|
73
|
-
static _normalizeSelfExpected(error0Props:
|
|
74
|
-
static _isExpected(causesProps:
|
|
75
|
-
static _getPropsFromUnknown(error: unknown, defaults?:
|
|
76
|
-
static _getCausesPropsFromUnknown(error: unknown, maxLevel: number):
|
|
77
|
-
static _getCausesPropsFromError0Props(error0Props:
|
|
78
|
-
static _getClosestPropValue<TPropKey extends keyof
|
|
79
|
-
static _getFilledPropValues<TPropKey extends keyof
|
|
80
|
-
static _getMergedMetaValue(causesProps:
|
|
81
|
-
static _removeConstructorStackPart(stack:
|
|
82
|
-
static _mergeStack(prevStack:
|
|
37
|
+
stack: Error0.GeneralProps['stack'];
|
|
38
|
+
}): Error0.GeneralProps;
|
|
39
|
+
static _getSelfPropsFloated(causesProps: Error0.GeneralProps[]): Error0.GeneralProps;
|
|
40
|
+
static _getExtraError0PropsByZodError(zodError: ZodError): Partial<Error0.GeneralProps>;
|
|
41
|
+
static _getExtraError0PropsByAxiosError(axiosError: AxiosError): Partial<Error0.GeneralProps>;
|
|
42
|
+
static _assignError0Props(error0Props: Error0.GeneralProps, extraError0Props: Partial<Error0.GeneralProps>): void;
|
|
43
|
+
static _normalizeSelfExpected(error0Props: Error0.GeneralProps, expectedProvided: Error0.Input['expected']): boolean | undefined;
|
|
44
|
+
static _isExpected(causesProps: Error0.GeneralProps[]): boolean;
|
|
45
|
+
static _getPropsFromUnknown(error: unknown, defaults?: Error0.Input): Error0.GeneralProps;
|
|
46
|
+
static _getCausesPropsFromUnknown(error: unknown, maxLevel: number): Error0.GeneralProps[];
|
|
47
|
+
static _getCausesPropsFromError0Props(error0Props: Error0.GeneralProps, maxLevel: number): Error0.GeneralProps[];
|
|
48
|
+
static _getClosestPropValue<TPropKey extends keyof Error0.GeneralProps>(causesProps: Error0.GeneralProps[], propKey: TPropKey): NonNullable<Error0.GeneralProps[TPropKey]> | undefined;
|
|
49
|
+
static _getFilledPropValues<TPropKey extends keyof Error0.Input>(causesProps: Error0.GeneralProps[], propKey: TPropKey): NonNullable<Error0.GeneralProps[TPropKey]>[];
|
|
50
|
+
static _getMergedMetaValue(causesProps: Error0.GeneralProps[]): Meta0.ValueType;
|
|
51
|
+
static _removeConstructorStackPart(stack: Error0.GeneralProps['stack']): Error0.GeneralProps['stack'];
|
|
52
|
+
static _mergeStack(prevStack: Error0.GeneralProps['stack'], nextStack: Error0.GeneralProps['stack']): Error0.GeneralProps['stack'];
|
|
83
53
|
static isError0(error: unknown): error is Error0;
|
|
84
54
|
static isLikelyError0(error: unknown): error is Error0;
|
|
85
|
-
static _toError0(error: unknown, inputOverride?:
|
|
86
|
-
static from(error: unknown, inputOverride?:
|
|
55
|
+
static _toError0(error: unknown, inputOverride?: Error0.Input): Error0;
|
|
56
|
+
static from(error: unknown, inputOverride?: Error0.Input): Error0;
|
|
87
57
|
static extend(props: {
|
|
88
|
-
defaultMessage?:
|
|
89
|
-
defaultCode?:
|
|
90
|
-
defaultHttpStatus?:
|
|
91
|
-
defaultExpected?:
|
|
92
|
-
defaultClientMessage?:
|
|
58
|
+
defaultMessage?: Error0.GeneralProps['message'];
|
|
59
|
+
defaultCode?: Error0.GeneralProps['code'];
|
|
60
|
+
defaultHttpStatus?: Error0.GeneralProps['httpStatus'];
|
|
61
|
+
defaultExpected?: Error0.GeneralProps['expected'];
|
|
62
|
+
defaultClientMessage?: Error0.GeneralProps['clientMessage'];
|
|
93
63
|
defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
94
64
|
}): {
|
|
95
65
|
new (message: string): {
|
|
96
66
|
readonly __I_AM_ERROR_0: true;
|
|
97
|
-
readonly tag?:
|
|
98
|
-
readonly code?:
|
|
99
|
-
readonly httpStatus?:
|
|
100
|
-
readonly expected?:
|
|
101
|
-
readonly clientMessage?:
|
|
102
|
-
readonly anyMessage?:
|
|
103
|
-
readonly cause?:
|
|
67
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
68
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
69
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
70
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
71
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
72
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
73
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
104
74
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
105
|
-
readonly zodError?:
|
|
106
|
-
readonly axiosError?:
|
|
107
|
-
readonly propsOriginal:
|
|
75
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
76
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
77
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
108
78
|
toJSON(): {
|
|
109
79
|
message: string;
|
|
110
80
|
tag: string | undefined;
|
|
@@ -123,19 +93,19 @@ declare class Error0 extends Error {
|
|
|
123
93
|
message: string;
|
|
124
94
|
stack?: string;
|
|
125
95
|
};
|
|
126
|
-
new (input:
|
|
96
|
+
new (input: Error0.Input): {
|
|
127
97
|
readonly __I_AM_ERROR_0: true;
|
|
128
|
-
readonly tag?:
|
|
129
|
-
readonly code?:
|
|
130
|
-
readonly httpStatus?:
|
|
131
|
-
readonly expected?:
|
|
132
|
-
readonly clientMessage?:
|
|
133
|
-
readonly anyMessage?:
|
|
134
|
-
readonly cause?:
|
|
98
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
99
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
100
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
101
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
102
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
103
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
104
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
135
105
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
136
|
-
readonly zodError?:
|
|
137
|
-
readonly axiosError?:
|
|
138
|
-
readonly propsOriginal:
|
|
106
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
107
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
108
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
139
109
|
toJSON(): {
|
|
140
110
|
message: string;
|
|
141
111
|
tag: string | undefined;
|
|
@@ -154,19 +124,19 @@ declare class Error0 extends Error {
|
|
|
154
124
|
message: string;
|
|
155
125
|
stack?: string;
|
|
156
126
|
};
|
|
157
|
-
new (message: string, input:
|
|
127
|
+
new (message: string, input: Error0.Input): {
|
|
158
128
|
readonly __I_AM_ERROR_0: true;
|
|
159
|
-
readonly tag?:
|
|
160
|
-
readonly code?:
|
|
161
|
-
readonly httpStatus?:
|
|
162
|
-
readonly expected?:
|
|
163
|
-
readonly clientMessage?:
|
|
164
|
-
readonly anyMessage?:
|
|
165
|
-
readonly cause?:
|
|
129
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
130
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
131
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
132
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
133
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
134
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
135
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
166
136
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
167
|
-
readonly zodError?:
|
|
168
|
-
readonly axiosError?:
|
|
169
|
-
readonly propsOriginal:
|
|
137
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
138
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
139
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
170
140
|
toJSON(): {
|
|
171
141
|
message: string;
|
|
172
142
|
tag: string | undefined;
|
|
@@ -187,17 +157,17 @@ declare class Error0 extends Error {
|
|
|
187
157
|
};
|
|
188
158
|
new (error: Error): {
|
|
189
159
|
readonly __I_AM_ERROR_0: true;
|
|
190
|
-
readonly tag?:
|
|
191
|
-
readonly code?:
|
|
192
|
-
readonly httpStatus?:
|
|
193
|
-
readonly expected?:
|
|
194
|
-
readonly clientMessage?:
|
|
195
|
-
readonly anyMessage?:
|
|
196
|
-
readonly cause?:
|
|
160
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
161
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
162
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
163
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
164
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
165
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
166
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
197
167
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
198
|
-
readonly zodError?:
|
|
199
|
-
readonly axiosError?:
|
|
200
|
-
readonly propsOriginal:
|
|
168
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
169
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
170
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
201
171
|
toJSON(): {
|
|
202
172
|
message: string;
|
|
203
173
|
tag: string | undefined;
|
|
@@ -216,19 +186,19 @@ declare class Error0 extends Error {
|
|
|
216
186
|
message: string;
|
|
217
187
|
stack?: string;
|
|
218
188
|
};
|
|
219
|
-
new (error: Error, input:
|
|
189
|
+
new (error: Error, input: Error0.Input): {
|
|
220
190
|
readonly __I_AM_ERROR_0: true;
|
|
221
|
-
readonly tag?:
|
|
222
|
-
readonly code?:
|
|
223
|
-
readonly httpStatus?:
|
|
224
|
-
readonly expected?:
|
|
225
|
-
readonly clientMessage?:
|
|
226
|
-
readonly anyMessage?:
|
|
227
|
-
readonly cause?:
|
|
191
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
192
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
193
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
194
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
195
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
196
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
197
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
228
198
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
229
|
-
readonly zodError?:
|
|
230
|
-
readonly axiosError?:
|
|
231
|
-
readonly propsOriginal:
|
|
199
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
200
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
201
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
232
202
|
toJSON(): {
|
|
233
203
|
message: string;
|
|
234
204
|
tag: string | undefined;
|
|
@@ -249,17 +219,17 @@ declare class Error0 extends Error {
|
|
|
249
219
|
};
|
|
250
220
|
new (value: unknown): {
|
|
251
221
|
readonly __I_AM_ERROR_0: true;
|
|
252
|
-
readonly tag?:
|
|
253
|
-
readonly code?:
|
|
254
|
-
readonly httpStatus?:
|
|
255
|
-
readonly expected?:
|
|
256
|
-
readonly clientMessage?:
|
|
257
|
-
readonly anyMessage?:
|
|
258
|
-
readonly cause?:
|
|
222
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
223
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
224
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
225
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
226
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
227
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
228
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
259
229
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
260
|
-
readonly zodError?:
|
|
261
|
-
readonly axiosError?:
|
|
262
|
-
readonly propsOriginal:
|
|
230
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
231
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
232
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
263
233
|
toJSON(): {
|
|
264
234
|
message: string;
|
|
265
235
|
tag: string | undefined;
|
|
@@ -278,19 +248,19 @@ declare class Error0 extends Error {
|
|
|
278
248
|
message: string;
|
|
279
249
|
stack?: string;
|
|
280
250
|
};
|
|
281
|
-
new (value: unknown, input:
|
|
251
|
+
new (value: unknown, input: Error0.Input): {
|
|
282
252
|
readonly __I_AM_ERROR_0: true;
|
|
283
|
-
readonly tag?:
|
|
284
|
-
readonly code?:
|
|
285
|
-
readonly httpStatus?:
|
|
286
|
-
readonly expected?:
|
|
287
|
-
readonly clientMessage?:
|
|
288
|
-
readonly anyMessage?:
|
|
289
|
-
readonly cause?:
|
|
253
|
+
readonly tag?: Error0.GeneralProps["tag"];
|
|
254
|
+
readonly code?: Error0.GeneralProps["code"];
|
|
255
|
+
readonly httpStatus?: Error0.GeneralProps["httpStatus"];
|
|
256
|
+
readonly expected?: Error0.GeneralProps["expected"];
|
|
257
|
+
readonly clientMessage?: Error0.GeneralProps["clientMessage"];
|
|
258
|
+
readonly anyMessage?: Error0.GeneralProps["anyMessage"];
|
|
259
|
+
readonly cause?: Error0.GeneralProps["cause"];
|
|
290
260
|
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
291
|
-
readonly zodError?:
|
|
292
|
-
readonly axiosError?:
|
|
293
|
-
readonly propsOriginal:
|
|
261
|
+
readonly zodError?: Error0.GeneralProps["zodError"];
|
|
262
|
+
readonly axiosError?: Error0.GeneralProps["axiosError"];
|
|
263
|
+
readonly propsOriginal: Error0.GeneralProps;
|
|
294
264
|
toJSON(): {
|
|
295
265
|
message: string;
|
|
296
266
|
tag: string | undefined;
|
|
@@ -316,47 +286,47 @@ declare class Error0 extends Error {
|
|
|
316
286
|
defaultClientMessage: string | undefined;
|
|
317
287
|
defaultMeta: Meta0;
|
|
318
288
|
defaultMaxLevel: number;
|
|
319
|
-
_safeParseInput(error0Input: Record<string, unknown>):
|
|
289
|
+
_safeParseInput(error0Input: Record<string, unknown>): Error0.Input;
|
|
320
290
|
_getSelfGeneralProps({ error0Input, message, stack, }: {
|
|
321
|
-
error0Input:
|
|
291
|
+
error0Input: Error0.Input;
|
|
322
292
|
message: string;
|
|
323
|
-
stack:
|
|
324
|
-
}):
|
|
325
|
-
_getSelfPropsFloated(causesProps:
|
|
326
|
-
_getExtraError0PropsByZodError(zodError: ZodError): Partial<
|
|
327
|
-
_getExtraError0PropsByAxiosError(axiosError: AxiosError): Partial<
|
|
328
|
-
_assignError0Props(error0Props:
|
|
329
|
-
_normalizeSelfExpected(error0Props:
|
|
330
|
-
_isExpected(causesProps:
|
|
331
|
-
_getPropsFromUnknown(error: unknown, defaults?:
|
|
332
|
-
_getCausesPropsFromUnknown(error: unknown, maxLevel: number):
|
|
333
|
-
_getCausesPropsFromError0Props(error0Props:
|
|
334
|
-
_getClosestPropValue<TPropKey extends keyof
|
|
335
|
-
_getFilledPropValues<TPropKey extends keyof
|
|
336
|
-
_getMergedMetaValue(causesProps:
|
|
337
|
-
_removeConstructorStackPart(stack:
|
|
338
|
-
_mergeStack(prevStack:
|
|
293
|
+
stack: Error0.GeneralProps["stack"];
|
|
294
|
+
}): Error0.GeneralProps;
|
|
295
|
+
_getSelfPropsFloated(causesProps: Error0.GeneralProps[]): Error0.GeneralProps;
|
|
296
|
+
_getExtraError0PropsByZodError(zodError: ZodError): Partial<Error0.GeneralProps>;
|
|
297
|
+
_getExtraError0PropsByAxiosError(axiosError: AxiosError): Partial<Error0.GeneralProps>;
|
|
298
|
+
_assignError0Props(error0Props: Error0.GeneralProps, extraError0Props: Partial<Error0.GeneralProps>): void;
|
|
299
|
+
_normalizeSelfExpected(error0Props: Error0.GeneralProps, expectedProvided: Error0.Input["expected"]): boolean | undefined;
|
|
300
|
+
_isExpected(causesProps: Error0.GeneralProps[]): boolean;
|
|
301
|
+
_getPropsFromUnknown(error: unknown, defaults?: Error0.Input): Error0.GeneralProps;
|
|
302
|
+
_getCausesPropsFromUnknown(error: unknown, maxLevel: number): Error0.GeneralProps[];
|
|
303
|
+
_getCausesPropsFromError0Props(error0Props: Error0.GeneralProps, maxLevel: number): Error0.GeneralProps[];
|
|
304
|
+
_getClosestPropValue<TPropKey extends keyof Error0.GeneralProps>(causesProps: Error0.GeneralProps[], propKey: TPropKey): NonNullable<Error0.GeneralProps[TPropKey]> | undefined;
|
|
305
|
+
_getFilledPropValues<TPropKey extends keyof Error0.Input>(causesProps: Error0.GeneralProps[], propKey: TPropKey): NonNullable<Error0.GeneralProps[TPropKey]>[];
|
|
306
|
+
_getMergedMetaValue(causesProps: Error0.GeneralProps[]): Meta0.ValueType;
|
|
307
|
+
_removeConstructorStackPart(stack: Error0.GeneralProps["stack"]): Error0.GeneralProps["stack"];
|
|
308
|
+
_mergeStack(prevStack: Error0.GeneralProps["stack"], nextStack: Error0.GeneralProps["stack"]): Error0.GeneralProps["stack"];
|
|
339
309
|
isError0(error: unknown): error is Error0;
|
|
340
310
|
isLikelyError0(error: unknown): error is Error0;
|
|
341
|
-
_toError0(error: unknown, inputOverride?:
|
|
342
|
-
from(error: unknown, inputOverride?:
|
|
311
|
+
_toError0(error: unknown, inputOverride?: Error0.Input): Error0;
|
|
312
|
+
from(error: unknown, inputOverride?: Error0.Input): Error0;
|
|
343
313
|
extend(props: {
|
|
344
|
-
defaultMessage?:
|
|
345
|
-
defaultCode?:
|
|
346
|
-
defaultHttpStatus?:
|
|
347
|
-
defaultExpected?:
|
|
348
|
-
defaultClientMessage?:
|
|
314
|
+
defaultMessage?: Error0.GeneralProps["message"];
|
|
315
|
+
defaultCode?: Error0.GeneralProps["code"];
|
|
316
|
+
defaultHttpStatus?: Error0.GeneralProps["httpStatus"];
|
|
317
|
+
defaultExpected?: Error0.GeneralProps["expected"];
|
|
318
|
+
defaultClientMessage?: Error0.GeneralProps["clientMessage"];
|
|
349
319
|
defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
350
320
|
}): /*elided*/ any;
|
|
351
321
|
extendCollection<T extends Record<string, typeof Error0>>(classes: T, props: {
|
|
352
|
-
defaultMessage?:
|
|
353
|
-
defaultCode?:
|
|
354
|
-
defaultHttpStatus?:
|
|
355
|
-
defaultExpected?:
|
|
356
|
-
defaultClientMessage?:
|
|
322
|
+
defaultMessage?: Error0.GeneralProps["message"];
|
|
323
|
+
defaultCode?: Error0.GeneralProps["code"];
|
|
324
|
+
defaultHttpStatus?: Error0.GeneralProps["httpStatus"];
|
|
325
|
+
defaultExpected?: Error0.GeneralProps["expected"];
|
|
326
|
+
defaultClientMessage?: Error0.GeneralProps["clientMessage"];
|
|
357
327
|
defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
358
328
|
}): T;
|
|
359
|
-
toJSON(error: unknown, inputOverride?:
|
|
329
|
+
toJSON(error: unknown, inputOverride?: Error0.Input): {
|
|
360
330
|
message: string;
|
|
361
331
|
tag: string | undefined;
|
|
362
332
|
code: string | undefined;
|
|
@@ -374,11 +344,11 @@ declare class Error0 extends Error {
|
|
|
374
344
|
stackTraceLimit: number;
|
|
375
345
|
};
|
|
376
346
|
static extendCollection<T extends Record<string, typeof Error0>>(classes: T, props: {
|
|
377
|
-
defaultMessage?:
|
|
378
|
-
defaultCode?:
|
|
379
|
-
defaultHttpStatus?:
|
|
380
|
-
defaultExpected?:
|
|
381
|
-
defaultClientMessage?:
|
|
347
|
+
defaultMessage?: Error0.GeneralProps['message'];
|
|
348
|
+
defaultCode?: Error0.GeneralProps['code'];
|
|
349
|
+
defaultHttpStatus?: Error0.GeneralProps['httpStatus'];
|
|
350
|
+
defaultExpected?: Error0.GeneralProps['expected'];
|
|
351
|
+
defaultClientMessage?: Error0.GeneralProps['clientMessage'];
|
|
382
352
|
defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
383
353
|
}): T;
|
|
384
354
|
toJSON(): {
|
|
@@ -394,7 +364,7 @@ declare class Error0 extends Error {
|
|
|
394
364
|
stack: string | undefined;
|
|
395
365
|
__I_AM_ERROR_0: true;
|
|
396
366
|
};
|
|
397
|
-
static toJSON(error: unknown, inputOverride?:
|
|
367
|
+
static toJSON(error: unknown, inputOverride?: Error0.Input): {
|
|
398
368
|
message: string;
|
|
399
369
|
tag: string | undefined;
|
|
400
370
|
code: string | undefined;
|
|
@@ -410,293 +380,38 @@ declare class Error0 extends Error {
|
|
|
410
380
|
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
411
381
|
}
|
|
412
382
|
declare namespace Error0 {
|
|
383
|
+
interface Input {
|
|
384
|
+
message?: string;
|
|
385
|
+
tag?: string;
|
|
386
|
+
code?: string;
|
|
387
|
+
httpStatus?: HttpStatusCode | HttpStatusCodeString;
|
|
388
|
+
expected?: boolean | Error0.ExpectedFn;
|
|
389
|
+
clientMessage?: string;
|
|
390
|
+
cause?: Error0Cause;
|
|
391
|
+
stack?: string;
|
|
392
|
+
meta?: Meta0.Meta0OrValueTypeNullish;
|
|
393
|
+
zodError?: ZodError;
|
|
394
|
+
axiosError?: AxiosError;
|
|
395
|
+
}
|
|
396
|
+
interface GeneralProps {
|
|
397
|
+
message: Input['message'];
|
|
398
|
+
tag: Input['tag'];
|
|
399
|
+
code: Input['code'];
|
|
400
|
+
httpStatus: number | undefined;
|
|
401
|
+
expected: boolean | undefined;
|
|
402
|
+
clientMessage: Input['clientMessage'];
|
|
403
|
+
anyMessage: string | undefined;
|
|
404
|
+
cause: Input['cause'];
|
|
405
|
+
stack: Error['stack'];
|
|
406
|
+
meta: Meta0.ValueType;
|
|
407
|
+
zodError?: ZodError;
|
|
408
|
+
axiosError?: AxiosError;
|
|
409
|
+
}
|
|
410
|
+
type HttpStatusCodeString = keyof typeof HttpStatusCode;
|
|
411
|
+
type Error0Cause = Error | Error0 | unknown;
|
|
412
|
+
type ExpectedFn = (error: GeneralProps) => boolean | undefined;
|
|
413
413
|
type JSON = ReturnType<Error0['toJSON']>;
|
|
414
414
|
type Collection = Record<string, typeof Error0>;
|
|
415
415
|
}
|
|
416
|
-
declare const e0s: {
|
|
417
|
-
Default: typeof Error0;
|
|
418
|
-
Expected: {
|
|
419
|
-
new (message: string): {
|
|
420
|
-
readonly __I_AM_ERROR_0: true;
|
|
421
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
422
|
-
readonly code?: Error0GeneralProps["code"];
|
|
423
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
424
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
425
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
426
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
427
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
428
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
429
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
430
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
431
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
432
|
-
toJSON(): {
|
|
433
|
-
message: string;
|
|
434
|
-
tag: string | undefined;
|
|
435
|
-
code: string | undefined;
|
|
436
|
-
httpStatus: number | undefined;
|
|
437
|
-
expected: boolean | undefined;
|
|
438
|
-
clientMessage: string | undefined;
|
|
439
|
-
anyMessage: string | undefined;
|
|
440
|
-
cause: unknown;
|
|
441
|
-
meta: Meta0.ValueType;
|
|
442
|
-
stack: string | undefined;
|
|
443
|
-
__I_AM_ERROR_0: true;
|
|
444
|
-
};
|
|
445
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
446
|
-
name: string;
|
|
447
|
-
message: string;
|
|
448
|
-
stack?: string;
|
|
449
|
-
};
|
|
450
|
-
new (input: Error0Input): {
|
|
451
|
-
readonly __I_AM_ERROR_0: true;
|
|
452
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
453
|
-
readonly code?: Error0GeneralProps["code"];
|
|
454
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
455
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
456
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
457
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
458
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
459
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
460
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
461
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
462
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
463
|
-
toJSON(): {
|
|
464
|
-
message: string;
|
|
465
|
-
tag: string | undefined;
|
|
466
|
-
code: string | undefined;
|
|
467
|
-
httpStatus: number | undefined;
|
|
468
|
-
expected: boolean | undefined;
|
|
469
|
-
clientMessage: string | undefined;
|
|
470
|
-
anyMessage: string | undefined;
|
|
471
|
-
cause: unknown;
|
|
472
|
-
meta: Meta0.ValueType;
|
|
473
|
-
stack: string | undefined;
|
|
474
|
-
__I_AM_ERROR_0: true;
|
|
475
|
-
};
|
|
476
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
477
|
-
name: string;
|
|
478
|
-
message: string;
|
|
479
|
-
stack?: string;
|
|
480
|
-
};
|
|
481
|
-
new (message: string, input: Error0Input): {
|
|
482
|
-
readonly __I_AM_ERROR_0: true;
|
|
483
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
484
|
-
readonly code?: Error0GeneralProps["code"];
|
|
485
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
486
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
487
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
488
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
489
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
490
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
491
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
492
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
493
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
494
|
-
toJSON(): {
|
|
495
|
-
message: string;
|
|
496
|
-
tag: string | undefined;
|
|
497
|
-
code: string | undefined;
|
|
498
|
-
httpStatus: number | undefined;
|
|
499
|
-
expected: boolean | undefined;
|
|
500
|
-
clientMessage: string | undefined;
|
|
501
|
-
anyMessage: string | undefined;
|
|
502
|
-
cause: unknown;
|
|
503
|
-
meta: Meta0.ValueType;
|
|
504
|
-
stack: string | undefined;
|
|
505
|
-
__I_AM_ERROR_0: true;
|
|
506
|
-
};
|
|
507
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
508
|
-
name: string;
|
|
509
|
-
message: string;
|
|
510
|
-
stack?: string;
|
|
511
|
-
};
|
|
512
|
-
new (error: Error): {
|
|
513
|
-
readonly __I_AM_ERROR_0: true;
|
|
514
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
515
|
-
readonly code?: Error0GeneralProps["code"];
|
|
516
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
517
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
518
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
519
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
520
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
521
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
522
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
523
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
524
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
525
|
-
toJSON(): {
|
|
526
|
-
message: string;
|
|
527
|
-
tag: string | undefined;
|
|
528
|
-
code: string | undefined;
|
|
529
|
-
httpStatus: number | undefined;
|
|
530
|
-
expected: boolean | undefined;
|
|
531
|
-
clientMessage: string | undefined;
|
|
532
|
-
anyMessage: string | undefined;
|
|
533
|
-
cause: unknown;
|
|
534
|
-
meta: Meta0.ValueType;
|
|
535
|
-
stack: string | undefined;
|
|
536
|
-
__I_AM_ERROR_0: true;
|
|
537
|
-
};
|
|
538
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
539
|
-
name: string;
|
|
540
|
-
message: string;
|
|
541
|
-
stack?: string;
|
|
542
|
-
};
|
|
543
|
-
new (error: Error, input: Error0Input): {
|
|
544
|
-
readonly __I_AM_ERROR_0: true;
|
|
545
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
546
|
-
readonly code?: Error0GeneralProps["code"];
|
|
547
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
548
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
549
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
550
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
551
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
552
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
553
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
554
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
555
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
556
|
-
toJSON(): {
|
|
557
|
-
message: string;
|
|
558
|
-
tag: string | undefined;
|
|
559
|
-
code: string | undefined;
|
|
560
|
-
httpStatus: number | undefined;
|
|
561
|
-
expected: boolean | undefined;
|
|
562
|
-
clientMessage: string | undefined;
|
|
563
|
-
anyMessage: string | undefined;
|
|
564
|
-
cause: unknown;
|
|
565
|
-
meta: Meta0.ValueType;
|
|
566
|
-
stack: string | undefined;
|
|
567
|
-
__I_AM_ERROR_0: true;
|
|
568
|
-
};
|
|
569
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
570
|
-
name: string;
|
|
571
|
-
message: string;
|
|
572
|
-
stack?: string;
|
|
573
|
-
};
|
|
574
|
-
new (value: unknown): {
|
|
575
|
-
readonly __I_AM_ERROR_0: true;
|
|
576
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
577
|
-
readonly code?: Error0GeneralProps["code"];
|
|
578
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
579
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
580
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
581
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
582
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
583
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
584
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
585
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
586
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
587
|
-
toJSON(): {
|
|
588
|
-
message: string;
|
|
589
|
-
tag: string | undefined;
|
|
590
|
-
code: string | undefined;
|
|
591
|
-
httpStatus: number | undefined;
|
|
592
|
-
expected: boolean | undefined;
|
|
593
|
-
clientMessage: string | undefined;
|
|
594
|
-
anyMessage: string | undefined;
|
|
595
|
-
cause: unknown;
|
|
596
|
-
meta: Meta0.ValueType;
|
|
597
|
-
stack: string | undefined;
|
|
598
|
-
__I_AM_ERROR_0: true;
|
|
599
|
-
};
|
|
600
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
601
|
-
name: string;
|
|
602
|
-
message: string;
|
|
603
|
-
stack?: string;
|
|
604
|
-
};
|
|
605
|
-
new (value: unknown, input: Error0Input): {
|
|
606
|
-
readonly __I_AM_ERROR_0: true;
|
|
607
|
-
readonly tag?: Error0GeneralProps["tag"];
|
|
608
|
-
readonly code?: Error0GeneralProps["code"];
|
|
609
|
-
readonly httpStatus?: Error0GeneralProps["httpStatus"];
|
|
610
|
-
readonly expected?: Error0GeneralProps["expected"];
|
|
611
|
-
readonly clientMessage?: Error0GeneralProps["clientMessage"];
|
|
612
|
-
readonly anyMessage?: Error0GeneralProps["anyMessage"];
|
|
613
|
-
readonly cause?: Error0GeneralProps["cause"];
|
|
614
|
-
readonly meta?: Meta0.Meta0OrValueTypeNullish;
|
|
615
|
-
readonly zodError?: Error0GeneralProps["zodError"];
|
|
616
|
-
readonly axiosError?: Error0GeneralProps["axiosError"];
|
|
617
|
-
readonly propsOriginal: Error0GeneralProps;
|
|
618
|
-
toJSON(): {
|
|
619
|
-
message: string;
|
|
620
|
-
tag: string | undefined;
|
|
621
|
-
code: string | undefined;
|
|
622
|
-
httpStatus: number | undefined;
|
|
623
|
-
expected: boolean | undefined;
|
|
624
|
-
clientMessage: string | undefined;
|
|
625
|
-
anyMessage: string | undefined;
|
|
626
|
-
cause: unknown;
|
|
627
|
-
meta: Meta0.ValueType;
|
|
628
|
-
stack: string | undefined;
|
|
629
|
-
__I_AM_ERROR_0: true;
|
|
630
|
-
};
|
|
631
|
-
toResponse(data?: Record<string, unknown>): undici_types.Response;
|
|
632
|
-
name: string;
|
|
633
|
-
message: string;
|
|
634
|
-
stack?: string;
|
|
635
|
-
};
|
|
636
|
-
defaultMessage: string;
|
|
637
|
-
defaultCode: string | undefined;
|
|
638
|
-
defaultHttpStatus: number | undefined;
|
|
639
|
-
defaultExpected: boolean | undefined;
|
|
640
|
-
defaultClientMessage: string | undefined;
|
|
641
|
-
defaultMeta: Meta0;
|
|
642
|
-
defaultMaxLevel: number;
|
|
643
|
-
_safeParseInput(error0Input: Record<string, unknown>): Error0Input;
|
|
644
|
-
_getSelfGeneralProps({ error0Input, message, stack, }: {
|
|
645
|
-
error0Input: Error0Input;
|
|
646
|
-
message: string;
|
|
647
|
-
stack: Error0GeneralProps["stack"];
|
|
648
|
-
}): Error0GeneralProps;
|
|
649
|
-
_getSelfPropsFloated(causesProps: Error0GeneralProps[]): Error0GeneralProps;
|
|
650
|
-
_getExtraError0PropsByZodError(zodError: ZodError): Partial<Error0GeneralProps>;
|
|
651
|
-
_getExtraError0PropsByAxiosError(axiosError: AxiosError): Partial<Error0GeneralProps>;
|
|
652
|
-
_assignError0Props(error0Props: Error0GeneralProps, extraError0Props: Partial<Error0GeneralProps>): void;
|
|
653
|
-
_normalizeSelfExpected(error0Props: Error0GeneralProps, expectedProvided: Error0Input["expected"]): boolean | undefined;
|
|
654
|
-
_isExpected(causesProps: Error0GeneralProps[]): boolean;
|
|
655
|
-
_getPropsFromUnknown(error: unknown, defaults?: Error0Input): Error0GeneralProps;
|
|
656
|
-
_getCausesPropsFromUnknown(error: unknown, maxLevel: number): Error0GeneralProps[];
|
|
657
|
-
_getCausesPropsFromError0Props(error0Props: Error0GeneralProps, maxLevel: number): Error0GeneralProps[];
|
|
658
|
-
_getClosestPropValue<TPropKey extends keyof Error0GeneralProps>(causesProps: Error0GeneralProps[], propKey: TPropKey): NonNullable<Error0GeneralProps[TPropKey]> | undefined;
|
|
659
|
-
_getFilledPropValues<TPropKey extends keyof Error0Input>(causesProps: Error0GeneralProps[], propKey: TPropKey): NonNullable<Error0GeneralProps[TPropKey]>[];
|
|
660
|
-
_getMergedMetaValue(causesProps: Error0GeneralProps[]): Meta0.ValueType;
|
|
661
|
-
_removeConstructorStackPart(stack: Error0GeneralProps["stack"]): Error0GeneralProps["stack"];
|
|
662
|
-
_mergeStack(prevStack: Error0GeneralProps["stack"], nextStack: Error0GeneralProps["stack"]): Error0GeneralProps["stack"];
|
|
663
|
-
isError0(error: unknown): error is Error0;
|
|
664
|
-
isLikelyError0(error: unknown): error is Error0;
|
|
665
|
-
_toError0(error: unknown, inputOverride?: Error0Input): Error0;
|
|
666
|
-
from(error: unknown, inputOverride?: Error0Input): Error0;
|
|
667
|
-
extend(props: {
|
|
668
|
-
defaultMessage?: Error0GeneralProps["message"];
|
|
669
|
-
defaultCode?: Error0GeneralProps["code"];
|
|
670
|
-
defaultHttpStatus?: Error0GeneralProps["httpStatus"];
|
|
671
|
-
defaultExpected?: Error0GeneralProps["expected"];
|
|
672
|
-
defaultClientMessage?: Error0GeneralProps["clientMessage"];
|
|
673
|
-
defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
674
|
-
}): /*elided*/ any;
|
|
675
|
-
extendCollection<T extends Record<string, typeof Error0>>(classes: T, props: {
|
|
676
|
-
defaultMessage?: Error0GeneralProps["message"];
|
|
677
|
-
defaultCode?: Error0GeneralProps["code"];
|
|
678
|
-
defaultHttpStatus?: Error0GeneralProps["httpStatus"];
|
|
679
|
-
defaultExpected?: Error0GeneralProps["expected"];
|
|
680
|
-
defaultClientMessage?: Error0GeneralProps["clientMessage"];
|
|
681
|
-
defaultMeta?: Meta0.Meta0OrValueTypeNullish;
|
|
682
|
-
}): T;
|
|
683
|
-
toJSON(error: unknown, inputOverride?: Error0Input): {
|
|
684
|
-
message: string;
|
|
685
|
-
tag: string | undefined;
|
|
686
|
-
code: string | undefined;
|
|
687
|
-
httpStatus: number | undefined;
|
|
688
|
-
expected: boolean | undefined;
|
|
689
|
-
clientMessage: string | undefined;
|
|
690
|
-
anyMessage: string | undefined;
|
|
691
|
-
cause: unknown;
|
|
692
|
-
meta: Meta0.ValueType;
|
|
693
|
-
stack: string | undefined;
|
|
694
|
-
__I_AM_ERROR_0: true;
|
|
695
|
-
};
|
|
696
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
697
|
-
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
698
|
-
stackTraceLimit: number;
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
416
|
|
|
702
|
-
export { Error0
|
|
417
|
+
export { Error0 };
|