effect 3.12.6 → 3.12.8

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.
Files changed (117) hide show
  1. package/dist/cjs/BigDecimal.js +1 -1
  2. package/dist/cjs/BigDecimal.js.map +1 -1
  3. package/dist/cjs/Cause.js +630 -167
  4. package/dist/cjs/Cause.js.map +1 -1
  5. package/dist/cjs/Chunk.js +4 -8
  6. package/dist/cjs/Chunk.js.map +1 -1
  7. package/dist/cjs/ConfigProvider.js +1 -0
  8. package/dist/cjs/ConfigProvider.js.map +1 -1
  9. package/dist/cjs/Cron.js +26 -10
  10. package/dist/cjs/Cron.js.map +1 -1
  11. package/dist/cjs/Duration.js +7 -4
  12. package/dist/cjs/Duration.js.map +1 -1
  13. package/dist/cjs/Effect.js.map +1 -1
  14. package/dist/cjs/Either.js +5 -24
  15. package/dist/cjs/Either.js.map +1 -1
  16. package/dist/cjs/Layer.js.map +1 -1
  17. package/dist/cjs/Option.js +1042 -363
  18. package/dist/cjs/Option.js.map +1 -1
  19. package/dist/cjs/ParseResult.js +41 -18
  20. package/dist/cjs/ParseResult.js.map +1 -1
  21. package/dist/cjs/Schedule.js +8 -1
  22. package/dist/cjs/Schedule.js.map +1 -1
  23. package/dist/cjs/Schema.js +51 -10
  24. package/dist/cjs/Schema.js.map +1 -1
  25. package/dist/cjs/internal/cause.js +23 -108
  26. package/dist/cjs/internal/cause.js.map +1 -1
  27. package/dist/cjs/internal/core.js +4 -5
  28. package/dist/cjs/internal/core.js.map +1 -1
  29. package/dist/cjs/internal/layer.js.map +1 -1
  30. package/dist/cjs/internal/schedule.js.map +1 -1
  31. package/dist/cjs/internal/secret.js +6 -5
  32. package/dist/cjs/internal/secret.js.map +1 -1
  33. package/dist/cjs/internal/stream.js +21 -23
  34. package/dist/cjs/internal/stream.js.map +1 -1
  35. package/dist/cjs/internal/version.js +1 -1
  36. package/dist/dts/BigDecimal.d.ts.map +1 -1
  37. package/dist/dts/Cause.d.ts +1157 -304
  38. package/dist/dts/Cause.d.ts.map +1 -1
  39. package/dist/dts/Chunk.d.ts +3 -6
  40. package/dist/dts/Chunk.d.ts.map +1 -1
  41. package/dist/dts/ConfigProvider.d.ts.map +1 -1
  42. package/dist/dts/Cron.d.ts +25 -9
  43. package/dist/dts/Cron.d.ts.map +1 -1
  44. package/dist/dts/Duration.d.ts +1 -1
  45. package/dist/dts/Duration.d.ts.map +1 -1
  46. package/dist/dts/Effect.d.ts +4 -2
  47. package/dist/dts/Effect.d.ts.map +1 -1
  48. package/dist/dts/Either.d.ts.map +1 -1
  49. package/dist/dts/Layer.d.ts +1 -1
  50. package/dist/dts/Layer.d.ts.map +1 -1
  51. package/dist/dts/Option.d.ts +2288 -784
  52. package/dist/dts/Option.d.ts.map +1 -1
  53. package/dist/dts/ParseResult.d.ts +4 -4
  54. package/dist/dts/ParseResult.d.ts.map +1 -1
  55. package/dist/dts/Schedule.d.ts +7 -0
  56. package/dist/dts/Schedule.d.ts.map +1 -1
  57. package/dist/dts/Schema.d.ts +15 -4
  58. package/dist/dts/Schema.d.ts.map +1 -1
  59. package/dist/dts/internal/core.d.ts.map +1 -1
  60. package/dist/dts/internal/stream.d.ts +1 -1
  61. package/dist/dts/internal/stream.d.ts.map +1 -1
  62. package/dist/esm/BigDecimal.js +1 -1
  63. package/dist/esm/BigDecimal.js.map +1 -1
  64. package/dist/esm/Cause.js +630 -167
  65. package/dist/esm/Cause.js.map +1 -1
  66. package/dist/esm/Chunk.js +4 -8
  67. package/dist/esm/Chunk.js.map +1 -1
  68. package/dist/esm/ConfigProvider.js +1 -0
  69. package/dist/esm/ConfigProvider.js.map +1 -1
  70. package/dist/esm/Cron.js +27 -11
  71. package/dist/esm/Cron.js.map +1 -1
  72. package/dist/esm/Duration.js +7 -4
  73. package/dist/esm/Duration.js.map +1 -1
  74. package/dist/esm/Effect.js.map +1 -1
  75. package/dist/esm/Either.js +5 -24
  76. package/dist/esm/Either.js.map +1 -1
  77. package/dist/esm/Layer.js.map +1 -1
  78. package/dist/esm/Option.js +1041 -363
  79. package/dist/esm/Option.js.map +1 -1
  80. package/dist/esm/ParseResult.js +41 -18
  81. package/dist/esm/ParseResult.js.map +1 -1
  82. package/dist/esm/Schedule.js +7 -0
  83. package/dist/esm/Schedule.js.map +1 -1
  84. package/dist/esm/Schema.js +51 -10
  85. package/dist/esm/Schema.js.map +1 -1
  86. package/dist/esm/internal/cause.js +22 -108
  87. package/dist/esm/internal/cause.js.map +1 -1
  88. package/dist/esm/internal/core.js +4 -5
  89. package/dist/esm/internal/core.js.map +1 -1
  90. package/dist/esm/internal/layer.js.map +1 -1
  91. package/dist/esm/internal/schedule.js.map +1 -1
  92. package/dist/esm/internal/secret.js +5 -4
  93. package/dist/esm/internal/secret.js.map +1 -1
  94. package/dist/esm/internal/stream.js +21 -23
  95. package/dist/esm/internal/stream.js.map +1 -1
  96. package/dist/esm/internal/version.js +1 -1
  97. package/package.json +1 -1
  98. package/src/BigDecimal.ts +1 -1
  99. package/src/Cause.ts +1158 -304
  100. package/src/Chunk.ts +8 -11
  101. package/src/ConfigProvider.ts +1 -0
  102. package/src/Cron.ts +28 -11
  103. package/src/Duration.ts +10 -5
  104. package/src/Effect.ts +5 -3
  105. package/src/Either.ts +11 -28
  106. package/src/Layer.ts +1 -1
  107. package/src/Option.ts +2314 -820
  108. package/src/ParseResult.ts +53 -29
  109. package/src/Schedule.ts +8 -0
  110. package/src/Schema.ts +68 -12
  111. package/src/internal/cause.ts +38 -137
  112. package/src/internal/core.ts +4 -5
  113. package/src/internal/layer.ts +1 -1
  114. package/src/internal/schedule.ts +7 -6
  115. package/src/internal/secret.ts +6 -4
  116. package/src/internal/stream.ts +24 -37
  117. package/src/internal/version.ts +1 -1
