mirror of
https://github.com/Effect-TS/effect.git
synced 2026-11-23 17:35:14 +08:00
add Stream halt()
This commit is contained in:
committed by
Michael Arnaldi
parent
af4acff4da
commit
04dcafe0b3
@@ -0,0 +1,10 @@
|
||||
import type { Cause } from "../../Cause"
|
||||
import { halt as haltEff } from "../../Effect/core"
|
||||
import { flow } from "../../Function"
|
||||
import type { SyncE } from "./definitions"
|
||||
import { fromEffect } from "./fromEffect"
|
||||
|
||||
/**
|
||||
* The stream that always halts with `cause`.
|
||||
*/
|
||||
export const halt: <E>(cause: Cause<E>) => SyncE<E, never> = flow(haltEff, fromEffect)
|
||||
@@ -37,6 +37,7 @@ export * from "./fromEffectOption"
|
||||
export * from "./fromQueue"
|
||||
export * from "./fromQueueWithShutdown"
|
||||
export * from "./fromSchedule"
|
||||
export * from "./halt"
|
||||
export * from "./iterate"
|
||||
export * from "./managed"
|
||||
export * from "./map"
|
||||
|
||||
Reference in New Issue
Block a user