@dxos/errors 0.8.4-main.dedc0f3 → 0.8.4-main.e99c46d
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/lib/browser/index.mjs +28 -21
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +28 -21
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/base.d.ts +20 -17
- package/dist/types/src/base.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +126 -126
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/base.ts +21 -17
- package/src/errors.test.ts +19 -5
- package/src/errors.ts +6 -6
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { BaseError } from './base';
|
|
2
|
-
declare const
|
|
3
|
-
new (
|
|
4
|
-
#code: "
|
|
2
|
+
declare const ApiError_base: {
|
|
3
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
4
|
+
#code: "API";
|
|
5
5
|
#context: Record<string, unknown>;
|
|
6
|
-
get name(): "
|
|
7
|
-
get
|
|
8
|
-
get
|
|
6
|
+
get name(): "API";
|
|
7
|
+
get message(): string;
|
|
8
|
+
get code(): "API";
|
|
9
|
+
get _tag(): "API";
|
|
9
10
|
get context(): Record<string, unknown>;
|
|
10
|
-
message: string;
|
|
11
11
|
stack?: string;
|
|
12
12
|
cause?: unknown;
|
|
13
13
|
};
|
|
14
|
-
code: "
|
|
14
|
+
code: "API";
|
|
15
15
|
is(error: unknown): error is BaseError;
|
|
16
|
-
wrap(
|
|
17
|
-
#code: "
|
|
16
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
17
|
+
#code: "API";
|
|
18
18
|
#context: Record<string, unknown>;
|
|
19
|
-
get name(): "
|
|
20
|
-
get
|
|
21
|
-
get
|
|
19
|
+
get name(): "API";
|
|
20
|
+
get message(): string;
|
|
21
|
+
get code(): "API";
|
|
22
|
+
get _tag(): "API";
|
|
22
23
|
get context(): Record<string, unknown>;
|
|
23
|
-
message: string;
|
|
24
24
|
stack?: string;
|
|
25
25
|
cause?: unknown;
|
|
26
26
|
};
|
|
27
|
-
extend<Code extends string>(code: Code): {
|
|
28
|
-
new (
|
|
27
|
+
extend<Code extends string = string>(code: Code, message?: string): {
|
|
28
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
29
29
|
#code: Code;
|
|
30
30
|
#context: Record<string, unknown>;
|
|
31
31
|
get name(): Code;
|
|
32
|
+
get message(): string;
|
|
32
33
|
get code(): Code;
|
|
33
34
|
get _tag(): Code;
|
|
34
35
|
get context(): Record<string, unknown>;
|
|
35
|
-
message: string;
|
|
36
36
|
stack?: string;
|
|
37
37
|
cause?: unknown;
|
|
38
38
|
};
|
|
39
39
|
code: Code;
|
|
40
40
|
is(error: unknown): error is BaseError;
|
|
41
|
-
wrap(
|
|
41
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
42
42
|
#code: Code;
|
|
43
43
|
#context: Record<string, unknown>;
|
|
44
44
|
get name(): Code;
|
|
45
|
+
get message(): string;
|
|
45
46
|
get code(): Code;
|
|
46
47
|
get _tag(): Code;
|
|
47
48
|
get context(): Record<string, unknown>;
|
|
48
|
-
message: string;
|
|
49
49
|
stack?: string;
|
|
50
50
|
cause?: unknown;
|
|
51
51
|
};
|
|
52
|
-
extend<Code extends string>(code: Code): /*elided*/ any;
|
|
52
|
+
extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
|
|
53
53
|
isError(error: unknown): error is Error;
|
|
54
54
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
55
55
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -60,59 +60,59 @@ declare const TimeoutError_base: {
|
|
|
60
60
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
61
61
|
stackTraceLimit: number;
|
|
62
62
|
};
|
|
63
|
-
export declare class
|
|
63
|
+
export declare class ApiError extends ApiError_base {
|
|
64
64
|
}
|
|
65
|
-
declare const
|
|
66
|
-
new (
|
|
67
|
-
#code: "
|
|
65
|
+
declare const SystemError_base: {
|
|
66
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
67
|
+
#code: "SYSTEM";
|
|
68
68
|
#context: Record<string, unknown>;
|
|
69
|
-
get name(): "
|
|
70
|
-
get
|
|
71
|
-
get
|
|
69
|
+
get name(): "SYSTEM";
|
|
70
|
+
get message(): string;
|
|
71
|
+
get code(): "SYSTEM";
|
|
72
|
+
get _tag(): "SYSTEM";
|
|
72
73
|
get context(): Record<string, unknown>;
|
|
73
|
-
message: string;
|
|
74
74
|
stack?: string;
|
|
75
75
|
cause?: unknown;
|
|
76
76
|
};
|
|
77
|
-
code: "
|
|
77
|
+
code: "SYSTEM";
|
|
78
78
|
is(error: unknown): error is BaseError;
|
|
79
|
-
wrap(
|
|
80
|
-
#code: "
|
|
79
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
80
|
+
#code: "SYSTEM";
|
|
81
81
|
#context: Record<string, unknown>;
|
|
82
|
-
get name(): "
|
|
83
|
-
get
|
|
84
|
-
get
|
|
82
|
+
get name(): "SYSTEM";
|
|
83
|
+
get message(): string;
|
|
84
|
+
get code(): "SYSTEM";
|
|
85
|
+
get _tag(): "SYSTEM";
|
|
85
86
|
get context(): Record<string, unknown>;
|
|
86
|
-
message: string;
|
|
87
87
|
stack?: string;
|
|
88
88
|
cause?: unknown;
|
|
89
89
|
};
|
|
90
|
-
extend<Code extends string>(code: Code): {
|
|
91
|
-
new (
|
|
90
|
+
extend<Code extends string = string>(code: Code, message?: string): {
|
|
91
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
92
92
|
#code: Code;
|
|
93
93
|
#context: Record<string, unknown>;
|
|
94
94
|
get name(): Code;
|
|
95
|
+
get message(): string;
|
|
95
96
|
get code(): Code;
|
|
96
97
|
get _tag(): Code;
|
|
97
98
|
get context(): Record<string, unknown>;
|
|
98
|
-
message: string;
|
|
99
99
|
stack?: string;
|
|
100
100
|
cause?: unknown;
|
|
101
101
|
};
|
|
102
102
|
code: Code;
|
|
103
103
|
is(error: unknown): error is BaseError;
|
|
104
|
-
wrap(
|
|
104
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
105
105
|
#code: Code;
|
|
106
106
|
#context: Record<string, unknown>;
|
|
107
107
|
get name(): Code;
|
|
108
|
+
get message(): string;
|
|
108
109
|
get code(): Code;
|
|
109
110
|
get _tag(): Code;
|
|
110
111
|
get context(): Record<string, unknown>;
|
|
111
|
-
message: string;
|
|
112
112
|
stack?: string;
|
|
113
113
|
cause?: unknown;
|
|
114
114
|
};
|
|
115
|
-
extend<Code extends string>(code: Code): /*elided*/ any;
|
|
115
|
+
extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
|
|
116
116
|
isError(error: unknown): error is Error;
|
|
117
117
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
118
118
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -123,59 +123,59 @@ declare const AbortedError_base: {
|
|
|
123
123
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
124
124
|
stackTraceLimit: number;
|
|
125
125
|
};
|
|
126
|
-
export declare class
|
|
126
|
+
export declare class SystemError extends SystemError_base {
|
|
127
127
|
}
|
|
128
|
-
declare const
|
|
129
|
-
new (
|
|
130
|
-
#code: "
|
|
128
|
+
declare const InternalError_base: {
|
|
129
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
130
|
+
#code: "INTERNAL";
|
|
131
131
|
#context: Record<string, unknown>;
|
|
132
|
-
get name(): "
|
|
133
|
-
get
|
|
134
|
-
get
|
|
132
|
+
get name(): "INTERNAL";
|
|
133
|
+
get message(): string;
|
|
134
|
+
get code(): "INTERNAL";
|
|
135
|
+
get _tag(): "INTERNAL";
|
|
135
136
|
get context(): Record<string, unknown>;
|
|
136
|
-
message: string;
|
|
137
137
|
stack?: string;
|
|
138
138
|
cause?: unknown;
|
|
139
139
|
};
|
|
140
|
-
code: "
|
|
140
|
+
code: "INTERNAL";
|
|
141
141
|
is(error: unknown): error is BaseError;
|
|
142
|
-
wrap(
|
|
143
|
-
#code: "
|
|
142
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
143
|
+
#code: "INTERNAL";
|
|
144
144
|
#context: Record<string, unknown>;
|
|
145
|
-
get name(): "
|
|
146
|
-
get
|
|
147
|
-
get
|
|
145
|
+
get name(): "INTERNAL";
|
|
146
|
+
get message(): string;
|
|
147
|
+
get code(): "INTERNAL";
|
|
148
|
+
get _tag(): "INTERNAL";
|
|
148
149
|
get context(): Record<string, unknown>;
|
|
149
|
-
message: string;
|
|
150
150
|
stack?: string;
|
|
151
151
|
cause?: unknown;
|
|
152
152
|
};
|
|
153
|
-
extend<Code extends string>(code: Code): {
|
|
154
|
-
new (
|
|
153
|
+
extend<Code extends string = string>(code: Code, message?: string): {
|
|
154
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
155
155
|
#code: Code;
|
|
156
156
|
#context: Record<string, unknown>;
|
|
157
157
|
get name(): Code;
|
|
158
|
+
get message(): string;
|
|
158
159
|
get code(): Code;
|
|
159
160
|
get _tag(): Code;
|
|
160
161
|
get context(): Record<string, unknown>;
|
|
161
|
-
message: string;
|
|
162
162
|
stack?: string;
|
|
163
163
|
cause?: unknown;
|
|
164
164
|
};
|
|
165
165
|
code: Code;
|
|
166
166
|
is(error: unknown): error is BaseError;
|
|
167
|
-
wrap(
|
|
167
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
168
168
|
#code: Code;
|
|
169
169
|
#context: Record<string, unknown>;
|
|
170
170
|
get name(): Code;
|
|
171
|
+
get message(): string;
|
|
171
172
|
get code(): Code;
|
|
172
173
|
get _tag(): Code;
|
|
173
174
|
get context(): Record<string, unknown>;
|
|
174
|
-
message: string;
|
|
175
175
|
stack?: string;
|
|
176
176
|
cause?: unknown;
|
|
177
177
|
};
|
|
178
|
-
extend<Code extends string>(code: Code): /*elided*/ any;
|
|
178
|
+
extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
|
|
179
179
|
isError(error: unknown): error is Error;
|
|
180
180
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
181
181
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -186,59 +186,59 @@ declare const UnimplementedError_base: {
|
|
|
186
186
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
187
187
|
stackTraceLimit: number;
|
|
188
188
|
};
|
|
189
|
-
export declare class
|
|
189
|
+
export declare class InternalError extends InternalError_base {
|
|
190
190
|
}
|
|
191
|
-
declare const
|
|
192
|
-
new (
|
|
193
|
-
#code: "
|
|
191
|
+
declare const TimeoutError_base: {
|
|
192
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
193
|
+
#code: "TIMEOUT";
|
|
194
194
|
#context: Record<string, unknown>;
|
|
195
|
-
get name(): "
|
|
196
|
-
get
|
|
197
|
-
get
|
|
195
|
+
get name(): "TIMEOUT";
|
|
196
|
+
get message(): string;
|
|
197
|
+
get code(): "TIMEOUT";
|
|
198
|
+
get _tag(): "TIMEOUT";
|
|
198
199
|
get context(): Record<string, unknown>;
|
|
199
|
-
message: string;
|
|
200
200
|
stack?: string;
|
|
201
201
|
cause?: unknown;
|
|
202
202
|
};
|
|
203
|
-
code: "
|
|
203
|
+
code: "TIMEOUT";
|
|
204
204
|
is(error: unknown): error is BaseError;
|
|
205
|
-
wrap(
|
|
206
|
-
#code: "
|
|
205
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
206
|
+
#code: "TIMEOUT";
|
|
207
207
|
#context: Record<string, unknown>;
|
|
208
|
-
get name(): "
|
|
209
|
-
get
|
|
210
|
-
get
|
|
208
|
+
get name(): "TIMEOUT";
|
|
209
|
+
get message(): string;
|
|
210
|
+
get code(): "TIMEOUT";
|
|
211
|
+
get _tag(): "TIMEOUT";
|
|
211
212
|
get context(): Record<string, unknown>;
|
|
212
|
-
message: string;
|
|
213
213
|
stack?: string;
|
|
214
214
|
cause?: unknown;
|
|
215
215
|
};
|
|
216
|
-
extend<Code extends string>(code: Code): {
|
|
217
|
-
new (
|
|
216
|
+
extend<Code extends string = string>(code: Code, message?: string): {
|
|
217
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
218
218
|
#code: Code;
|
|
219
219
|
#context: Record<string, unknown>;
|
|
220
220
|
get name(): Code;
|
|
221
|
+
get message(): string;
|
|
221
222
|
get code(): Code;
|
|
222
223
|
get _tag(): Code;
|
|
223
224
|
get context(): Record<string, unknown>;
|
|
224
|
-
message: string;
|
|
225
225
|
stack?: string;
|
|
226
226
|
cause?: unknown;
|
|
227
227
|
};
|
|
228
228
|
code: Code;
|
|
229
229
|
is(error: unknown): error is BaseError;
|
|
230
|
-
wrap(
|
|
230
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
231
231
|
#code: Code;
|
|
232
232
|
#context: Record<string, unknown>;
|
|
233
233
|
get name(): Code;
|
|
234
|
+
get message(): string;
|
|
234
235
|
get code(): Code;
|
|
235
236
|
get _tag(): Code;
|
|
236
237
|
get context(): Record<string, unknown>;
|
|
237
|
-
message: string;
|
|
238
238
|
stack?: string;
|
|
239
239
|
cause?: unknown;
|
|
240
240
|
};
|
|
241
|
-
extend<Code extends string>(code: Code): /*elided*/ any;
|
|
241
|
+
extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
|
|
242
242
|
isError(error: unknown): error is Error;
|
|
243
243
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
244
244
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -249,59 +249,59 @@ declare const ApiError_base: {
|
|
|
249
249
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
250
250
|
stackTraceLimit: number;
|
|
251
251
|
};
|
|
252
|
-
export declare class
|
|
252
|
+
export declare class TimeoutError extends TimeoutError_base {
|
|
253
253
|
}
|
|
254
|
-
declare const
|
|
255
|
-
new (
|
|
256
|
-
#code: "
|
|
254
|
+
declare const AbortedError_base: {
|
|
255
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
256
|
+
#code: "ABORTED";
|
|
257
257
|
#context: Record<string, unknown>;
|
|
258
|
-
get name(): "
|
|
259
|
-
get
|
|
260
|
-
get
|
|
258
|
+
get name(): "ABORTED";
|
|
259
|
+
get message(): string;
|
|
260
|
+
get code(): "ABORTED";
|
|
261
|
+
get _tag(): "ABORTED";
|
|
261
262
|
get context(): Record<string, unknown>;
|
|
262
|
-
message: string;
|
|
263
263
|
stack?: string;
|
|
264
264
|
cause?: unknown;
|
|
265
265
|
};
|
|
266
|
-
code: "
|
|
266
|
+
code: "ABORTED";
|
|
267
267
|
is(error: unknown): error is BaseError;
|
|
268
|
-
wrap(
|
|
269
|
-
#code: "
|
|
268
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
269
|
+
#code: "ABORTED";
|
|
270
270
|
#context: Record<string, unknown>;
|
|
271
|
-
get name(): "
|
|
272
|
-
get
|
|
273
|
-
get
|
|
271
|
+
get name(): "ABORTED";
|
|
272
|
+
get message(): string;
|
|
273
|
+
get code(): "ABORTED";
|
|
274
|
+
get _tag(): "ABORTED";
|
|
274
275
|
get context(): Record<string, unknown>;
|
|
275
|
-
message: string;
|
|
276
276
|
stack?: string;
|
|
277
277
|
cause?: unknown;
|
|
278
278
|
};
|
|
279
|
-
extend<Code extends string>(code: Code): {
|
|
280
|
-
new (
|
|
279
|
+
extend<Code extends string = string>(code: Code, message?: string): {
|
|
280
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
281
281
|
#code: Code;
|
|
282
282
|
#context: Record<string, unknown>;
|
|
283
283
|
get name(): Code;
|
|
284
|
+
get message(): string;
|
|
284
285
|
get code(): Code;
|
|
285
286
|
get _tag(): Code;
|
|
286
287
|
get context(): Record<string, unknown>;
|
|
287
|
-
message: string;
|
|
288
288
|
stack?: string;
|
|
289
289
|
cause?: unknown;
|
|
290
290
|
};
|
|
291
291
|
code: Code;
|
|
292
292
|
is(error: unknown): error is BaseError;
|
|
293
|
-
wrap(
|
|
293
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
294
294
|
#code: Code;
|
|
295
295
|
#context: Record<string, unknown>;
|
|
296
296
|
get name(): Code;
|
|
297
|
+
get message(): string;
|
|
297
298
|
get code(): Code;
|
|
298
299
|
get _tag(): Code;
|
|
299
300
|
get context(): Record<string, unknown>;
|
|
300
|
-
message: string;
|
|
301
301
|
stack?: string;
|
|
302
302
|
cause?: unknown;
|
|
303
303
|
};
|
|
304
|
-
extend<Code extends string>(code: Code): /*elided*/ any;
|
|
304
|
+
extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
|
|
305
305
|
isError(error: unknown): error is Error;
|
|
306
306
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
307
307
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -312,59 +312,59 @@ declare const SystemError_base: {
|
|
|
312
312
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
313
313
|
stackTraceLimit: number;
|
|
314
314
|
};
|
|
315
|
-
export declare class
|
|
315
|
+
export declare class AbortedError extends AbortedError_base {
|
|
316
316
|
}
|
|
317
|
-
declare const
|
|
318
|
-
new (
|
|
319
|
-
#code: "
|
|
317
|
+
declare const NotImplementedError_base: {
|
|
318
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
319
|
+
#code: "NOT_IMPLEMENTED";
|
|
320
320
|
#context: Record<string, unknown>;
|
|
321
|
-
get name(): "
|
|
322
|
-
get
|
|
323
|
-
get
|
|
321
|
+
get name(): "NOT_IMPLEMENTED";
|
|
322
|
+
get message(): string;
|
|
323
|
+
get code(): "NOT_IMPLEMENTED";
|
|
324
|
+
get _tag(): "NOT_IMPLEMENTED";
|
|
324
325
|
get context(): Record<string, unknown>;
|
|
325
|
-
message: string;
|
|
326
326
|
stack?: string;
|
|
327
327
|
cause?: unknown;
|
|
328
328
|
};
|
|
329
|
-
code: "
|
|
329
|
+
code: "NOT_IMPLEMENTED";
|
|
330
330
|
is(error: unknown): error is BaseError;
|
|
331
|
-
wrap(
|
|
332
|
-
#code: "
|
|
331
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
332
|
+
#code: "NOT_IMPLEMENTED";
|
|
333
333
|
#context: Record<string, unknown>;
|
|
334
|
-
get name(): "
|
|
335
|
-
get
|
|
336
|
-
get
|
|
334
|
+
get name(): "NOT_IMPLEMENTED";
|
|
335
|
+
get message(): string;
|
|
336
|
+
get code(): "NOT_IMPLEMENTED";
|
|
337
|
+
get _tag(): "NOT_IMPLEMENTED";
|
|
337
338
|
get context(): Record<string, unknown>;
|
|
338
|
-
message: string;
|
|
339
339
|
stack?: string;
|
|
340
340
|
cause?: unknown;
|
|
341
341
|
};
|
|
342
|
-
extend<Code extends string>(code: Code): {
|
|
343
|
-
new (
|
|
342
|
+
extend<Code extends string = string>(code: Code, message?: string): {
|
|
343
|
+
new (options?: import("./base").BaseErrorOptions): {
|
|
344
344
|
#code: Code;
|
|
345
345
|
#context: Record<string, unknown>;
|
|
346
346
|
get name(): Code;
|
|
347
|
+
get message(): string;
|
|
347
348
|
get code(): Code;
|
|
348
349
|
get _tag(): Code;
|
|
349
350
|
get context(): Record<string, unknown>;
|
|
350
|
-
message: string;
|
|
351
351
|
stack?: string;
|
|
352
352
|
cause?: unknown;
|
|
353
353
|
};
|
|
354
354
|
code: Code;
|
|
355
355
|
is(error: unknown): error is BaseError;
|
|
356
|
-
wrap(
|
|
356
|
+
wrap(options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
357
357
|
#code: Code;
|
|
358
358
|
#context: Record<string, unknown>;
|
|
359
359
|
get name(): Code;
|
|
360
|
+
get message(): string;
|
|
360
361
|
get code(): Code;
|
|
361
362
|
get _tag(): Code;
|
|
362
363
|
get context(): Record<string, unknown>;
|
|
363
|
-
message: string;
|
|
364
364
|
stack?: string;
|
|
365
365
|
cause?: unknown;
|
|
366
366
|
};
|
|
367
|
-
extend<Code extends string>(code: Code): /*elided*/ any;
|
|
367
|
+
extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
|
|
368
368
|
isError(error: unknown): error is Error;
|
|
369
369
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
370
370
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
@@ -375,7 +375,7 @@ declare const InternalError_base: {
|
|
|
375
375
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
376
376
|
stackTraceLimit: number;
|
|
377
377
|
};
|
|
378
|
-
export declare class
|
|
378
|
+
export declare class NotImplementedError extends NotImplementedError_base {
|
|
379
379
|
}
|
|
380
380
|
export {};
|
|
381
381
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;uEAakZ,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;;;AAXnc,qBAAa,QAAS,SAAQ,aAAoC;CAAG;;;;;;;;;;;;;;;uEAWgX,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;;;AATnc,qBAAa,WAAY,SAAQ,gBAA0C;CAAG;;;;;;;;;;;;;;;uEASuW,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;;;AAPnc,qBAAa,aAAc,SAAQ,kBAA8C;CAAG;;;;;;;;;;;;;;;uEAOiW,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;;;AALnc,qBAAa,YAAa,SAAQ,iBAAsC;CAAG;;;;;;;;;;;;;;;uEAK0W,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;;;AAHnc,qBAAa,YAAa,SAAQ,iBAAsC;CAAG;;;;;;;;;;;;;;;uEAG0W,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;2EAAd,cAAc;;;;;;;;;;;;;;;;;;;;;;AADnc,qBAAa,mBAAoB,SAAQ,wBAAsD;CAAG"}
|