From 5267f719c73c70b76b1fbbe7af12438932615a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20P=C3=89RONNET?= Date: Wed, 8 Jan 2025 13:51:47 +0100 Subject: [PATCH] doc(runtime-apis/diagnostics-channel) fix code block syntax --- .../docs/workers/runtime-apis/nodejs/diagnostics-channel.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/docs/workers/runtime-apis/nodejs/diagnostics-channel.mdx b/src/content/docs/workers/runtime-apis/nodejs/diagnostics-channel.mdx index da887a8341bf193..76ff5baeb874d85 100644 --- a/src/content/docs/workers/runtime-apis/nodejs/diagnostics-channel.mdx +++ b/src/content/docs/workers/runtime-apis/nodejs/diagnostics-channel.mdx @@ -10,8 +10,6 @@ import { Render } from "~/components" The [`diagnostics_channel`](https://nodejs.org/dist/latest-v20.x/docs/api/diagnostics_channel.html) module provides an API to create named channels to report arbitrary message data for diagnostics purposes. The API is essentially a simple event pub/sub model that is specifically designed to support low-overhead diagnostics reporting. -````js - ```js import { channel, @@ -32,7 +30,7 @@ myChannel.publish({ foo: 'bar' }); subscribe('my-channel', (message) => { console.log(message); }); -```` +``` All `Channel` instances are singletons per each Isolate/context (for example, the same entry point). Subscribers are always invoked synchronously and in the order they were registered, much like an `EventTarget` or Node.js `EventEmitter` class.