package/dist/cjs/Cause.js CHANGED
@@ -9,456 +9,889 @@ var core = _interopRequireWildcard(require("./internal/core.js"));
9
9
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
10
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
11
  /**
12
+ * A unique symbol identifying the `Cause` type.
13
+ *
14
+ * **Details**
15
+ *
16
+ * This provides a symbol that helps identify instances of the `Cause` data
17
+ * type. This can be used for advanced operations such as refining types or
18
+ * building internal utilities that check whether an unknown value is a `Cause`.
19
+ *
20
+ * @see {@link isCause} Check if a value is a `Cause`
12
21
  * @since 2.0.0
13
- * @category symbols
22
+ * @category Symbols
14
23
  */
15
24
  const CauseTypeId = exports.CauseTypeId = internal.CauseTypeId;
16
25
  /**
26
+ * A unique symbol identifying the `RuntimeException` type.
27
+ *
28
+ * **Details**
29
+ *
30
+ * This provides a symbol that identifies a `RuntimeException`. This is
31
+ * typically used internally by the library to recognize checked exceptions that
32
+ * occur during runtime.
33
+ *
34
+ * @see {@link RuntimeException} Create or work with a `RuntimeException`
35
+ *
17
36
  * @since 2.0.0
18
- * @category symbols
37
+ * @category Symbols
19
38
  */
20
39
  const RuntimeExceptionTypeId = exports.RuntimeExceptionTypeId = core.RuntimeExceptionTypeId;
21
40
  /**
41
+ * A unique symbol identifying the `InterruptedException` type.
42
+ *
43
+ * **Details**
44
+ *
45
+ * This provides a symbol that identifies an `InterruptedException`. This is
46
+ * typically used internally to recognize when a fiber has been interrupted,
47
+ * helping the framework handle interruption logic correctly.
48
+ *
49
+ * @see {@link InterruptedException} Create or work with an `InterruptedException`
50
+ *
22
51
  * @since 2.0.0
23
- * @category symbols
52
+ * @category Symbols
24
53
  */
25
54
  const InterruptedExceptionTypeId = exports.InterruptedExceptionTypeId = core.InterruptedExceptionTypeId;
26
55
  /**
56
+ * A unique symbol identifying the `IllegalArgumentException` type.
57
+ *
58
+ * **Details**
59
+ *
60
+ * This provides a symbol that identifies an `IllegalArgumentException`. This is
61
+ * often used in scenarios where invalid arguments are supplied to methods that
62
+ * expect specific input.
63
+ *
64
+ * @see {@link IllegalArgumentException} Create or work with an `IllegalArgumentException`
65
+ *
27
66
  * @since 2.0.0
28
- * @category symbols
67
+ * @category Symbols
29
68
  */
30
69
  const IllegalArgumentExceptionTypeId = exports.IllegalArgumentExceptionTypeId = core.IllegalArgumentExceptionTypeId;
31
70
  /**
71
+ * A unique symbol identifying the `NoSuchElementException` type.
72
+ *
73
+ * **Details**
74
+ *
75
+ * This provides a symbol that identifies a `NoSuchElementException`. It helps
76
+ * differentiate cases where a required element is missing within a data
77
+ * structure.
78
+ *
79
+ * @see {@link NoSuchElementException} Create or work with a `NoSuchElementException`
80
+ *
32
81
  * @since 2.0.0
33
- * @category symbols
82
+ * @category Symbols
34
83
  */
35
84
  const NoSuchElementExceptionTypeId = exports.NoSuchElementExceptionTypeId = core.NoSuchElementExceptionTypeId;
36
85
  /**
86
+ * A unique symbol identifying the `InvalidPubSubCapacityException` type.
87
+ *
88
+ * **Details**
89
+ *
90
+ * This provides a symbol that identifies an `InvalidPubSubCapacityException`.
91
+ * It indicates an error related to an invalid capacity passed to a `PubSub`
92
+ * structure.
93
+ *
94
+ * @see {@link InvalidPubSubCapacityException} Create or work with an `InvalidPubSubCapacityException`
95
+ *
37
96
  * @since 2.0.0
38
- * @category symbols
97
+ * @category Symbols
39
98
  */
40
99
  const InvalidPubSubCapacityExceptionTypeId = exports.InvalidPubSubCapacityExceptionTypeId = core.InvalidPubSubCapacityExceptionTypeId;
41
100
  /**
101
+ * A unique symbol identifying the `ExceededCapacityException` type.
102
+ *
103
+ * **Details**
104
+ *
105
+ * This provides a symbol that identifies an `ExceededCapacityException`. It
106
+ * denotes situations where a resource has exceeded its configured capacity
107
+ * limit.
108
+ *
109
+ * @see {@link ExceededCapacityException} Create or work with an `ExceededCapacityException`
110
+ *
42
111
  * @since 3.5.0
43
- * @category symbols
112
+ * @category Symbols
44
113
  */
45
114
  const ExceededCapacityExceptionTypeId = exports.ExceededCapacityExceptionTypeId = core.ExceededCapacityExceptionTypeId;
46
115
  /**
116
+ * A unique symbol identifying the `TimeoutException` type.
117
+ *
118
+ * **Details**
119
+ *
120
+ * This provides a symbol that identifies a `TimeoutException`. It helps the
121
+ * framework recognize errors related to operations that fail to complete within
122
+ * a given timeframe.
123
+ *
124
+ * @see {@link TimeoutException} Create or work with a `TimeoutException`
125
+ *
47
126
  * @since 2.0.0
48
- * @category symbols
127
+ * @category Symbols
49
128
  */
50
129
  const TimeoutExceptionTypeId = exports.TimeoutExceptionTypeId = core.TimeoutExceptionTypeId;
51
130
  /**
131
+ * A unique symbol identifying the `UnknownException` type.
132
+ *
133
+ * **Details**
134
+ *
135
+ * This provides a symbol that identifies an `UnknownException`. It is typically
136
+ * used for generic or unexpected errors that do not fit other specific
137
+ * exception categories.
138
+ *
139
+ * @see {@link UnknownException} Create or work with an `UnknownException`
140
+ *
52
141
  * @since 2.0.0
53
- * @category symbols
142
+ * @category Symbols
54
143
  */
55
144
  const UnknownExceptionTypeId = exports.UnknownExceptionTypeId = core.UnknownExceptionTypeId;
