@dxos/errors 0.8.4-main.e098934 → 0.8.4-main.ead640a
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/types/src/base.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ export declare class BaseError<Code extends string = string> extends Error {
|
|
|
24
24
|
*/
|
|
25
25
|
static extend<Code extends string = string>(code: Code, message?: string): {
|
|
26
26
|
new (options?: BaseErrorOptions): {
|
|
27
|
-
#code: Code;
|
|
28
|
-
#context: Record<string, unknown>;
|
|
27
|
+
"__#private@#code": Code;
|
|
28
|
+
"__#private@#context": Record<string, unknown>;
|
|
29
29
|
get name(): Code;
|
|
30
30
|
/** Fallback message. */
|
|
31
31
|
get message(): string;
|
|
@@ -38,8 +38,8 @@ export declare class BaseError<Code extends string = string> extends Error {
|
|
|
38
38
|
code: Code;
|
|
39
39
|
is(error: unknown): error is BaseError;
|
|
40
40
|
wrap(options?: Omit<BaseErrorOptions, "cause">): (error: unknown) => {
|
|
41
|
-
#code: Code;
|
|
42
|
-
#context: Record<string, unknown>;
|
|
41
|
+
"__#private@#code": Code;
|
|
42
|
+
"__#private@#context": Record<string, unknown>;
|
|
43
43
|
get name(): Code;
|
|
44
44
|
/** Fallback message. */
|
|
45
45
|
get message(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/base.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAS,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;;IAChE;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM;uBAY9C,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/base.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAS,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;;IAChE;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM;uBAY9C,gBAAgB;;mCAOhC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;YAcjC,wBAAwB;;;;;;;;;kBA7BH,OAAO,GAAG,KAAK,IAAI,SAAS;uBAIvB,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,IAC3C,OAAO,OAAO;;mCAUlB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;YAcjC,wBAAwB;;;;;;;;eAjCV,IAAI,SAAS,MAAM,iBAAiB,IAAI,YAAY,MAAM;;;;;;gBAqB5D,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAQlD,IAAa,IAAI,SAEhB;IAED,wBAAwB;IACxB,IAAa,OAAO,WAEnB;IAED,IAAI,IAAI,IAAI,IAAI,CAEf;IAGD,IAAI,IAAI,IAAI,IAAI,CAEf;IAED,IAAI,OAAO,4BAEV;CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseError } from './base';
|
|
2
2
|
declare const ApiError_base: {
|
|
3
3
|
new (options?: import("./base").BaseErrorOptions): {
|
|
4
|
-
#code: "API";
|
|
5
|
-
#context: Record<string, unknown>;
|
|
4
|
+
"__#private@#code": "API";
|
|
5
|
+
"__#private@#context": Record<string, unknown>;
|
|
6
6
|
get name(): "API";
|
|
7
7
|
get message(): string;
|
|
8
8
|
get code(): "API";
|
|
@@ -14,8 +14,8 @@ declare const ApiError_base: {
|
|
|
14
14
|
code: "API";
|
|
15
15
|
is(error: unknown): error is BaseError;
|
|
16
16
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
17
|
-
#code: "API";
|
|
18
|
-
#context: Record<string, unknown>;
|
|
17
|
+
"__#private@#code": "API";
|
|
18
|
+
"__#private@#context": Record<string, unknown>;
|
|
19
19
|
get name(): "API";
|
|
20
20
|
get message(): string;
|
|
21
21
|
get code(): "API";
|
|
@@ -26,8 +26,8 @@ declare const ApiError_base: {
|
|
|
26
26
|
};
|
|
27
27
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
28
28
|
new (options?: import("./base").BaseErrorOptions): {
|
|
29
|
-
#code: Code;
|
|
30
|
-
#context: Record<string, unknown>;
|
|
29
|
+
"__#private@#code": Code;
|
|
30
|
+
"__#private@#context": Record<string, unknown>;
|
|
31
31
|
get name(): Code;
|
|
32
32
|
get message(): string;
|
|
33
33
|
get code(): Code;
|
|
@@ -39,8 +39,8 @@ declare const ApiError_base: {
|
|
|
39
39
|
code: Code;
|
|
40
40
|
is(error: unknown): error is BaseError;
|
|
41
41
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
42
|
-
#code: Code;
|
|
43
|
-
#context: Record<string, unknown>;
|
|
42
|
+
"__#private@#code": Code;
|
|
43
|
+
"__#private@#context": Record<string, unknown>;
|
|
44
44
|
get name(): Code;
|
|
45
45
|
get message(): string;
|
|
46
46
|
get code(): Code;
|
|
@@ -64,8 +64,8 @@ export declare class ApiError extends ApiError_base {
|
|
|
64
64
|
}
|
|
65
65
|
declare const SystemError_base: {
|
|
66
66
|
new (options?: import("./base").BaseErrorOptions): {
|
|
67
|
-
#code: "SYSTEM";
|
|
68
|
-
#context: Record<string, unknown>;
|
|
67
|
+
"__#private@#code": "SYSTEM";
|
|
68
|
+
"__#private@#context": Record<string, unknown>;
|
|
69
69
|
get name(): "SYSTEM";
|
|
70
70
|
get message(): string;
|
|
71
71
|
get code(): "SYSTEM";
|
|
@@ -77,8 +77,8 @@ declare const SystemError_base: {
|
|
|
77
77
|
code: "SYSTEM";
|
|
78
78
|
is(error: unknown): error is BaseError;
|
|
79
79
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
80
|
-
#code: "SYSTEM";
|
|
81
|
-
#context: Record<string, unknown>;
|
|
80
|
+
"__#private@#code": "SYSTEM";
|
|
81
|
+
"__#private@#context": Record<string, unknown>;
|
|
82
82
|
get name(): "SYSTEM";
|
|
83
83
|
get message(): string;
|
|
84
84
|
get code(): "SYSTEM";
|
|
@@ -89,8 +89,8 @@ declare const SystemError_base: {
|
|
|
89
89
|
};
|
|
90
90
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
91
91
|
new (options?: import("./base").BaseErrorOptions): {
|
|
92
|
-
#code: Code;
|
|
93
|
-
#context: Record<string, unknown>;
|
|
92
|
+
"__#private@#code": Code;
|
|
93
|
+
"__#private@#context": Record<string, unknown>;
|
|
94
94
|
get name(): Code;
|
|
95
95
|
get message(): string;
|
|
96
96
|
get code(): Code;
|
|
@@ -102,8 +102,8 @@ declare const SystemError_base: {
|
|
|
102
102
|
code: Code;
|
|
103
103
|
is(error: unknown): error is BaseError;
|
|
104
104
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
105
|
-
#code: Code;
|
|
106
|
-
#context: Record<string, unknown>;
|
|
105
|
+
"__#private@#code": Code;
|
|
106
|
+
"__#private@#context": Record<string, unknown>;
|
|
107
107
|
get name(): Code;
|
|
108
108
|
get message(): string;
|
|
109
109
|
get code(): Code;
|
|
@@ -127,8 +127,8 @@ export declare class SystemError extends SystemError_base {
|
|
|
127
127
|
}
|
|
128
128
|
declare const InternalError_base: {
|
|
129
129
|
new (options?: import("./base").BaseErrorOptions): {
|
|
130
|
-
#code: "INTERNAL";
|
|
131
|
-
#context: Record<string, unknown>;
|
|
130
|
+
"__#private@#code": "INTERNAL";
|
|
131
|
+
"__#private@#context": Record<string, unknown>;
|
|
132
132
|
get name(): "INTERNAL";
|
|
133
133
|
get message(): string;
|
|
134
134
|
get code(): "INTERNAL";
|
|
@@ -140,8 +140,8 @@ declare const InternalError_base: {
|
|
|
140
140
|
code: "INTERNAL";
|
|
141
141
|
is(error: unknown): error is BaseError;
|
|
142
142
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
143
|
-
#code: "INTERNAL";
|
|
144
|
-
#context: Record<string, unknown>;
|
|
143
|
+
"__#private@#code": "INTERNAL";
|
|
144
|
+
"__#private@#context": Record<string, unknown>;
|
|
145
145
|
get name(): "INTERNAL";
|
|
146
146
|
get message(): string;
|
|
147
147
|
get code(): "INTERNAL";
|
|
@@ -152,8 +152,8 @@ declare const InternalError_base: {
|
|
|
152
152
|
};
|
|
153
153
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
154
154
|
new (options?: import("./base").BaseErrorOptions): {
|
|
155
|
-
#code: Code;
|
|
156
|
-
#context: Record<string, unknown>;
|
|
155
|
+
"__#private@#code": Code;
|
|
156
|
+
"__#private@#context": Record<string, unknown>;
|
|
157
157
|
get name(): Code;
|
|
158
158
|
get message(): string;
|
|
159
159
|
get code(): Code;
|
|
@@ -165,8 +165,8 @@ declare const InternalError_base: {
|
|
|
165
165
|
code: Code;
|
|
166
166
|
is(error: unknown): error is BaseError;
|
|
167
167
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
168
|
-
#code: Code;
|
|
169
|
-
#context: Record<string, unknown>;
|
|
168
|
+
"__#private@#code": Code;
|
|
169
|
+
"__#private@#context": Record<string, unknown>;
|
|
170
170
|
get name(): Code;
|
|
171
171
|
get message(): string;
|
|
172
172
|
get code(): Code;
|
|
@@ -190,8 +190,8 @@ export declare class InternalError extends InternalError_base {
|
|
|
190
190
|
}
|
|
191
191
|
declare const TimeoutError_base: {
|
|
192
192
|
new (options?: import("./base").BaseErrorOptions): {
|
|
193
|
-
#code: "TIMEOUT";
|
|
194
|
-
#context: Record<string, unknown>;
|
|
193
|
+
"__#private@#code": "TIMEOUT";
|
|
194
|
+
"__#private@#context": Record<string, unknown>;
|
|
195
195
|
get name(): "TIMEOUT";
|
|
196
196
|
get message(): string;
|
|
197
197
|
get code(): "TIMEOUT";
|
|
@@ -203,8 +203,8 @@ declare const TimeoutError_base: {
|
|
|
203
203
|
code: "TIMEOUT";
|
|
204
204
|
is(error: unknown): error is BaseError;
|
|
205
205
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
206
|
-
#code: "TIMEOUT";
|
|
207
|
-
#context: Record<string, unknown>;
|
|
206
|
+
"__#private@#code": "TIMEOUT";
|
|
207
|
+
"__#private@#context": Record<string, unknown>;
|
|
208
208
|
get name(): "TIMEOUT";
|
|
209
209
|
get message(): string;
|
|
210
210
|
get code(): "TIMEOUT";
|
|
@@ -215,8 +215,8 @@ declare const TimeoutError_base: {
|
|
|
215
215
|
};
|
|
216
216
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
217
217
|
new (options?: import("./base").BaseErrorOptions): {
|
|
218
|
-
#code: Code;
|
|
219
|
-
#context: Record<string, unknown>;
|
|
218
|
+
"__#private@#code": Code;
|
|
219
|
+
"__#private@#context": Record<string, unknown>;
|
|
220
220
|
get name(): Code;
|
|
221
221
|
get message(): string;
|
|
222
222
|
get code(): Code;
|
|
@@ -228,8 +228,8 @@ declare const TimeoutError_base: {
|
|
|
228
228
|
code: Code;
|
|
229
229
|
is(error: unknown): error is BaseError;
|
|
230
230
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
231
|
-
#code: Code;
|
|
232
|
-
#context: Record<string, unknown>;
|
|
231
|
+
"__#private@#code": Code;
|
|
232
|
+
"__#private@#context": Record<string, unknown>;
|
|
233
233
|
get name(): Code;
|
|
234
234
|
get message(): string;
|
|
235
235
|
get code(): Code;
|
|
@@ -253,8 +253,8 @@ export declare class TimeoutError extends TimeoutError_base {
|
|
|
253
253
|
}
|
|
254
254
|
declare const AbortedError_base: {
|
|
255
255
|
new (options?: import("./base").BaseErrorOptions): {
|
|
256
|
-
#code: "ABORTED";
|
|
257
|
-
#context: Record<string, unknown>;
|
|
256
|
+
"__#private@#code": "ABORTED";
|
|
257
|
+
"__#private@#context": Record<string, unknown>;
|
|
258
258
|
get name(): "ABORTED";
|
|
259
259
|
get message(): string;
|
|
260
260
|
get code(): "ABORTED";
|
|
@@ -266,8 +266,8 @@ declare const AbortedError_base: {
|
|
|
266
266
|
code: "ABORTED";
|
|
267
267
|
is(error: unknown): error is BaseError;
|
|
268
268
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
269
|
-
#code: "ABORTED";
|
|
270
|
-
#context: Record<string, unknown>;
|
|
269
|
+
"__#private@#code": "ABORTED";
|
|
270
|
+
"__#private@#context": Record<string, unknown>;
|
|
271
271
|
get name(): "ABORTED";
|
|
272
272
|
get message(): string;
|
|
273
273
|
get code(): "ABORTED";
|
|
@@ -278,8 +278,8 @@ declare const AbortedError_base: {
|
|
|
278
278
|
};
|
|
279
279
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
280
280
|
new (options?: import("./base").BaseErrorOptions): {
|
|
281
|
-
#code: Code;
|
|
282
|
-
#context: Record<string, unknown>;
|
|
281
|
+
"__#private@#code": Code;
|
|
282
|
+
"__#private@#context": Record<string, unknown>;
|
|
283
283
|
get name(): Code;
|
|
284
284
|
get message(): string;
|
|
285
285
|
get code(): Code;
|
|
@@ -291,8 +291,8 @@ declare const AbortedError_base: {
|
|
|
291
291
|
code: Code;
|
|
292
292
|
is(error: unknown): error is BaseError;
|
|
293
293
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
294
|
-
#code: Code;
|
|
295
|
-
#context: Record<string, unknown>;
|
|
294
|
+
"__#private@#code": Code;
|
|
295
|
+
"__#private@#context": Record<string, unknown>;
|
|
296
296
|
get name(): Code;
|
|
297
297
|
get message(): string;
|
|
298
298
|
get code(): Code;
|
|
@@ -316,8 +316,8 @@ export declare class AbortedError extends AbortedError_base {
|
|
|
316
316
|
}
|
|
317
317
|
declare const NotImplementedError_base: {
|
|
318
318
|
new (options?: import("./base").BaseErrorOptions): {
|
|
319
|
-
#code: "NOT_IMPLEMENTED";
|
|
320
|
-
#context: Record<string, unknown>;
|
|
319
|
+
"__#private@#code": "NOT_IMPLEMENTED";
|
|
320
|
+
"__#private@#context": Record<string, unknown>;
|
|
321
321
|
get name(): "NOT_IMPLEMENTED";
|
|
322
322
|
get message(): string;
|
|
323
323
|
get code(): "NOT_IMPLEMENTED";
|
|
@@ -329,8 +329,8 @@ declare const NotImplementedError_base: {
|
|
|
329
329
|
code: "NOT_IMPLEMENTED";
|
|
330
330
|
is(error: unknown): error is BaseError;
|
|
331
331
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
332
|
-
#code: "NOT_IMPLEMENTED";
|
|
333
|
-
#context: Record<string, unknown>;
|
|
332
|
+
"__#private@#code": "NOT_IMPLEMENTED";
|
|
333
|
+
"__#private@#context": Record<string, unknown>;
|
|
334
334
|
get name(): "NOT_IMPLEMENTED";
|
|
335
335
|
get message(): string;
|
|
336
336
|
get code(): "NOT_IMPLEMENTED";
|
|
@@ -341,8 +341,8 @@ declare const NotImplementedError_base: {
|
|
|
341
341
|
};
|
|
342
342
|
extend<Code extends string = string>(code: Code, message?: string): {
|
|
343
343
|
new (options?: import("./base").BaseErrorOptions): {
|
|
344
|
-
#code: Code;
|
|
345
|
-
#context: Record<string, unknown>;
|
|
344
|
+
"__#private@#code": Code;
|
|
345
|
+
"__#private@#context": Record<string, unknown>;
|
|
346
346
|
get name(): Code;
|
|
347
347
|
get message(): string;
|
|
348
348
|
get code(): Code;
|
|
@@ -354,8 +354,8 @@ declare const NotImplementedError_base: {
|
|
|
354
354
|
code: Code;
|
|
355
355
|
is(error: unknown): error is BaseError;
|
|
356
356
|
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
357
|
-
#code: Code;
|
|
358
|
-
#context: Record<string, unknown>;
|
|
357
|
+
"__#private@#code": Code;
|
|
358
|
+
"__#private@#context": Record<string, unknown>;
|
|
359
359
|
get name(): Code;
|
|
360
360
|
get message(): string;
|
|
361
361
|
get code(): Code;
|