@dxos/errors 0.8.4-main.3a94e84 → 0.8.4-main.3c1ae3b

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.
@@ -1,369 +1,416 @@
1
1
  import { BaseError } from './base';
2
- declare const TimeoutError_base: {
3
- new (message: string, options?: import("./base").BaseErrorOptions): {
4
- "__#1@#code": "TIMEOUT";
5
- "__#1@#context": Record<string, unknown>;
6
- readonly name: "TIMEOUT";
7
- readonly code: "TIMEOUT";
8
- readonly _tag: "TIMEOUT";
9
- readonly context: Record<string, unknown>;
10
- message: string;
2
+ declare const ApiError_base: {
3
+ new (options?: import("./base").BaseErrorOptions): {
4
+ code: "API";
5
+ context: Record<string, unknown>;
6
+ get name(): "API";
7
+ get message(): string;
8
+ get _tag(): "API";
11
9
  stack?: string;
12
10
  cause?: unknown;
13
11
  };
14
- code: "TIMEOUT";
12
+ code: "API";
15
13
  is(error: unknown): error is BaseError;
16
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
17
- "__#1@#code": "TIMEOUT";
18
- "__#1@#context": Record<string, unknown>;
19
- readonly name: "TIMEOUT";
20
- readonly code: "TIMEOUT";
21
- readonly _tag: "TIMEOUT";
22
- readonly context: Record<string, unknown>;
23
- message: string;
14
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
15
+ ifTypeDiffers?: boolean;
16
+ }) | undefined): (error: unknown) => {
17
+ code: "API";
18
+ context: Record<string, unknown>;
19
+ get name(): "API";
20
+ get message(): string;
21
+ get _tag(): "API";
24
22
  stack?: string;
25
23
  cause?: unknown;
26
24
  };
27
- extend<Code extends string>(code: Code): {
28
- new (message: string, options?: import("./base").BaseErrorOptions): {
29
- "__#1@#code": Code;
30
- "__#1@#context": Record<string, unknown>;
31
- readonly name: Code;
32
- readonly code: Code;
33
- readonly _tag: Code;
34
- readonly context: Record<string, unknown>;
35
- message: string;
25
+ extend<Code extends string = string>(code: Code, message?: string): {
26
+ new (options?: import("./base").BaseErrorOptions): {
27
+ code: Code;
28
+ context: Record<string, unknown>;
29
+ get name(): Code;
30
+ get message(): string;
31
+ get _tag(): Code;
36
32
  stack?: string;
37
33
  cause?: unknown;
38
34
  };
39
35
  code: Code;
40
36
  is(error: unknown): error is BaseError;
41
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
42
- "__#1@#code": Code;
43
- "__#1@#context": Record<string, unknown>;
44
- readonly name: Code;
45
- readonly code: Code;
46
- readonly _tag: Code;
47
- readonly context: Record<string, unknown>;
48
- message: string;
37
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
38
+ ifTypeDiffers?: boolean;
39
+ }): (error: unknown) => {
40
+ code: Code;
41
+ context: Record<string, unknown>;
42
+ get name(): Code;
43
+ get message(): string;
44
+ get _tag(): Code;
49
45
  stack?: string;
50
46
  cause?: unknown;
51
47
  };
52
- extend<Code extends string>(code: Code): /*elided*/ any;
48
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
49
+ isError(error: unknown): error is Error;
53
50
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
54
51
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
55
52
  stackTraceLimit: number;
56
53
  };
54
+ isError(error: unknown): error is Error;
57
55
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
58
56
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
59
57
  stackTraceLimit: number;
60
58
  };
