Skip to main content
Channel.prototype.publish - node__diagnostics_channel.d.ts - Node documentation
method Channel.prototype.publish

Usage in Deno

```typescript import { Channel } from "node:node__diagnostics_channel.d.ts"; ```
Channel.prototype.publish(message: unknown): void
Publish a message to any subscribers to the channel. This will trigger message handlers synchronously so they will execute within the same context. ```js import diagnostics_channel from 'node:diagnostics_channel'; const channel = diagnostics_channel.channel('my-channel'); channel.publish({ some: 'message', }); ```

Parameters

message: unknown
The message to send to the channel subscribers

Return Type

void