Package: effect
Module: Channel
Represents a Channel that emits no elements.
Example (Creating empty channels)
import { Channel } from "effect"
// Create an empty channel
const emptyChannel = Channel.empty
// Use empty channel in composition
const combined = Channel.concatWith(emptyChannel, () => Channel.succeed(42))
// Will immediately provide the second channel's output
// Empty channel can be used as a no-op in conditional logic
const conditionalChannel = (shouldEmit: boolean) =>
shouldEmit ? Channel.succeed("data") : Channel.empty
Signature
declare const empty: Channel<never, never, void, unknown, unknown, unknown, never>
Since v4.0.0