56
145
  /**
57
- * Represents a generic checked exception which occurs at runtime.
146
+ * Creates an error that occurs at runtime, extendable for other exception
147
+ * types.
58
148
  *
59
149
  * @since 2.0.0
60
- * @category errors
150
+ * @category Errors
61
151
  */
62
152
  const YieldableError = exports.YieldableError = core.YieldableError;
63
153
  /**
64
- * Constructs a new `Empty` cause.
154
+ * Creates an `Empty` cause.
155
+ *
156
+ * **Details**
157
+ *
158
+ * This function returns a cause that signifies "no error." It's commonly used
159
+ * to represent an absence of failure conditions.
160
+ *
161
+ * @see {@link isEmpty} Check if a `Cause` is empty
65
162
  *
66
163
  * @since 2.0.0
67
- * @category constructors
164
+ * @category Constructors
68
165
  */
69
166
  const empty = exports.empty = internal.empty;
70
167
  /**
71
- * Constructs a new `Fail` cause from the specified `error`.
168
+ * Creates a `Fail` cause from an expected error.
169
+ *
170
+ * **Details**
171
+ *
172
+ * This function constructs a `Cause` carrying an error of type `E`. It's used
173
+ * when you want to represent a known or anticipated failure in your effectful
174
+ * computations.
175
+ *
176
+ * @see {@link isFailure} Check if a `Cause` contains a failure
72
177
  *
73
178
  * @since 2.0.0
74
- * @category constructors
179
+ * @category Constructors
75
180
  */
76
181
  const fail = exports.fail = internal.fail;
77
182
  /**
78
- * Constructs a new `Die` cause from the specified `defect`.
183
+ * Creates a `Die` cause from an unexpected error.
184
+ *
185
+ * **Details**
186
+ *
187
+ * This function wraps an unhandled or unknown defect (like a runtime crash)
188
+ * into a `Cause`. It's useful for capturing unforeseen issues in a structured
189
+ * way.
190
+ *
191
+ * @see {@link isDie} Check if a `Cause` contains a defect
79
192
  *
80
193
  * @since 2.0.0
81
- * @category constructors
194
+ * @category Constructors
82
195
  */
83
196
  const die = exports.die = internal.die;
84
197
  /**
85
- * Constructs a new `Interrupt` cause from the specified `fiberId`.
198
+ * Creates an `Interrupt` cause from a `FiberId`.
199
+ *
200
+ * **Details**
201
+ *
202
+ * This function represents a fiber that has been interrupted. It stores the
203
+ * identifier of the interrupted fiber, enabling precise tracking of concurrent
204
+ * cancellations.
205
+ *
206
+ * @see {@link isInterrupted} Check if a `Cause` contains an interruption
86
207
  *
87
208
  * @since 2.0.0
88
- * @category constructors
209
+ * @category Constructors
89
210
  */
90
211
  const interrupt = exports.interrupt = internal.interrupt;
91
212
  /**
92
- * Constructs a new `Parallel` cause from the specified `left` and `right`
93
- * causes.
213
+ * Combines two `Cause`s in parallel.
214
+ *
215
+ * **Details**
216
+ *
217
+ * This function merges two errors that occurred simultaneously. Instead of
218
+ * discarding one error, both are retained, allowing for richer error reporting
219
+ * and debugging.
220
+ *
221
+ * @see {@link isParallelType} Check if a `Cause` is a `Parallel`
94
222
  *
95
223
  * @since 2.0.0
96
- * @category constructors
224
+ * @category Constructors
97
225
  */
98
226
  const parallel = exports.parallel = internal.parallel;
99
227
  /**
100
- * Constructs a new `Sequential` cause from the specified pecified `left` and
101
- * `right` causes.
228
+ * Combines two `Cause`s sequentially.
229
+ *
230
+ * **Details**
231
+ *
232
+ * This function merges two errors that occurred in sequence, such as a main
233
+ * error followed by a finalization error. It preserves both errors for complete
234
+ * failure information.
235
+ *
236
+ * @see {@link isSequentialType} Check if a `Cause` is a `Sequential`
102
237
  *
103
238
  * @since 2.0.0
104
- * @category constructors
239
+ * @category Constructors
105
240
  */
106
241
  const sequential = exports.sequential = internal.sequential;
107
242
  /**
108
- * Returns `true` if the specified value is a `Cause`, `false` otherwise.
243
+ * Checks if a value is a `Cause`.
109
244
  *
110
245
  * @since 2.0.0
111
- * @category refinements
246
+ * @category Guards
112
247
  */
113
248
  const isCause = exports.isCause = internal.isCause;
114
249
  /**
115
- * Returns `true` if the specified `Cause` is an `Empty` type, `false`
116
- * otherwise.
250
+ * Checks if a `Cause` is an `Empty` type.
251
+ *
252
+ * @see {@link empty} Create a new `Empty` cause
117
253
  *
118
254
  * @since 2.0.0
119
- * @category refinements
255
+ * @category Guards
120
256
  */
121
257
  const isEmptyType = exports.isEmptyType = internal.isEmptyType;
122
258
  /**
123
- * Returns `true` if the specified `Cause` is a `Fail` type, `false`
124
- * otherwise.
259
+ * Checks if a `Cause` is a `Fail` type.
260
+ *
261
+ * @see {@link fail} Create a new `Fail` cause
125
262
  *
126
263
  * @since 2.0.0
127
- * @category refinements
264
+ * @category Guards
128
265
  */
129
266
  const isFailType = exports.isFailType = internal.isFailType;
130
267
  /**
131
- * Returns `true` if the specified `Cause` is a `Die` type, `false`
132
- * otherwise.
268
+ * Checks if a `Cause` is a `Die` type.
269
+ *
270
+ * @see {@link die} Create a new `Die` cause
133
271
  *
134
272
  * @since 2.0.0
135
- * @category refinements
273
+ * @category Guards
136
274
  */
137
275
  const isDieType = exports.isDieType = internal.isDieType;
138
276
  /**
139
- * Returns `true` if the specified `Cause` is an `Interrupt` type, `false`
140
- * otherwise.
277
+ * Checks if a `Cause` is an `Interrupt` type.
278
+ *
279
+ * @see {@link interrupt} Create an `Interrupt` cause
141
280
  *
142
281
  * @since 2.0.0
143
- * @category refinements
282
+ * @category Guards
144
283
  */
145
284
  const isInterruptType = exports.isInterruptType = internal.isInterruptType;
146
285
  /**
147
- * Returns `true` if the specified `Cause` is a `Sequential` type, `false`
148
- * otherwise.
286
+ * Checks if a `Cause` is a `Sequential` type.
287
+ *
288
+ * @see {@link sequential} Combine two `Cause`s sequentially
149
289
  *
150
290
  * @since 2.0.0
151
- * @category refinements
291
+ * @category Guards
152
292
  */
