@dxos/errors 0.8.4-main.b97322e → 0.8.4-main.c4373fc

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