@effect-ts/system
Version:
Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.
14 lines (11 loc) • 330 B
text/typescript
// ets_tracing: off
import * as CH from "../Channel/index.js"
import * as C from "./core.js"
/**
* Returns a sink that executes a total effect and ends with its result.
*/
export function succeedWith<A>(
effect: () => A
): C.Sink<unknown, unknown, unknown, never, unknown, A> {
return new C.Sink(CH.succeedWith(effect))
}