Hyperlinkv0.8.0-beta.28

Channel

Channel.emptyconsteffect/Channel.ts:890
Channel<never, never, void, unknown, unknown, unknown, never>

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
constructors
Source effect/Channel.ts:8901 lines
export const empty: Channel<never> = fromPull(Effect.succeed(Cause.done()))
Referenced by 3 symbols