61
- export declare class TimeoutError extends TimeoutError_base {
59
+ export declare class ApiError extends ApiError_base {
62
60
  }
63
- declare const AbortedError_base: {
64
- new (message: string, options?: import("./base").BaseErrorOptions): {
65
- "__#1@#code": "ABORTED";
66
- "__#1@#context": Record<string, unknown>;
67
- readonly name: "ABORTED";
68
- readonly code: "ABORTED";
69
- readonly _tag: "ABORTED";
70
- readonly context: Record<string, unknown>;
71
- message: string;
61
+ declare const SystemError_base: {
62
+ new (options?: import("./base").BaseErrorOptions): {
63
+ code: "SYSTEM";
64
+ context: Record<string, unknown>;
65
+ get name(): "SYSTEM";
66
+ get message(): string;
67
+ get _tag(): "SYSTEM";
72
68
  stack?: string;
73
69
  cause?: unknown;
74
70
  };
75
- code: "ABORTED";
71
+ code: "SYSTEM";
76
72
  is(error: unknown): error is BaseError;
77
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
78
- "__#1@#code": "ABORTED";
79
- "__#1@#context": Record<string, unknown>;
80
- readonly name: "ABORTED";
81
- readonly code: "ABORTED";
82
- readonly _tag: "ABORTED";
83
- readonly context: Record<string, unknown>;
84
- message: string;
73
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
74
+ ifTypeDiffers?: boolean;
75
+ }) | undefined): (error: unknown) => {
76
+ code: "SYSTEM";
77
+ context: Record<string, unknown>;
78
+ get name(): "SYSTEM";
79
+ get message(): string;
80
+ get _tag(): "SYSTEM";
85
81
  stack?: string;
86
82
  cause?: unknown;
87
83
  };
88
- extend<Code extends string>(code: Code): {
89
- new (message: string, options?: import("./base").BaseErrorOptions): {
90
- "__#1@#code": Code;
91
- "__#1@#context": Record<string, unknown>;
92
- readonly name: Code;
93
- readonly code: Code;
94
- readonly _tag: Code;
95
- readonly context: Record<string, unknown>;
96
- message: string;
84
+ extend<Code extends string = string>(code: Code, message?: string): {
85
+ new (options?: import("./base").BaseErrorOptions): {
86
+ code: Code;
87
+ context: Record<string, unknown>;
88
+ get name(): Code;
89
+ get message(): string;
90
+ get _tag(): Code;
97
91
  stack?: string;
98
92
  cause?: unknown;
99
93
  };
100
94
  code: Code;
101
95
  is(error: unknown): error is BaseError;
102
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
103
- "__#1@#code": Code;
104
- "__#1@#context": Record<string, unknown>;
105
- readonly name: Code;
106
- readonly code: Code;
107
- readonly _tag: Code;
108
- readonly context: Record<string, unknown>;
109
- message: string;
96
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
97
+ ifTypeDiffers?: boolean;
98
+ }): (error: unknown) => {
99
+ code: Code;
100
+ context: Record<string, unknown>;
101
+ get name(): Code;
102
+ get message(): string;
103
+ get _tag(): Code;
110
104
  stack?: string;
111
105
  cause?: unknown;
112
106
  };
113
- extend<Code extends string>(code: Code): /*elided*/ any;
107
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
108
+ isError(error: unknown): error is Error;
114
109
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
115
110
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
116
111
  stackTraceLimit: number;
117
112
  };
113
+ isError(error: unknown): error is Error;
118
114
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
119
115
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
120
116
  stackTraceLimit: number;
121
117
  };
