ChannelReceiveResult
import { ChannelReceiveResult } from "jsr:@ende/async";type alias
type ChannelReceiveResult<T> = { state: "ok"; value: T } | { state: "empty" } | { state: "closed" }Result of a non-blocking Channel.tryReceive call. Discriminate
on the state field:
"ok"— a value was available and is provided invalue."empty"— the channel is open but no value is immediately available."closed"— the channel has been closed and no buffered values remain.