153
293
  const isSequentialType = exports.isSequentialType = internal.isSequentialType;
154
294
  /**
155
- * Returns `true` if the specified `Cause` is a `Parallel` type, `false`
156
- * otherwise.
295
+ * Checks if a `Cause` is a `Parallel` type.
296
+ *
297
+ * @see {@link parallel} Combine two `Cause`s in parallel
157
298
  *
158
299
  * @since 2.0.0
159
- * @category refinements
300
+ * @category Guards
160
301
  */
161
302
  const isParallelType = exports.isParallelType = internal.isParallelType;
162
303
  /**
163
- * Returns the size of the cause, calculated as the number of individual `Cause`
164
- * nodes found in the `Cause` semiring structure.
304
+ * Calculates the size of a `Cause`.
305
+ *
306
+ * **Details**
307
+ *
308
+ * This function returns the total number of `Cause` nodes in the semiring
309
+ * structure, reflecting how many individual error elements are recorded.
165
310
  *
166
311
  * @since 2.0.0
167
- * @category getters
312
+ * @category Getters
168
313
  */
169
314
  const size = exports.size = internal.size;
170
315
  /**
171
- * Returns `true` if the specified cause is empty, `false` otherwise.
316
+ * Checks if a `Cause` is entirely empty.
317
+ *
318
+ * **Details**
319
+ *
320
+ * This function returns `true` if the `Cause` contains no errors, defects, or
321
+ * interruptions. It's helpful for verifying if a computation truly had no
322
+ * failures.
172
323
  *
173
324
  * @since 2.0.0
174
- * @category getters
325
+ * @category Getters
175
326
  */
176
327
  const isEmpty = exports.isEmpty = internal.isEmpty;
177
328
  /**
178
- * Returns `true` if the specified cause contains a failure, `false` otherwise.
329
+ * Checks if a `Cause` contains a failure.
330
+ *
331
+ * **Details**
332
+ *
333
+ * This function returns `true` if the `Cause` includes any `Fail` error. It's
334
+ * commonly used to confirm whether a workflow encountered an anticipated error
335
+ * versus just defects or interruptions.
179
336
  *
180
337
  * @since 2.0.0
181
- * @category getters
338
+ * @category Getters
182
339
  */
183
340
  const isFailure = exports.isFailure = internal.isFailure;
184
341
  /**
185
- * Returns `true` if the specified cause contains a defect, `false` otherwise.
342
+ * Checks if a `Cause` contains a defect.
343
+ *
344
+ * **Details**
345
+ *
346
+ * This function returns `true` if the `Cause` includes any unexpected or
347
+ * unhandled errors (`Die`). It's useful for differentiating known failures from
348
+ * unexpected ones.
186
349
  *
187
350
  * @since 2.0.0
188
- * @category getters
351
+ * @category Getters
189
352
  */
190
353
  const isDie = exports.isDie = internal.isDie;
191
354
  /**
192
- * Returns `true` if the specified cause contains an interruption, `false`
193
- * otherwise.
355
+ * Checks if a `Cause` contains an interruption.
356
+ *
357
+ * **Details**
358
+ *
359
+ * This function returns `true` if the `Cause` includes any fiber interruptions.
194
360
  *
195
361
  * @since 2.0.0
196
- * @category getters
362
+ * @category Getters
197
363
  */
198
364
  const isInterrupted = exports.isInterrupted = internal.isInterrupted;
199
365
  /**
200
- * Returns `true` if the specified cause contains only interruptions (without
201
- * any `Die` or `Fail` causes), `false` otherwise.
366
+ * Checks if a `Cause` contains only interruptions.
367
+ *
368
+ * **Details**
369
+ *
370
+ * This function returns `true` if the `Cause` has been interrupted but does not
371
+ * contain any other failures, such as `Fail` or `Die`. It's helpful for
372
+ * verifying purely "cancellation" scenarios.
202
373
  *
203
374
  * @since 2.0.0
204
- * @category getters
375
+ * @category Getters
205
376
  */
206
377
  const isInterruptedOnly = exports.isInterruptedOnly = internal.isInterruptedOnly;
207
378
  /**
208
- * Returns a `List` of all recoverable errors of type `E` in the specified
209
- * cause.
379
+ * Extracts all recoverable errors of type `E` from a `Cause`.
380
+ *
381
+ * **Details**
382
+ *
383
+ * This function returns a chunk of errors, providing a list of all `Fail`
384
+ * values found in the cause. It's useful for collecting all known failures for
385
+ * logging or combined error handling.
210
386
  *
211
387
  * @since 2.0.0
212
- * @category getters
388
+ * @category Getters
213
389
  */
214
390
  const failures = exports.failures = internal.failures;
215
391
  /**
216
- * Returns a `List` of all unrecoverable defects in the specified cause.
392
+ * Extracts all unrecoverable defects from a `Cause`.
393
+ *
394
+ * **Details**
395
+ *
396
+ * This function returns a chunk of values representing unexpected errors
397
+ * (`Die`). It's handy for capturing or logging unanticipated failures that
398
+ * might need special handling, such as bug reports.
217
399
  *
218
400
  * @since 2.0.0
219
- * @category getters
401
+ * @category Getters
220
402
  */
221
403
  const defects = exports.defects = internal.defects;
222
404
  /**
223
- * Returns a `HashSet` of `FiberId`s for all fibers that interrupted the fiber
224
- * described by the specified cause.
405
+ * Collects all `FiberId`s responsible for interrupting a fiber.
406
+ *
407
+ * **Details**
408
+ *
409
+ * This function returns a set of IDs indicating which fibers caused
410
+ * interruptions within this `Cause`. It's useful for debugging concurrency
411
+ * issues or tracing cancellations.
225
412
  *
226
413
  * @since 2.0.0
227
- * @category getters
414
+ * @category Getters
228
415
  */
229
416
  const interruptors = exports.interruptors = internal.interruptors;
230
417
  /**
231
- * Returns the `E` associated with the first `Fail` in this `Cause`, if one
232
- * exists.
418
+ * Retrieves the first `Fail` error in a `Cause`, if present.
419
+ *
420
+ * **Details**
421
+ *
422
+ * This function returns an `Option` containing the first recoverable error
423
+ * (`E`) from the cause. It's often used to quickly check if there's a primary
424
+ * error to handle or display.
233
425
  *
234
426
  * @since 2.0.0
235
- * @category getters
427
+ * @category Getters
236
428
  */
237
429
  const failureOption = exports.failureOption = internal.failureOption;