122
- export declare class AbortedError extends AbortedError_base {
118
+ export declare class SystemError extends SystemError_base {
123
119
  }
124
- declare const UnimplementedError_base: {
125
- new (message: string, options?: import("./base").BaseErrorOptions): {
126
- "__#1@#code": "UNIMPLEMENTED";
127
- "__#1@#context": Record<string, unknown>;
128
- readonly name: "UNIMPLEMENTED";
129
- readonly code: "UNIMPLEMENTED";
130
- readonly _tag: "UNIMPLEMENTED";
131
- readonly context: Record<string, unknown>;
132
- message: string;
120
+ declare const InternalError_base: {
121
+ new (options?: import("./base").BaseErrorOptions): {
122
+ code: "INTERNAL";
123
+ context: Record<string, unknown>;
124
+ get name(): "INTERNAL";
125
+ get message(): string;
126
+ get _tag(): "INTERNAL";
133
127
  stack?: string;
134
128
  cause?: unknown;
135
129
  };
136
- code: "UNIMPLEMENTED";
130
+ code: "INTERNAL";
137
131
  is(error: unknown): error is BaseError;
138
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
139
- "__#1@#code": "UNIMPLEMENTED";
140
- "__#1@#context": Record<string, unknown>;
141
- readonly name: "UNIMPLEMENTED";
142
- readonly code: "UNIMPLEMENTED";
143
- readonly _tag: "UNIMPLEMENTED";
144
- readonly context: Record<string, unknown>;
145
- message: string;
132
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
133
+ ifTypeDiffers?: boolean;
134
+ }) | undefined): (error: unknown) => {
135
+ code: "INTERNAL";
136
+ context: Record<string, unknown>;
137
+ get name(): "INTERNAL";
138
+ get message(): string;
139
+ get _tag(): "INTERNAL";
146
140
  stack?: string;
147
141
  cause?: unknown;
148
142
  };
149
- extend<Code extends string>(code: Code): {
150
- new (message: string, options?: import("./base").BaseErrorOptions): {
151
- "__#1@#code": Code;
152
- "__#1@#context": Record<string, unknown>;
153
- readonly name: Code;
154
- readonly code: Code;
155
- readonly _tag: Code;
156
- readonly context: Record<string, unknown>;
157
- message: string;
143
+ extend<Code extends string = string>(code: Code, message?: string): {
144
+ new (options?: import("./base").BaseErrorOptions): {
145
+ code: Code;
146
+ context: Record<string, unknown>;
147
+ get name(): Code;
148
+ get message(): string;
149
+ get _tag(): Code;
158
150
  stack?: string;
159
151
  cause?: unknown;
160
152
  };
161
153
  code: Code;
162
154
  is(error: unknown): error is BaseError;
163
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
164
- "__#1@#code": Code;
165
- "__#1@#context": Record<string, unknown>;
166
- readonly name: Code;
167
- readonly code: Code;
168
- readonly _tag: Code;
169
- readonly context: Record<string, unknown>;
170
- message: string;
155
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
156
+ ifTypeDiffers?: boolean;
157
+ }): (error: unknown) => {
158
+ code: Code;
159
+ context: Record<string, unknown>;
160
+ get name(): Code;
161
+ get message(): string;
162
+ get _tag(): Code;
171
163
  stack?: string;
172
164
  cause?: unknown;
173
165
  };
174
- extend<Code extends string>(code: Code): /*elided*/ any;
166
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
167
+ isError(error: unknown): error is Error;
175
168
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
176
169
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
177
170
  stackTraceLimit: number;
178
171
  };
172
+ isError(error: unknown): error is Error;
179
173
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
180
174
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
181
175
  stackTraceLimit: number;
182
176
  };
