Package: effect
Module: Stream
Terminates with the specified error.
Example
import { Effect, Stream } from "effect"
const stream = Stream.fail("Uh oh!")
Effect.runPromiseExit(Stream.runCollect(stream)).then(console.log)
// {
// _id: 'Exit',
// _tag: 'Failure',
// cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' }
// }
Signature
declare const fail: <E>(error: E) => Stream<never, E>
Since v2.0.0