channel

external fun channel(name: String): Channel<*, *>(source)
external fun channel(name: Symbol): Channel<*, *>(source)

This is the primary entry-point for anyone wanting to publish to a named channel. It produces a channel object which is optimized to reduce overhead at publish time as much as possible.

import diagnostics_channel from 'node:diagnostics_channel';

const channel = diagnostics_channel.channel('my-channel');

Since

v15.1.0, v14.17.0

Return

The named channel object

Parameters

name

The channel name