183
- export declare class UnimplementedError extends UnimplementedError_base {
177
+ export declare class InternalError extends InternalError_base {
184
178
  }
185
- declare const ApiError_base: {
186
- new (message: string, options?: import("./base").BaseErrorOptions): {
187
- "__#1@#code": "API_ERROR";
188
- "__#1@#context": Record<string, unknown>;
189
- readonly name: "API_ERROR";
190
- readonly code: "API_ERROR";
191
- readonly _tag: "API_ERROR";
192
- readonly context: Record<string, unknown>;
193
- message: string;
179
+ declare const TimeoutError_base: {
180
+ new (options?: import("./base").BaseErrorOptions): {
181
+ code: "TIMEOUT";
182
+ context: Record<string, unknown>;
183
+ get name(): "TIMEOUT";
184
+ get message(): string;
185
+ get _tag(): "TIMEOUT";
194
186
  stack?: string;
195
187
  cause?: unknown;
196
188
  };
197
- code: "API_ERROR";
189
+ code: "TIMEOUT";
198
190
  is(error: unknown): error is BaseError;
199
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
200
- "__#1@#code": "API_ERROR";
201
- "__#1@#context": Record<string, unknown>;
202
- readonly name: "API_ERROR";
203
- readonly code: "API_ERROR";
204
- readonly _tag: "API_ERROR";
205
- readonly context: Record<string, unknown>;
206
- message: string;
191
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
192
+ ifTypeDiffers?: boolean;
193
+ }) | undefined): (error: unknown) => {
194
+ code: "TIMEOUT";
195
+ context: Record<string, unknown>;
196
+ get name(): "TIMEOUT";
197
+ get message(): string;
198
+ get _tag(): "TIMEOUT";
207
199
  stack?: string;
208
200
  cause?: unknown;
209
201
  };
210
- extend<Code extends string>(code: Code): {
211
- new (message: string, options?: import("./base").BaseErrorOptions): {
212
- "__#1@#code": Code;
213
- "__#1@#context": Record<string, unknown>;
214
- readonly name: Code;
215
- readonly code: Code;
216
- readonly _tag: Code;
217
- readonly context: Record<string, unknown>;
218
- message: string;
202
+ extend<Code extends string = string>(code: Code, message?: string): {
203
+ new (options?: import("./base").BaseErrorOptions): {
204
+ code: Code;
205
+ context: Record<string, unknown>;
206
+ get name(): Code;
207
+ get message(): string;
208
+ get _tag(): Code;
219
209
  stack?: string;
220
210
  cause?: unknown;
221
211
  };
222
212
  code: Code;
223
213
  is(error: unknown): error is BaseError;
224
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
225
- "__#1@#code": Code;
226
- "__#1@#context": Record<string, unknown>;
227
- readonly name: Code;
228
- readonly code: Code;
229
- readonly _tag: Code;
230
- readonly context: Record<string, unknown>;
231
- message: string;
214
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
215
+ ifTypeDiffers?: boolean;
216
+ }): (error: unknown) => {
217
+ code: Code;
218
+ context: Record<string, unknown>;
219
+ get name(): Code;
220
+ get message(): string;
221
+ get _tag(): Code;
232
222
  stack?: string;
233
223
  cause?: unknown;
234
224
  };
235
- extend<Code extends string>(code: Code): /*elided*/ any;
225
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
226
+ isError(error: unknown): error is Error;
236
227
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
237
228
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
238
229
  stackTraceLimit: number;
239
230
  };
231
+ isError(error: unknown): error is Error;
240
232
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
241
233
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
242
234
  stackTraceLimit: number;
243
235
  };
244
- export declare class ApiError extends ApiError_base {
236
+ export declare class TimeoutError extends TimeoutError_base {
245
237
  }
246
- declare const SystemError_base: {
247
- new (message: string, options?: import("./base").BaseErrorOptions): {
248
- "__#1@#code": "SYSTEM_ERROR";
249
- "__#1@#context": Record<string, unknown>;
250
- readonly name: "SYSTEM_ERROR";
251
- readonly code: "SYSTEM_ERROR";
252
- readonly _tag: "SYSTEM_ERROR";
253
- readonly context: Record<string, unknown>;
254
- message: string;
238
+ declare const AbortedError_base: {
239
+ new (options?: import("./base").BaseErrorOptions): {
240
+ code: "ABORTED";
241
+ context: Record<string, unknown>;
242
+ get name(): "ABORTED";
243
+ get message(): string;
244
+ get _tag(): "ABORTED";
255
245
  stack?: string;
256
246
  cause?: unknown;
257
247
  };
258
- code: "SYSTEM_ERROR";
248
+ code: "ABORTED";
259
249
  is(error: unknown): error is BaseError;
260
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
261
- "__#1@#code": "SYSTEM_ERROR";
262
- "__#1@#context": Record<string, unknown>;
263
- readonly name: "SYSTEM_ERROR";
264
- readonly code: "SYSTEM_ERROR";
265
- readonly _tag: "SYSTEM_ERROR";
266
- readonly context: Record<string, unknown>;
267
- message: string;
250
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
251
+ ifTypeDiffers?: boolean;
252
+ }) | undefined): (error: unknown) => {
253
+ code: "ABORTED";
254
+ context: Record<string, unknown>;
255
+ get name(): "ABORTED";
256
+ get message(): string;
257
+ get _tag(): "ABORTED";
268
258
  stack?: string;
269
259
  cause?: unknown;
270
260
  };
271
- extend<Code extends string>(code: Code): {
272
- new (message: string, options?: import("./base").BaseErrorOptions): {
273
- "__#1@#code": Code;
274
- "__#1@#context": Record<string, unknown>;
275
- readonly name: Code;
276
- readonly code: Code;
277
- readonly _tag: Code;
278
- readonly context: Record<string, unknown>;
279
- message: string;
261
+ extend<Code extends string = string>(code: Code, message?: string): {
262
+ new (options?: import("./base").BaseErrorOptions): {
263
+ code: Code;
264
+ context: Record<string, unknown>;
265
+ get name(): Code;
266
+ get message(): string;
267
+ get _tag(): Code;
280
268
  stack?: string;
281
269
  cause?: unknown;
282
270
  };
283
271
  code: Code;
284
272
  is(error: unknown): error is BaseError;
285
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
286
- "__#1@#code": Code;
287
- "__#1@#context": Record<string, unknown>;
288
- readonly name: Code;
289
- readonly code: Code;
290
- readonly _tag: Code;
291
- readonly context: Record<string, unknown>;
292
- message: string;
273
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
274
+ ifTypeDiffers?: boolean;
275
+ }): (error: unknown) => {
276
+ code: Code;
277
+ context: Record<string, unknown>;
278
+ get name(): Code;
279
+ get message(): string;
280
+ get _tag(): Code;
293
281
  stack?: string;
294
282
  cause?: unknown;
295
283
  };
296
- extend<Code extends string>(code: Code): /*elided*/ any;
284
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
285
+ isError(error: unknown): error is Error;
297
286
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
298
287
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
299
288
  stackTraceLimit: number;
300
289
  };
290
+ isError(error: unknown): error is Error;
301
291
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
302
292
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
303
293
  stackTraceLimit: number;
304
294
  };
