Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/channel/custom/index.ts>Channel.Config

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface Channel.Config
import { type Channel } from "https://deno.land/x/rimbu@1.1.0/channel/custom/index.ts";
const { Config } = Channel;

The configuration options for creating a Channel.

Properties

optional
capacity: number | undefined

Tha channel capacity, indicating the amount of messages a channel will buffer before sending to the channel will block.

optional
validator: ((value: any) => boolean) | undefined

A validation function that is used when sending values. If the provided value returns true, the value is valid and will be sent. If the value is false, an exception will be thrown.