238
430
  /**
239
- * Returns the first checked error on the `Left` if available, if there are
240
- * no checked errors return the rest of the `Cause` that is known to contain
241
- * only `Die` or `Interrupt` causes.
431
+ * Splits a `Cause` into either its first `Fail` error or the rest of the cause
432
+ * (which might only contain `Die` or `Interrupt`).
433
+ *
434
+ * **Details**
435
+ *
436
+ * This function either returns the checked error (`E`) or the remaining
437
+ * `Cause<never>` with defects/interruptions. It helps you decide if there's a
438
+ * recoverable path or if only unhandled issues remain.
242
439
  *
243
440
  * @since 2.0.0
244
- * @category getters
441
+ * @category Getters
245
442
  */
246
443
  const failureOrCause = exports.failureOrCause = internal.failureOrCause;
247
444
  /**
248
- * Converts the specified `Cause<Option<E>>` to an `Option<Cause<E>>` by
249
- * recursively stripping out any failures with the error `None`.
445
+ * Strips out failures with an error of `None` from a `Cause<Option<E>>`.
446
+ *
447
+ * **Details**
448
+ *
449
+ * This function turns a `Cause<Option<E>>` into an `Option<Cause<E>>`. If the
450
+ * cause only contains failures of `None`, it becomes `None`; otherwise, it
451
+ * returns a `Cause` of the remaining errors. It's helpful when working with
452
+ * optional errors and filtering out certain error paths.
250
453
  *
251
454
  * @since 2.0.0
252
- * @category getters
455
+ * @category Getters
253
456
  */
254
457
  const flipCauseOption = exports.flipCauseOption = internal.flipCauseOption;
255
458
  /**
256
- * Returns the defect associated with the first `Die` in this `Cause`, if one
257
- * exists.
459
+ * Retrieves the first `Die` defect in a `Cause`, if present.
460
+ *
461
+ * **Details**
462
+ *
463
+ * This function returns an `Option` containing the first unexpected failure
464
+ * (`Die`) discovered. It's helpful for diagnosing the primary defect in a chain
465
+ * of errors.
258
466
  *
259
467
  * @since 2.0.0
260
- * @category getters
468
+ * @category Getters
261
469
  */
262
470
  const dieOption = exports.dieOption = internal.dieOption;
263
471
  /**
264
- * Returns the `FiberId` associated with the first `Interrupt` in the specified
265
- * cause, if one exists.
472
+ * Retrieves the first `Interrupt` in a `Cause`, if present.
473
+ *
474
+ * **Details**
475
+ *
476
+ * This function returns an `Option` with the first fiber interruption
477
+ * discovered. This is particularly useful for concurrency analysis or debugging
478
+ * cancellations.
266
479
  *
267
480
  * @since 2.0.0
268
- * @category getters
481
+ * @category Getters
269
482
  */
270
483
  const interruptOption = exports.interruptOption = internal.interruptOption;
271
484
  /**
272
- * Remove all `Fail` and `Interrupt` nodes from the specified cause, and return
273
- * a cause containing only `Die` cause/finalizer defects.
485
+ * Removes all `Fail` and `Interrupt` nodes, keeping only defects (`Die`) in a
486
+ * `Cause`.
487
+ *
488
+ * **Details**
489
+ *
490
+ * This function strips a cause of recoverable errors and interruptions, leaving
491
+ * only unexpected failures. If no defects remain, it returns `None`. It's
492
+ * valuable for focusing only on unanticipated problems when both known errors
493
+ * and defects could occur.
274
494
  *
275
495
  * @since 2.0.0
276
- * @category getters
496
+ * @category Getters
277
497
  */
278
498
  const keepDefects = exports.keepDefects = internal.keepDefects;
499
+ // TODO(4.0): remove? what's the point of this API?
279
500
  /**
280
- * Linearizes the specified cause into a `HashSet` of parallel causes where each
281
- * parallel cause contains a linear sequence of failures.
501
+ * Linearizes a `Cause` into a set of parallel causes, each containing a
502
+ * sequential chain of failures.
503
+ *
504
+ * **Details**
505
+ *
506
+ * This function reorganizes the cause structure so that you can analyze each
507
+ * parallel branch separately, even if they have multiple sequential errors.
282
508
  *
283
509
  * @since 2.0.0
284
- * @category getters
510
+ * @category Getters
285
511
  */
286
512
  const linearize = exports.linearize = internal.linearize;
287
513
  /**
288
- * Remove all `Fail` and `Interrupt` nodes from the specified cause, and return
289
- * a cause containing only `Die` cause/finalizer defects.
514
+ * Removes `Fail` and `Interrupt` nodes from a `Cause`, keeping only defects
515
+ * (`Die`).
516
+ *
517
+ * **Details**
518
+ *
519
+ * This function is similar to `keepDefects` but returns a `Cause<never>`
520
+ * directly, which can still store `Die` or finalizer-related defects. It's
521
+ * helpful for analyzing only the irrecoverable portion of the error.
290
522
  *
291
523
  * @since 2.0.0
292
- * @category getters
524
+ * @category Getters
293
525
  */
294
526
  const stripFailures = exports.stripFailures = internal.stripFailures;
295
527
  /**
296
- * Remove all `Die` causes that the specified partial function is defined at,
297
- * returning `Some` with the remaining causes or `None` if there are no
298
- * remaining causes.
528
+ * Removes matching defects from a `Cause` using a partial function, returning
529
+ * the remainder.
530
+ *
531
+ * **Details**
532
+ *
533
+ * This function applies a user-defined extraction function to each defect
534
+ * (`Die`). If the function matches the defect, that defect is removed. If all
535
+ * defects match, the result is `None`. Otherwise, you get a `Cause` with the
536
+ * unmatched defects.
299
537
  *
300
538
  * @since 2.0.0
301
- * @category getters
539
+ * @category Getters
302
540
  */
303
541
  const stripSomeDefects = exports.stripSomeDefects = internal.stripSomeDefects;
304
542
  /**
543
+ * Replaces any errors in a `Cause` with a provided constant error.
544
+ *
545
+ * **Details**
546
+ *
547
+ * This function transforms all `Fail` errors into the specified error value,
548
+ * preserving the structure of the `Cause`. It's useful when you no longer need
549
+ * the original error details but still want to keep the cause shape.
550
+ *
551
+ * @see {@link map} Apply a custom transformation to `Fail` errors
552
+ *
305
553
  * @since 2.0.0
306
- * @category mapping
554
+ * @category Mapping
307
555
  */
308
556
  const as = exports.as = internal.as;
309
557
  /**
558
+ * Transforms the errors in a `Cause` using a user-provided function.
559
+ *
560
+ * **Details**
561
+ *
562
+ * This function applies `f` to each `Fail` error while leaving defects (`Die`)
563
+ * and interruptions untouched. It's useful for changing or simplifying error
564
+ * types in your effectful workflows.
565
+ *
566
+ * @see {@link as} Replace errors with a single constant
567
+ *
310
568
  * @since 2.0.0
311
- * @category mapping
569
+ * @category Mapping
312
570
  */
