@dxos/errors 0.8.4-main.5acf9ea → 0.8.4-main.5e0aa09add

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