effect 4.0.0-beta.10 → 4.0.0-beta.12

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 (189) hide show
  1. package/dist/Channel.d.ts +7 -7
  2. package/dist/Config.d.ts +157 -0
  3. package/dist/Config.d.ts.map +1 -1
  4. package/dist/Config.js +56 -1
  5. package/dist/Config.js.map +1 -1
  6. package/dist/Effect.d.ts +296 -8
  7. package/dist/Effect.d.ts.map +1 -1
  8. package/dist/Effect.js +72 -0
  9. package/dist/Effect.js.map +1 -1
  10. package/dist/ErrorReporter.d.ts +376 -0
  11. package/dist/ErrorReporter.d.ts.map +1 -0
  12. package/dist/ErrorReporter.js +246 -0
  13. package/dist/ErrorReporter.js.map +1 -0
  14. package/dist/Fiber.d.ts +2 -2
  15. package/dist/Fiber.d.ts.map +1 -1
  16. package/dist/Fiber.js.map +1 -1
  17. package/dist/Graph.d.ts.map +1 -1
  18. package/dist/Graph.js +3 -6
  19. package/dist/Graph.js.map +1 -1
  20. package/dist/LogLevel.d.ts +5 -0
  21. package/dist/LogLevel.d.ts.map +1 -1
  22. package/dist/LogLevel.js.map +1 -1
  23. package/dist/Logger.d.ts +25 -91
  24. package/dist/Logger.d.ts.map +1 -1
  25. package/dist/Logger.js +2 -3
  26. package/dist/Logger.js.map +1 -1
  27. package/dist/Queue.d.ts.map +1 -1
  28. package/dist/Queue.js +0 -1
  29. package/dist/Queue.js.map +1 -1
  30. package/dist/Random.d.ts +17 -0
  31. package/dist/Random.d.ts.map +1 -1
  32. package/dist/Random.js +17 -0
  33. package/dist/Random.js.map +1 -1
  34. package/dist/References.d.ts +3 -3
  35. package/dist/References.d.ts.map +1 -1
  36. package/dist/Schema.d.ts +3 -1
  37. package/dist/Schema.d.ts.map +1 -1
  38. package/dist/SchemaAST.d.ts.map +1 -1
  39. package/dist/SchemaAST.js +2 -1
  40. package/dist/SchemaAST.js.map +1 -1
  41. package/dist/Stream.d.ts +5 -5
  42. package/dist/index.d.ts +4 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +4 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/internal/effect.js +98 -33
  47. package/dist/internal/effect.js.map +1 -1
  48. package/dist/internal/hashMap.js +2 -2
  49. package/dist/internal/hashMap.js.map +1 -1
  50. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  51. package/dist/unstable/ai/LanguageModel.js +86 -14
  52. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  53. package/dist/unstable/ai/McpSchema.d.ts +112 -36
  54. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  55. package/dist/unstable/ai/McpSchema.js +47 -10
  56. package/dist/unstable/ai/McpSchema.js.map +1 -1
  57. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  58. package/dist/unstable/ai/McpServer.js +33 -6
  59. package/dist/unstable/ai/McpServer.js.map +1 -1
  60. package/dist/unstable/ai/Tool.d.ts +16 -0
  61. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  62. package/dist/unstable/ai/Tool.js +14 -0
  63. package/dist/unstable/ai/Tool.js.map +1 -1
  64. package/dist/unstable/cli/CliOutput.js +37 -6
  65. package/dist/unstable/cli/CliOutput.js.map +1 -1
  66. package/dist/unstable/cli/Command.d.ts +199 -7
  67. package/dist/unstable/cli/Command.d.ts.map +1 -1
  68. package/dist/unstable/cli/Command.js +116 -6
  69. package/dist/unstable/cli/Command.js.map +1 -1
  70. package/dist/unstable/cli/HelpDoc.d.ts +60 -2
  71. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  72. package/dist/unstable/cli/internal/command.d.ts +11 -1
  73. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  74. package/dist/unstable/cli/internal/command.js +33 -8
  75. package/dist/unstable/cli/internal/command.js.map +1 -1
  76. package/dist/unstable/cli/internal/completions/CommandDescriptor.js +7 -2
  77. package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +1 -1
  78. package/dist/unstable/cli/internal/parser.js +10 -2
  79. package/dist/unstable/cli/internal/parser.js.map +1 -1
  80. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  81. package/dist/unstable/cluster/ClusterWorkflowEngine.js +2 -2
  82. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  83. package/dist/unstable/http/Headers.d.ts.map +1 -1
  84. package/dist/unstable/http/Headers.js +27 -10
  85. package/dist/unstable/http/Headers.js.map +1 -1
  86. package/dist/unstable/http/HttpClient.d.ts +28 -4
  87. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  88. package/dist/unstable/http/HttpClient.js.map +1 -1
  89. package/dist/unstable/http/HttpEffect.d.ts +3 -8
  90. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  91. package/dist/unstable/http/HttpEffect.js +25 -31
  92. package/dist/unstable/http/HttpEffect.js.map +1 -1
  93. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  94. package/dist/unstable/http/HttpMiddleware.js +4 -8
  95. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  96. package/dist/unstable/http/HttpServerError.d.ts +14 -27
  97. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  98. package/dist/unstable/http/HttpServerError.js +37 -44
  99. package/dist/unstable/http/HttpServerError.js.map +1 -1
  100. package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
  101. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  102. package/dist/unstable/http/HttpServerRespondable.js +5 -5
  103. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  104. package/dist/unstable/http/HttpServerResponse.d.ts +2 -1
  105. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  106. package/dist/unstable/http/HttpServerResponse.js +2 -0
  107. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  108. package/dist/unstable/http/internal/preResponseHandler.d.ts +2 -0
  109. package/dist/unstable/http/internal/preResponseHandler.d.ts.map +1 -0
  110. package/dist/unstable/http/internal/preResponseHandler.js +10 -0
  111. package/dist/unstable/http/internal/preResponseHandler.js.map +1 -0
  112. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +1 -1
  113. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  114. package/dist/unstable/httpapi/HttpApiBuilder.js +1 -1
  115. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  116. package/dist/unstable/httpapi/HttpApiError.d.ts +11 -0
  117. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  118. package/dist/unstable/httpapi/HttpApiError.js +29 -9
  119. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  120. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  121. package/dist/unstable/observability/OtlpLogger.js +7 -4
  122. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  123. package/dist/unstable/reactivity/Atom.js +1 -1
  124. package/dist/unstable/reactivity/Atom.js.map +1 -1
  125. package/dist/unstable/reactivity/AtomRegistry.d.ts +6 -0
  126. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  127. package/dist/unstable/reactivity/AtomRegistry.js +22 -1
  128. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  129. package/dist/unstable/rpc/RpcSchema.d.ts +13 -0
  130. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  131. package/dist/unstable/rpc/RpcSchema.js +14 -0
  132. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  133. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  134. package/dist/unstable/rpc/RpcSerialization.js +34 -9
  135. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  136. package/dist/unstable/rpc/RpcServer.d.ts +0 -7
  137. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  138. package/dist/unstable/rpc/RpcServer.js +9 -10
  139. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  140. package/dist/unstable/workflow/WorkflowEngine.d.ts +6 -0
  141. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  142. package/dist/unstable/workflow/WorkflowEngine.js +131 -0
  143. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  144. package/package.json +1 -1
  145. package/src/Channel.ts +9 -9
  146. package/src/Config.ts +171 -9
  147. package/src/Effect.ts +315 -8
  148. package/src/ErrorReporter.ts +459 -0
  149. package/src/Fiber.ts +9 -2
  150. package/src/Graph.ts +16 -6
  151. package/src/LogLevel.ts +6 -0
  152. package/src/Logger.ts +28 -95
  153. package/src/Queue.ts +0 -1
  154. package/src/Random.ts +18 -0
  155. package/src/References.ts +4 -4
  156. package/src/Schema.ts +1 -1
  157. package/src/SchemaAST.ts +2 -1
  158. package/src/Stream.ts +7 -7
  159. package/src/index.ts +5 -0
  160. package/src/internal/effect.ts +205 -49
  161. package/src/internal/hashMap.ts +2 -2
  162. package/src/unstable/ai/LanguageModel.ts +117 -16
  163. package/src/unstable/ai/McpSchema.ts +57 -11
  164. package/src/unstable/ai/McpServer.ts +44 -6
  165. package/src/unstable/ai/Tool.ts +15 -0
  166. package/src/unstable/cli/CliOutput.ts +45 -6
  167. package/src/unstable/cli/Command.ts +298 -11
  168. package/src/unstable/cli/HelpDoc.ts +68 -2
  169. package/src/unstable/cli/internal/command.ts +47 -11
  170. package/src/unstable/cli/internal/completions/CommandDescriptor.ts +7 -2
  171. package/src/unstable/cli/internal/parser.ts +11 -3
  172. package/src/unstable/cluster/ClusterWorkflowEngine.ts +2 -2
  173. package/src/unstable/http/Headers.ts +28 -13
  174. package/src/unstable/http/HttpClient.ts +45 -10
  175. package/src/unstable/http/HttpEffect.ts +30 -44
  176. package/src/unstable/http/HttpMiddleware.ts +4 -14
  177. package/src/unstable/http/HttpServerError.ts +42 -45
  178. package/src/unstable/http/HttpServerRespondable.ts +6 -6
  179. package/src/unstable/http/HttpServerResponse.ts +3 -1
  180. package/src/unstable/http/internal/preResponseHandler.ts +15 -0
  181. package/src/unstable/httpapi/HttpApiBuilder.ts +2 -1
  182. package/src/unstable/httpapi/HttpApiError.ts +30 -9
  183. package/src/unstable/observability/OtlpLogger.ts +9 -5
  184. package/src/unstable/reactivity/Atom.ts +1 -1
  185. package/src/unstable/reactivity/AtomRegistry.ts +29 -1
  186. package/src/unstable/rpc/RpcSchema.ts +17 -0
  187. package/src/unstable/rpc/RpcSerialization.ts +44 -9
  188. package/src/unstable/rpc/RpcServer.ts +14 -19
  189. package/src/unstable/workflow/WorkflowEngine.ts +178 -0
