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

Function fromWritableStream

packages/effect/src/Sink.ts:288–298  ·  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

286 * @since 4.0.0
287 */
288export const fromWritableStream = <A, E>(options: {
289 readonly evaluate: LazyArg<WritableStream<A>>
290 readonly onError: (error: unknown) => E
291 readonly closeOnDone?: boolean | undefined
292}): Sink<void, A, never, E> =>
293 fromChannel(
294 Channel.mapDone(
295 Channel.fromWritableStream<never, E, A>(options),
296 (_) => [_]
297 )
298 )
299
300/**
301 * 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