313
571
  const map = exports.map = internal.map;
314
572
  /**
573
+ * Transforms errors in a `Cause` into new causes.
574
+ *
575
+ * **Details**
576
+ *
577
+ * This function applies a function `f` to each `Fail` error, converting it into
578
+ * a new `Cause`. This is especially powerful for merging or restructuring error
579
+ * types while preserving or combining cause information.
580
+ *
581
+ * @see {@link map} Apply a simpler transformation to errors
582
+ *
315
583
  * @since 2.0.0
316
- * @category sequencing
584
+ * @category Sequencing
317
585
  */
318
586
  const flatMap = exports.flatMap = internal.flatMap;
319
587
  /**
320
- * Executes a sequence of two `Cause`s. The second `Cause` can be dependent on the result of the first `Cause`.
588
+ * Sequences two `Cause`s. The second `Cause` can be dependent on the result of
589
+ * the first `Cause`.
321
590
  *
322
591
  * @since 2.0.0
323
- * @category sequencing
592
+ * @category Sequencing
324
593
  */
325
594
  const andThen = exports.andThen = internal.andThen;
326
595
  /**
596
+ * Flattens a nested `Cause` structure.
597
+ *
598
+ * **Details**
599
+ *
600
+ * This function takes a `Cause<Cause<E>>` and merges the layers into a single
601
+ * `Cause<E>`. It's useful for eliminating additional nesting created by
602
+ * repeated transformations or compositions.
603
+ *
604
+ * @see {@link flatMap} Compose nested causes
605
+ *
327
606
  * @since 2.0.0
328
- * @category sequencing
607
+ * @category Sequencing
329
608
  */
330
609
  const flatten = exports.flatten = internal.flatten;
331
610
  /**
332
- * Returns `true` if the `self` cause contains or is equal to `that` cause,
333
- * `false` otherwise.
611
+ * Checks if the current `Cause` contains or is equal to another `Cause`.
612
+ *
613
+ * **Details**
614
+ *
615
+ * This function returns `true` if `that` cause is part of or the same as
616
+ * the current `Cause`. It's useful when you need to check for specific
617
+ * error patterns or deduplicate repeated failures.
334
618
  *
335
619
  * @since 2.0.0
336
- * @category elements
620
+ * @category Elements
337
621
  */
338
622
  const contains = exports.contains = internal.contains;
339
623
  /**
340
- * Squashes a `Cause` down to a single defect, chosen to be the "most important"
341
- * defect.
624
+ * Extracts the most "important" defect from a `Cause`.
625
+ *
626
+ * **Details**
627
+ *
628
+ * This function reduces a `Cause` to a single, prioritized defect. It evaluates
629
+ * the `Cause` in the following order of priority:
630
+ *
631
+ * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it returns
632
+ * the raw error value.
633
+ * 2. If there is no failure, it looks for the first defect (e.g., from
634
+ * `Effect.die`).
635
+ * 3. If neither of the above is present, and the `Cause` stems from an
636
+ * interruption, it creates and returns an `InterruptedException`.
637
+ *
638
+ * This function ensures you can always extract a meaningful representation of
639
+ * the primary issue from a potentially complex `Cause` structure.
640
+ *
641
+ * **When to Use**
642
+ *
643
+ * Use this function when you need to extract the most relevant error or defect
644
+ * from a `Cause`, especially in scenarios where multiple errors or defects may
645
+ * be present. It's particularly useful for simplifying error reporting or
646
+ * logging.
647
+ *
648
+ * @see {@link squashWith} Allows transforming failures into defects when squashing.
342
649
  *
343
650
  * @since 2.0.0
344
- * @category destructors
651
+ * @category Destructors
345
652
  */
346
653
  const squash = exports.squash = core.causeSquash;
347
654
  /**
348
- * Squashes a `Cause` down to a single defect, chosen to be the "most important"
349
- * defect. If a recoverable error is found, the provided function will be used
350
- * to map the error a defect, and the resulting value will be returned.
655
+ * Extracts the most "important" defect from a `Cause`, transforming failures
656
+ * into defects using a provided function.
657
+ *
658
+ * **Details**
659
+ *
660
+ * This function reduces a `Cause` to a single, prioritized defect, while
661
+ * allowing you to transform recoverable failures into defects through a custom
662
+ * function. It processes the `Cause` in the following order:
663
+ *
664
+ * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it applies
665
+ * the provided function `f` to the error to transform it into a defect.
666
+ * 2. If there is no failure, it looks for the first defect (e.g., from
667
+ * `Effect.die`) and returns it.
668
+ * 3. If neither is present and the `Cause` stems from an interruption, it
669
+ * returns an `InterruptedException`.
670
+ *
671
+ * This function is particularly useful when you need custom handling or
672
+ * transformation of errors while processing a `Cause`.
673
+ *
674
+ * @see {@link squash} Extracts the most "important" defect without transforming failures.
351
675
  *
352
676
  * @since 2.0.0
353
- * @category destructors
677
+ * @category Destructors
354
678
  */
355
679
  const squashWith = exports.squashWith = core.causeSquashWith;
356
680
  /**
357
- * Uses the provided partial function to search the specified cause and attempt
358
- * to extract information from it.
681
+ * Searches a `Cause` using a partial function to extract information.
682
+ *
683
+ * **Details**
684
+ *
685
+ * This function allows you to search through a `Cause` using a custom partial
686
+ * function. The partial function is applied to the `Cause`, and if it matches,
687
+ * the result is returned wrapped in a `Some`. If no match is found, the result
688
+ * is `None`.
689
+ *
690
+ * This is particularly useful when you are only interested in specific types of
691
+ * errors, defects, or interruption causes within a potentially complex `Cause`
692
+ * structure. By leveraging a partial function, you can focus on extracting only
693
+ * the relevant information you care about.
694
+ *
695
+ * The partial function should return an `Option` indicating whether it matched
696
+ * and the value it extracted.
359
697
  *
360
698
  * @since 2.0.0
361
- * @category elements
699
+ * @category Elements
362
700
  */
363
701
  const find = exports.find = internal.find;
364
702
  /**
365
- * Filters causes which match the provided predicate out of the specified cause.
703
+ * Preserves parts of a `Cause` that match a given predicate.
704
+ *
705
+ * **Details**
706
+ *
707
+ * This function allows you to retain only the parts of a `Cause` structure that
708
+ * match a specified predicate or refinement. Any parts of the `Cause` that do
709
+ * not match the provided condition are excluded from the result.
710
+ *
711
+ * You can use this function in two ways:
712
+ * - With a `Predicate`: A function that evaluates whether a `Cause` should be
713
+ * retained based on its value.
714
+ * - With a `Refinement`: A more specific predicate that can refine the type of
715
+ * the `Cause`.
716
+ *
717
+ * This is useful when you need to extract specific types of errors, defects, or
718
+ * interruptions from a `Cause` while discarding unrelated parts.
366
719
  *
367
720
  * @since 2.0.0
368
- * @category filtering
721
+ * @category Filtering
369
722
  */