305
- export declare class SystemError extends SystemError_base {
295
+ export declare class AbortedError extends AbortedError_base {
306
296
  }
307
- declare const InternalError_base: {
308
- new (message: string, options?: import("./base").BaseErrorOptions): {
309
- "__#1@#code": "INTERNAL_ERROR";
310
- "__#1@#context": Record<string, unknown>;
311
- readonly name: "INTERNAL_ERROR";
312
- readonly code: "INTERNAL_ERROR";
313
- readonly _tag: "INTERNAL_ERROR";
314
- readonly context: Record<string, unknown>;
315
- message: string;
297
+ declare const NotImplementedError_base: {
298
+ new (options?: import("./base").BaseErrorOptions): {
299
+ code: "NOT_IMPLEMENTED";
300
+ context: Record<string, unknown>;
301
+ get name(): "NOT_IMPLEMENTED";
302
+ get message(): string;
303
+ get _tag(): "NOT_IMPLEMENTED";
316
304
  stack?: string;
317
305
  cause?: unknown;
318
306
  };
319
- code: "INTERNAL_ERROR";
307
+ code: "NOT_IMPLEMENTED";
320
308
  is(error: unknown): error is BaseError;
321
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
322
- "__#1@#code": "INTERNAL_ERROR";
323
- "__#1@#context": Record<string, unknown>;
324
- readonly name: "INTERNAL_ERROR";
325
- readonly code: "INTERNAL_ERROR";
326
- readonly _tag: "INTERNAL_ERROR";
327
- readonly context: Record<string, unknown>;
328
- message: string;
309
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
310
+ ifTypeDiffers?: boolean;
311
+ }) | undefined): (error: unknown) => {
312
+ code: "NOT_IMPLEMENTED";
313
+ context: Record<string, unknown>;
314
+ get name(): "NOT_IMPLEMENTED";
315
+ get message(): string;
316
+ get _tag(): "NOT_IMPLEMENTED";
329
317
  stack?: string;
330
318
  cause?: unknown;
331
319
  };
332
- extend<Code extends string>(code: Code): {
333
- new (message: string, options?: import("./base").BaseErrorOptions): {
334
- "__#1@#code": Code;
335
- "__#1@#context": Record<string, unknown>;
336
- readonly name: Code;
337
- readonly code: Code;
338
- readonly _tag: Code;
339
- readonly context: Record<string, unknown>;
340
- message: string;
320
+ extend<Code extends string = string>(code: Code, message?: string): {
321
+ new (options?: import("./base").BaseErrorOptions): {
322
+ code: Code;
323
+ context: Record<string, unknown>;
324
+ get name(): Code;
325
+ get message(): string;
326
+ get _tag(): Code;
341
327
  stack?: string;
342
328
  cause?: unknown;
343
329
  };
344
330
  code: Code;
345
331
  is(error: unknown): error is BaseError;
346
- wrap(message: string, options?: Omit<import("./base").BaseErrorOptions, "cause">): (error: unknown) => {
347
- "__#1@#code": Code;
348
- "__#1@#context": Record<string, unknown>;
349
- readonly name: Code;
350
- readonly code: Code;
351
- readonly _tag: Code;
352
- readonly context: Record<string, unknown>;
353
- message: string;
332
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
333
+ ifTypeDiffers?: boolean;
334
+ }): (error: unknown) => {
335
+ code: Code;
336
+ context: Record<string, unknown>;
337
+ get name(): Code;
338
+ get message(): string;
339
+ get _tag(): Code;
354
340
  stack?: string;
355
341
  cause?: unknown;
356
342
  };
357
- extend<Code extends string>(code: Code): /*elided*/ any;
343
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
344
+ isError(error: unknown): error is Error;
358
345
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
359
346
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
360
347
  stackTraceLimit: number;
361
348
  };
349
+ isError(error: unknown): error is Error;
362
350
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
363
351
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
364
352
  stackTraceLimit: number;
365
353
  };
366
- export declare class InternalError extends InternalError_base {
354
+ export declare class NotImplementedError extends NotImplementedError_base {
355
+ }
356
+ declare const RuntimeServiceError_base: {
357
+ new (options?: import("./base").BaseErrorOptions): {
358
+ code: "RUNTIME_SERVICE_ERROR";
359
+ context: Record<string, unknown>;
360
+ get name(): "RUNTIME_SERVICE_ERROR";
361
+ get message(): string;
362
+ get _tag(): "RUNTIME_SERVICE_ERROR";
363
+ stack?: string;
364
+ cause?: unknown;
365
+ };
366
+ code: "RUNTIME_SERVICE_ERROR";
367
+ is(error: unknown): error is BaseError;
368
+ wrap(options?: (Omit<import("./base").BaseErrorOptions, "cause"> & {
369
+ ifTypeDiffers?: boolean;
370
+ }) | undefined): (error: unknown) => {
371
+ code: "RUNTIME_SERVICE_ERROR";
372
+ context: Record<string, unknown>;
373
+ get name(): "RUNTIME_SERVICE_ERROR";
374
+ get message(): string;
375
+ get _tag(): "RUNTIME_SERVICE_ERROR";
376
+ stack?: string;
377
+ cause?: unknown;
378
+ };
379
+ extend<Code extends string = string>(code: Code, message?: string): {
380
+ new (options?: import("./base").BaseErrorOptions): {
381
+ code: Code;
382
+ context: Record<string, unknown>;
383
+ get name(): Code;
384
+ get message(): string;
385
+ get _tag(): Code;
386
+ stack?: string;
387
+ cause?: unknown;
388
+ };
389
+ code: Code;
390
+ is(error: unknown): error is BaseError;
391
+ wrap(options?: Omit<import("./base").BaseErrorOptions, "cause"> & {
392
+ ifTypeDiffers?: boolean;
393
+ }): (error: unknown) => {
394
+ code: Code;
395
+ context: Record<string, unknown>;
396
+ get name(): Code;
397
+ get message(): string;
398
+ get _tag(): Code;
399
+ stack?: string;
400
+ cause?: unknown;
401
+ };
402
+ extend<Code extends string = string>(code: Code, message?: string): /*elided*/ any;
403
+ isError(error: unknown): error is Error;
404
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
405
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
406
+ stackTraceLimit: number;
407
+ };
408
+ isError(error: unknown): error is Error;
409
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
410
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
411
+ stackTraceLimit: number;
412
+ };
413
+ export declare class RuntimeServiceError extends RuntimeServiceError_base {
367
414
  }
368
415
  export {};
369
416
  //# sourceMappingURL=errors.d.ts.map