package/src/Logger.ts CHANGED
@@ -115,8 +115,7 @@ import type { PlatformError } from "./PlatformError.ts"
115
115
  import * as Predicate from "./Predicate.ts"
116
116
  import { CurrentLogAnnotations, CurrentLogSpans } from "./References.ts"
117
117
  import type * as Scope from "./Scope.ts"
118
- import * as ServiceMap from "./ServiceMap.ts"
119
- import type * as Types from "./Types.ts"
118
+ import type * as ServiceMap from "./ServiceMap.ts"
120
119
 
121
120
  const TypeId = "~effect/Logger"
122
121
 
@@ -144,8 +143,9 @@ const TypeId = "~effect/Logger"
144
143
  * @since 2.0.0
145
144
  * @category models
146
145
  */
147
- export interface Logger<in Message, out Output> extends Logger.Variance<Message, Output>, Pipeable {
148
- log: (options: Logger.Options<Message>) => Output
146
+ export interface Logger<in Message, out Output> extends Pipeable {
147
+ readonly [TypeId]: typeof TypeId
148
+ log(options: Options<Message>): Output
149
149
  }
150
150
 
151
151
  /**
@@ -153,100 +153,32 @@ export interface Logger<in Message, out Output> extends Logger.Variance<Message,
153
153
  * ```ts
154
154
  * import { Effect, Logger } from "effect"
155
155
  *
156
- * // Access Logger namespace types and functionality
157
- * const customLogger = Logger.make((options) => {
158
- * console.log(`Message: ${options.message}`)
159
- * console.log(`Level: ${options.logLevel}`)
160
- * console.log(`Date: ${options.date.toISOString()}`)
161
- * console.log(`Fiber ID: ${options.fiber.id}`)
156
+ * // Options interface provides all logging context
157
+ * const detailedLogger = Logger.make((options) => {
158
+ * const output = {
159
+ * message: options.message,
160
+ * level: options.logLevel,
161
+ * timestamp: options.date.toISOString(),
162
+ * fiberId: options.fiber.id,
163
+ * hasCause: options.cause !== undefined
164
+ * }
165
+ * console.log(JSON.stringify(output))
162
166
  * })
163
167
  *
164
- * // The Logger namespace contains types like Options, Variance, etc.
165
- * const program = Effect.log("Hello World").pipe(
166
- * Effect.provide(Logger.layer([customLogger]))
168
+ * const program = Effect.log("Processing request").pipe(
169
+ * Effect.provide(Logger.layer([detailedLogger]))
167
170
  * )
168
171
  * ```
169
172
  *
170
173
  * @since 2.0.0
171
174
  * @category models
172
175
  */
173
- export declare namespace Logger {
174
- /**
175
- * @example
176
- * ```ts
177
- * import { Logger } from "effect"
178
- *
179
- * // Variance interface defines contravariance for Message and covariance for Output
180
- * const customLogger = Logger.make<unknown, void>((options) => {
181
- * console.log(options.message)
182
- * })
183
- *
184
- * // The logger can accept more specific message types (contravariance)
185
- * // and can be used where less specific output types are expected (covariance)
186
- * ```
187
- *
188
- * @since 2.0.0
189
- * @category models
190
- */
191
- export interface Variance<in Message, out Output> {
192
- readonly [TypeId]: VarianceStruct<Message, Output>
193
- }
194
-
195
- /**
196
- * @example
197
- * ```ts
198
- * import { Logger } from "effect"
199
- *
200
- * // VarianceStruct defines the actual variance structure used internally
201
- * // This structure ensures proper typing and variance behavior
202
- * const logger = Logger.make<unknown, void>((options) => {
203
- * console.log(options.message)
204
- * })
205
- *
206
- * // The variance structure handles contravariance for input Message type
207
- * // and covariance for output Output type
208
- * ```
209
- *
210
- * @since 4.0.0
211
- * @category models
212
- */
213
- export interface VarianceStruct<in Message, out Output> {
214
- _Message: Types.Contravariant<Message>
215
- _Output: Types.Covariant<Output>
216
- }
217
-
218
- /**
219
- * @example
220
- * ```ts
221
- * import { Effect, Logger } from "effect"
222
- *
223
- * // Options interface provides all logging context
224
- * const detailedLogger = Logger.make((options) => {
225
- * const output = {
226
- * message: options.message,
227
- * level: options.logLevel,
228
- * timestamp: options.date.toISOString(),
229
- * fiberId: options.fiber.id,
230
- * hasCause: options.cause !== undefined
231
- * }
232
- * console.log(JSON.stringify(output))
233
- * })
234
- *
235
- * const program = Effect.log("Processing request").pipe(
236
- * Effect.provide(Logger.layer([detailedLogger]))
237
- * )
238
- * ```
239
- *
240
- * @since 2.0.0
241
- * @category models
242
- */
243
- export interface Options<out Message> {
244
- readonly message: Message
245
- readonly logLevel: LogLevel.LogLevel
246
- readonly cause: Cause.Cause<unknown>
247
- readonly fiber: Fiber.Fiber<unknown, unknown>
248
- readonly date: Date
249
- }
176
+ export interface Options<out Message> {
177
+ readonly message: Message
178
+ readonly logLevel: LogLevel.LogLevel
179
+ readonly cause: Cause.Cause<unknown>
180
+ readonly fiber: Fiber.Fiber<unknown, unknown>
181
+ readonly date: Date
250
182
  }
251
183
 
252
184
  /**
@@ -562,7 +494,7 @@ const format = (
562
494
  quoteValue: (s: string) => string,
563
495
  space?: number | string | undefined
564
496
  ) =>
565
- ({ cause, date, fiber, logLevel, message }: Logger.Options<unknown>): string => {
497
+ ({ cause, date, fiber, logLevel, message }: Options<unknown>): string => {
566
498
  const formatValue = (value: string): string => value.match(textOnly) ? value : quoteValue(value)
567
499
  const format = (label: string, value: string): string => `${effect.formatLabel(label)}=${formatValue(value)}`
568
500
  const append = (label: string, value: string): string => " " + format(label, value)
@@ -636,7 +568,7 @@ const format = (
636
568
  * @category constructors
637
569
  */
638
570
  export const make: <Message, Output>(
639
- log: (options: Logger.Options<Message>) => Output
571
+ log: (options: Options<Message>) => Output
640
572
  ) => Logger<Message, Output> = effect.loggerMake
641
573
 
642
574
  /**
@@ -1389,7 +1321,7 @@ export const layer = <
1389
1321
  const Loggers extends ReadonlyArray<Logger<unknown, unknown> | Effect.Effect<Logger<unknown, unknown>, any, any>>
1390
1322
  >(
1391
1323
  loggers: Loggers,
1392
- options?: { mergeWithExisting: boolean }
1324
+ options?: { readonly mergeWithExisting?: boolean | undefined } | undefined
1393
1325
  ): Layer.Layer<
1394
1326
  never,
1395
1327
  Loggers extends readonly [] ? never : Effect.Error<Loggers[number]>,
@@ -1398,13 +1330,14 @@ export const layer = <
1398
1330
  Scope.Scope
1399
1331
  >
1400
1332
  > =>
1401
- Layer.effectServices(
1333
+ Layer.effect(
1334
+ CurrentLoggers,
1402
1335
  withFiber(effect.fnUntraced(function*(fiber) {
1403
1336
  const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber.getRef(effect.CurrentLoggers) : [])
1404
1337
  for (const logger of loggers) {
1405
1338
  currentLoggers.add(isEffect(logger) ? yield* logger : logger)
1406
1339
  }
1407
- return ServiceMap.make(effect.CurrentLoggers, currentLoggers)
1340
+ return currentLoggers
1408
1341
  }))
1409
1342
  )
1410
1343
 
package/src/Queue.ts CHANGED
@@ -1113,7 +1113,6 @@ export const collect = <A, E>(self: Dequeue<A, E | Done>): Effect<Array<A>, Pull
1113
1113
  while: constTrue,
1114
1114
  body: constant(takeAll(self)),
1115
1115
  step(items: Arr.NonEmptyArray<A>) {
1116
- out.push(...items)
1117
1116
  for (let i = 0; i < items.length; i++) {
1118
1117
  out.push(items[i])
1119
1118
  }
package/src/Random.ts CHANGED
@@ -76,6 +76,24 @@ const randomWith = <A>(f: (random: typeof Random["Service"]) => A): Effect.Effec
76
76
  */
77
77
  export const next: Effect.Effect<number> = randomWith((r) => r.nextDoubleUnsafe())
78
78
 
79
+ /**
80
+ * Generates a random boolean value.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * import { Effect, Random } from "effect"
85
+ *
86
+ * const program = Effect.gen(function*() {
87
+ * const value = yield* Random.nextBoolean
88
+ * console.log("Random boolean:", value)
89
+ * })
90
+ * ```
91
+ *
92
+ * @since 4.0.0
93
+ * @category Random Number Generators
94
+ */
95
+ export const nextBoolean: Effect.Effect<boolean> = randomWith((r) => r.nextDoubleUnsafe() > 0.5)
96
+
79
97
  /**
80
98
  * Generates a random integer between `Number.MIN_SAFE_INTEGER` (inclusive)
81
99
  * and `Number.MAX_SAFE_INTEGER` (inclusive).
package/src/References.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  * @since 4.0.0
12
12
  */
13
13
  import { constTrue, constUndefined } from "./Function.ts"
14
- import type { LogLevel } from "./LogLevel.ts"
14
+ import type { LogLevel, Severity } from "./LogLevel.ts"
15
15
  import type { ReadonlyRecord } from "./Record.ts"
16
16
  import { MaxOpsBeforeYield } from "./Scheduler.ts"
17
17
  import * as ServiceMap from "./ServiceMap.ts"
@@ -451,7 +451,7 @@ export const CurrentLogAnnotations = ServiceMap.Reference<ReadonlyRecord<string,
451
451
  * @category references
452
452
  * @since 4.0.0
453
453
  */
454
- export const CurrentLogLevel: ServiceMap.Reference<LogLevel> = ServiceMap.Reference<LogLevel>(
454
+ export const CurrentLogLevel: ServiceMap.Reference<Severity> = ServiceMap.Reference<Severity>(
455
455
  "effect/References/CurrentLogLevel",
456
456
  { defaultValue: () => "Info" }
457
457
  )
@@ -516,9 +516,9 @@ export const MinimumLogLevel = ServiceMap.Reference<
516
516
  * @category references
517
517
  * @since 4.0.0
518
518
  */
519
- export const UnhandledLogLevel: ServiceMap.Reference<LogLevel | undefined> = ServiceMap.Reference(
519
+ export const UnhandledLogLevel: ServiceMap.Reference<Severity | undefined> = ServiceMap.Reference(
520
520
  "effect/References/UnhandledLogLevel",
521
- { defaultValue: (): LogLevel | undefined => "Error" }
521
+ { defaultValue: (): Severity | undefined => "Error" }
522
522
  )
523
523
 
524
524
  /**
package/src/Schema.ts CHANGED
@@ -1717,7 +1717,7 @@ export function fieldsAssign<const NewFields extends Struct.Fields>(fields: NewF
1717
1717
  * @since 4.0.0
1718
1718
  */
1719
1719
  export function encodeKeys<
1720
- S extends Struct<Struct.Fields>,
1720
+ S extends Top & { readonly fields: Struct.Fields },
1721
1721
  const M extends { readonly [K in keyof S["fields"]]?: PropertyKey }
1722
1722
  >(mapping: M) {
1723
1723
  return function(
package/src/SchemaAST.ts CHANGED
@@ -1455,7 +1455,8 @@ export class Arrays extends Base {
1455
1455
  // handle post rest elements
1456
1456
  // ---------------------------------------------
1457
1457
  for (let j = 0; j < tail.length; j++) {
1458
- if (len < i + 1) {
1458
+ i += j
1459
+ if (len < i) {
1459
1460
  continue
1460
1461
  } else {
1461
1462
  const tailj = tail[j]
package/src/Stream.ts CHANGED
@@ -22,7 +22,7 @@ import { addSpanStackTrace } from "./internal/tracer.ts"
22
22
  import * as Iterable from "./Iterable.ts"
23
23
  import * as Latch from "./Latch.ts"
24
24
  import type * as Layer from "./Layer.ts"
25
- import type { LogLevel } from "./LogLevel.ts"
25
+ import type { Severity } from "./LogLevel.ts"
26
26
  import * as MutableHashMap from "./MutableHashMap.ts"
27
27
  import * as MutableList from "./MutableList.ts"
28
28
  import * as Option from "./Option.ts"
@@ -8820,12 +8820,12 @@ export const orDie = <A, E, R>(self: Stream<A, E, R>): Stream<A, never, R> => fr
8820
8820
  */
8821
8821
  export const ignore: <
8822
8822
  Arg extends Stream<any, any, any> | {
8823
- readonly log?: boolean | LogLevel | undefined
8823
+ readonly log?: boolean | Severity | undefined
8824
8824
  } | undefined
8825
8825
  >(
8826
8826
  selfOrOptions: Arg,
8827
8827
  options?: {
8828
- readonly log?: boolean | LogLevel | undefined
8828
+ readonly log?: boolean | Severity | undefined
8829
8829
  } | undefined
8830
8830
  ) => [Arg] extends [Stream<infer A, infer _E, infer R>] ? Stream<A, never, R>
8831
8831
  : <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R> = dual(
@@ -8833,7 +8833,7 @@ export const ignore: <
8833
8833
  <A, E, R>(
8834
8834
  self: Stream<A, E, R>,
8835
8835
  options?: {
8836
- readonly log?: boolean | LogLevel | undefined
8836
+ readonly log?: boolean | Severity | undefined
8837
8837
  } | undefined
8838
8838
  ): Stream<A, never, R> => fromChannel(Channel.ignore(self.channel, options))
8839
8839
  )
@@ -8860,19 +8860,19 @@ export const ignore: <
8860
8860
  */
8861
8861
  export const ignoreCause: <
8862
8862
  Arg extends Stream<any, any, any> | {
8863
- readonly log?: boolean | LogLevel | undefined
8863
+ readonly log?: boolean | Severity | undefined
8864
8864
  } | undefined
8865
8865
  >(
8866
8866
  streamOrOptions: Arg,
8867
8867
  options?: {
8868
- readonly log?: boolean | LogLevel | undefined
8868
+ readonly log?: boolean | Severity | undefined
8869
8869
  } | undefined
8870
8870
  ) => [Arg] extends [Stream<infer A, infer _E, infer R>] ? Stream<A, never, R>
8871
8871
  : <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R> = dual(
8872
8872
  (args) => isStream(args[0]),
8873
8873
  <A, E, R>(
8874
8874
  self: Stream<A, E, R>,
8875
- options?: { readonly log?: boolean | LogLevel | undefined } | undefined
8875
+ options?: { readonly log?: boolean | Severity | undefined } | undefined
8876
8876
  ): Stream<A, never, R> => fromChannel(Channel.ignoreCause(self.channel, options))
8877
8877
  )
8878
8878
 
package/src/index.ts CHANGED
@@ -1119,6 +1119,11 @@ export * as Equal from "./Equal.ts"
1119
1119
  */
1120
1120
  export * as Equivalence from "./Equivalence.ts"
1121
1121
 
1122
+ /**
1123
+ * @since 4.0.0
1124
+ */
1125
+ export * as ErrorReporter from "./ErrorReporter.ts"
1126
+
1122
1127
  /**
1123
1128
  * @since 3.16.0
1124
1129
  */