370
723
  const filter = exports.filter = internal.filter;
371
724
  /**
372
- * Folds the specified cause into a value of type `Z`.
725
+ * Transforms a `Cause` into a single value using custom handlers for each
726
+ * possible case.
727
+ *
728
+ * **Details**
729
+ *
730
+ * This function processes a `Cause` by applying a set of custom handlers to
731
+ * each possible type of cause: `Empty`, `Fail`, `Die`, `Interrupt`,
732
+ * `Sequential`, and `Parallel`. The result of this function is a single value
733
+ * of type `Z`. This function allows you to define exactly how to handle each
734
+ * part of a `Cause`, whether it's a failure, defect, interruption, or a
735
+ * combination of these.
736
+ *
737
+ * The options parameter provides handlers for:
738
+ * - `onEmpty`: Handles the case where the cause is `Empty`, meaning no errors
739
+ * occurred.
740
+ * - `onFail`: Processes a failure with an error of type `E`.
741
+ * - `onDie`: Processes a defect (unexpected error).
742
+ * - `onInterrupt`: Handles a fiber interruption, providing the `FiberId` of the
743
+ * interruption.
744
+ * - `onSequential`: Combines two sequential causes into a single value of type
745
+ * `Z`.
746
+ * - `onParallel`: Combines two parallel causes into a single value of type `Z`.
373
747
  *
374
748
  * @since 2.0.0
375
- * @category folding
749
+ * @category Matching
376
750
  */
377
751
  const match = exports.match = internal.match;
378
752
  /**
379
- * Reduces the specified cause into a value of type `Z`, beginning with the
380
- * provided `zero` value.
753
+ * Combines all parts of a `Cause` into a single value by starting with an
754
+ * initial value.
755
+ *
756
+ * **Details**
757
+ *
758
+ * This function processes a `Cause` by starting with an initial value (`zero`)
759
+ * and applying a custom function (`pf`) to combine all elements of the `Cause`
760
+ * into a single result of type `Z`. The custom function determines how each
761
+ * part of the `Cause` contributes to the final result. The function can return
762
+ * an `Option` to either continue combining values or skip specific parts of the
763
+ * `Cause`.
764
+ *
765
+ * This function is useful for tasks such as:
766
+ * - Aggregating error messages from a `Cause` into a single string.
767
+ * - Summarizing the structure of a `Cause` into a simplified result.
768
+ * - Filtering or processing only specific parts of a `Cause`.
769
+ *
770
+ * The reduction proceeds in a top-down manner, visiting all nodes in the
771
+ * `Cause` structure. This gives you complete control over how each part of the
772
+ * `Cause` contributes to the final result.
381
773
  *
382
774
  * @since 2.0.0
383
- * @category folding
775
+ * @category Reducing
384
776
  */
385
777
  const reduce = exports.reduce = internal.reduce;
386
778
  /**
387
- * Reduces the specified cause into a value of type `Z` using a `Cause.Reducer`.
388
- * Also allows for accessing the provided context during reduction.
779
+ * Combines all parts of a `Cause` into a single value using a custom reducer
780
+ * and a context.
781
+ *
782
+ * **Details**
783
+ *
784
+ * This function allows you to reduce a `Cause` into a single value of type `Z`
785
+ * using a custom `CauseReducer`. A `CauseReducer` provides methods to handle
786
+ * specific parts of the `Cause`, such as failures, defects, or interruptions.
787
+ * Additionally, this function provides access to a `context` value, which can
788
+ * be used to carry information or maintain state during the reduction process.
789
+ *
790
+ * This is particularly useful when the reduction process needs additional
791
+ * context or configuration, such as:
792
+ * - Aggregating error details with dynamic formatting.
793
+ * - Collecting logs or statistics about the `Cause`.
794
+ * - Performing stateful transformations based on the `context`.
795
+ *
796
+ * @see {@link reduce} To reduce a `Cause` without additional context.
389
797
  *
390
798
  * @since 2.0.0
391
- * @category folding
799
+ * @category Reducing
392
800
  */
393
801
  const reduceWithContext = exports.reduceWithContext = internal.reduceWithContext;
394
802
  /**
395
- * Represents a checked exception which occurs when a `Fiber` is interrupted.
803
+ * Creates an error that indicates a `Fiber` was interrupted.
804
+ *
805
+ * **Details**
806
+ *
807
+ * This function constructs an `InterruptedException` recognized by the Effect
808
+ * runtime. It is usually thrown or returned when a fiber's execution is
809
+ * interrupted by external events or by another fiber. This is particularly
810
+ * helpful in concurrent programs where fibers may halt each other before
811
+ * completion.
396
812
  *
397
813
  * @since 2.0.0
398
- * @category errors
814
+ * @category Errors
399
815
  */
400
816
  const InterruptedException = exports.InterruptedException = core.InterruptedException;
401
817
  /**
402
- * Returns `true` if the specified value is an `InterruptedException`, `false`
403
- * otherwise.
818
+ * Checks if a given unknown value is an `InterruptedException`.
404
819
  *
405
820
  * @since 2.0.0
406
- * @category refinements
821
+ * @category Guards
407
822
  */
408
823
  const isInterruptedException = exports.isInterruptedException = core.isInterruptedException;
409
824
  /**
410
- * Represents a checked exception which occurs when an invalid argument is
411
- * provided to a method.
825
+ * Creates an error indicating an invalid method argument.
826
+ *
827
+ * **Details**
828
+ *
829
+ * This function constructs an `IllegalArgumentException`. It is typically
830
+ * thrown or returned when an operation receives improper inputs, such as
831
+ * out-of-range values or invalid object states.
412
832
  *
413
833
  * @since 2.0.0
414
- * @category errors
834
+ * @category Errors
415
835
  */
416
836
  const IllegalArgumentException = exports.IllegalArgumentException = core.IllegalArgumentException;
417
837
  /**
418
- * Returns `true` if the specified value is an `IllegalArgumentException`, `false`
419
- * otherwise.
838
+ * Checks if a given unknown value is an `IllegalArgumentException`.
420
839
  *
421
840
  * @since 2.0.0
422
- * @category refinements
841
+ * @category Guards
423
842
  */
424
843
  const isIllegalArgumentException = exports.isIllegalArgumentException = core.isIllegalArgumentException;
