MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromWritableStream

Function fromWritableStream

packages/effect/src/Sink.ts:278–288  ·  view source on GitHub ↗
(options: {
  readonly evaluate: LazyArg<WritableStream<A>>
  readonly onError: (error: unknown) => E
  readonly closeOnDone?: boolean | undefined
})

Source from the content-addressed store, hash-verified

276 * @since 4.0.0
277 */
278export const fromWritableStream = <A, E>(options: {
279 readonly evaluate: LazyArg<WritableStream<A>>
280 readonly onError: (error: unknown) => E
281 readonly closeOnDone?: boolean | undefined
282}): Sink<void, A, never, E> =>
283 fromChannel(
284 Channel.mapDone(
285 Channel.fromWritableStream<never, E, A>(options),
286 (_) => [_]
287 )
288 )
289
290/**
291 * Creates a `Sink` from a low-level transform function.

Callers

nothing calls this directly

Calls 1

fromChannelFunction · 0.70

Tested by

no test coverage detected