src/nodejs/jsdiagnostics_channel

Types

Channel = ref object of JsRoot
  hasSubscribers*: bool      ## https://nodejs.org/api/diagnostics_channel.html#diagnostics_channel_channel_hassubscribers
  
https://nodejs.org/api/diagnostics_channel.html#diagnostics_channel_class_channel

Procs

func hasSubscribers(name: cstring): bool {.
    importjs: "diagnostics_channel.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/diagnostics_channel.html#diagnostics_channel_diagnostics_channel_hassubscribers_name
func importDiagnosticsChannel() {.importjs: "import * as diagnostics_channel from \'diagnostics_channel\'@",
                                  ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func publish(self: Channel; message: auto): bool {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/diagnostics_channel.html#diagnostics_channel_channel_publish_message
func requireDiagnosticsChannel() {.importjs: "const diagnostics_channel = require(\'diagnostics_channel\')@",
                                   ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func subscribe[T](self: Channel; onMessage: T) {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/diagnostics_channel.html#diagnostics_channel_channel_subscribe_onmessage
func unsubscribe[T](self: Channel; onMessage: T) {.importjs: "#.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/diagnostics_channel.html#diagnostics_channel_channel_unsubscribe_onmessage