425
844
  /**
426
- * Represents a checked exception which occurs when an expected element was
427
- * unable to be found.
845
+ * Creates an error indicating a missing element.
846
+ *
847
+ * **Details**
848
+ *
849
+ * This function constructs a `NoSuchElementException`. It helps you clearly
850
+ * communicate that a required element is unavailable.
428
851
  *
429
852
  * @since 2.0.0
430
- * @category errors
853
+ * @category Errors
431
854
  */
432
855
  const NoSuchElementException = exports.NoSuchElementException = core.NoSuchElementException;
433
856
  /**
434
- * Returns `true` if the specified value is an `NoSuchElementException`, `false`
435
- * otherwise.
857
+ * Checks if a given unknown value is a `NoSuchElementException`.
436
858
  *
437
859
  * @since 2.0.0
438
- * @category refinements
860
+ * @category Guards
439
861
  */
440
862
  const isNoSuchElementException = exports.isNoSuchElementException = core.isNoSuchElementException;
441
863
  /**
442
- * Represents a generic checked exception which occurs at runtime.
864
+ * Creates an error for general runtime errors.
865
+ *
866
+ * **Details**
867
+ *
868
+ * This function constructs a `RuntimeException`, for errors that occur at
869
+ * runtime but are not specifically typed or categorized as interruptions,
870
+ * missing elements, or invalid arguments. It helps unify a wide range of
871
+ * unexpected conditions under a single, recognizable error type.
443
872
  *
444
873
  * @since 2.0.0
445
- * @category errors
874
+ * @category Errors
446
875
  */
447
876
  const RuntimeException = exports.RuntimeException = core.RuntimeException;
448
877
  /**
449
- * Returns `true` if the specified value is an `RuntimeException`, `false`
450
- * otherwise.
878
+ * Checks if a given unknown value is a `RuntimeException`.
451
879
  *
452
880
  * @since 2.0.0
453
- * @category refinements
881
+ * @category Guards
454
882
  */
455
883
  const isRuntimeException = exports.isRuntimeException = core.isRuntimeException;
456
884
  /**
457
- * Represents a checked exception which occurs when a computation doesn't
458
- * finish on schedule.
885
+ * Creates an error for operations that exceed their expected time.
886
+ *
887
+ * **Details**
888
+ *
889
+ * This function constructs a `TimeoutException`. It is typically used to signal
890
+ * that an operation or fiber did not complete within a designated time limit,
891
+ * allowing you to handle slow or hanging processes.
459
892
  *
460
893
  * @since 2.0.0
461
- * @category errors
894
+ * @category Errors
462
895
  */
463
896
  const TimeoutException = exports.TimeoutException = core.TimeoutException;
464
897
  /**
@@ -490,52 +923,82 @@ const TimeoutException = exports.TimeoutException = core.TimeoutException;
490
923
  * promises or external APIs.
491
924
  *
492
925
  * @since 2.0.0
493
- * @category errors
926
+ * @category Errors
494
927
  */
495
928
  const UnknownException = exports.UnknownException = core.UnknownException;
496
929
  /**
497
- * Returns `true` if the specified value is an `UnknownException`, `false`
498
- * otherwise.
930
+ * Checks if a given unknown value is an `UnknownException`.
499
931
  *
500
932
  * @since 2.0.0
501
- * @category refinements
933
+ * @category Guards
502
934
  */
503
935
  const isUnknownException = exports.isUnknownException = core.isUnknownException;
504
936
  /**
505
- * Represents a checked exception which occurs when a resources capacity has
506
- * been exceeded.
937
+ * Creates an error indicating resource capacity has been exceeded.
938
+ *
939
+ * **Details**
940
+ *
941
+ * This function constructs an `ExceededCapacityException`, signifying that an
942
+ * operation or resource usage surpassed established limits. This can be
943
+ * essential for concurrency or resource management situations, ensuring your
944
+ * application doesn't go beyond acceptable thresholds.
507
945
  *
508
946
  * @since 3.5.0
509
- * @category errors
947
+ * @category Errors
510
948
  */
511
949
  const ExceededCapacityException = exports.ExceededCapacityException = core.ExceededCapacityException;
512
950
  /**
513
- * Returns `true` if the specified value is an `ExceededCapacityException`, `false`
514
- * otherwise.
951
+ * Checks if a given unknown value is an `ExceededCapacityException`.
515
952
  *
516
953
  * @since 3.5.0
517
- * @category refinements
954
+ * @category Guards
518
955
  */
519
956
  const isExceededCapacityException = exports.isExceededCapacityException = core.isExceededCapacityException;
520
957
  /**
521
- * Returns the specified `Cause` as a pretty-printed string.
958
+ * Converts a `Cause` into a human-readable string.
959
+ *
960
+ * **Details**
961
+ *
962
+ * This function pretty-prints the entire `Cause`, including any failures,
963
+ * defects, and interruptions. It can be especially helpful for logging,
964
+ * debugging, or displaying structured errors to users.
965
+ *
966
+ * You can optionally pass `options` to configure how the error cause is
967
+ * rendered. By default, it includes essential details of all errors in the
968
+ * `Cause`.
969
+ *
970
+ * @see {@link prettyErrors} Get a list of `PrettyError` objects instead of a single string.
522
971
  *
523
972
  * @since 2.0.0
524
- * @category rendering
973
+ * @category Formatting
525
974
  */
526
975
  const pretty = exports.pretty = internal.pretty;
527
976
  /**
528
- * Returns the specified `Cause` as a pretty-printed string.
977
+ * Returns a list of prettified errors (`PrettyError`) from a `Cause`.
978
+ *
979
+ * **Details**
980
+ *
981
+ * This function inspects the entire `Cause` and produces an array of
982
+ * `PrettyError` objects. Each object may include additional metadata, such as a
983
+ * `Span`, to provide deeper insights into where and how the error occurred.
529
984
  *
530
985
  * @since 3.2.0
531
- * @category rendering
986
+ * @category Formatting
532
987
  */
533
988
  const prettyErrors = exports.prettyErrors = internal.prettyErrors;
534
989
  /**
535
- * Returns the original, unproxied, instance of a thrown error
990
+ * Retrieves the original, unproxied error instance from an error object.
991
+ *
992
+ * **Details**
993
+ *
994
+ * This function returns the underlying error object without any
995
+ * library-specific wrapping or proxying that might occur during error handling.
996
+ * This can be essential if you need direct access to the error's native
997
+ * properties, such as stack traces or custom data fields, for detailed
998
+ * debugging or integration with external systems.
536
999
  *
537
1000
  * @since 2.0.0
538
- * @category errors
1001
+ * @category Errors
539
1002
  */
540
1003
  const originalError = exports.originalError = core.originalInstance;
541
1004
  //# sourceMappingURL=Cause.js.map