Skip to content

Commit

Permalink
doc: deprecate diagnostics_channel object subscribe method
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Belanger committed May 31, 2022
1 parent de5896b commit beb556e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/api/diagnostics_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,11 @@ channel.publish({
added:
- v15.1.0
- v14.17.0
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated: Use [`diagnostics_channel.subscribe(name, onMessage)`][]
* `onMessage` {Function} The handler to receive channel messages
* `message` {any} The message data
* `name` {string|symbol} The name of the channel
Expand Down Expand Up @@ -351,8 +354,11 @@ changes:
- v14.19.0
pr-url: https://github.com/nodejs/node/pull/40433
description: Added return value. Added to channels without subscribers.
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated: Use [`diagnostics_channel.unsubscribe(name, onMessage)`][]
* `onMessage` {Function} The previous subscribed handler to remove
* Returns: {boolean} `true` if the handler was found, `false` otherwise.

Expand Down Expand Up @@ -389,5 +395,6 @@ channel.unsubscribe(onMessage);

[`'uncaughtException'`]: process.md#event-uncaughtexception
[`channel.subscribe(onMessage)`]: #channelsubscribeonmessage
[`diagnostics_channel.subscribe(name, onMessage)`]: #diagnostics_channelunsubscribename_onmessage
[`diagnostics_channel.subscribe(name, onMessage)`]: #diagnostics_channelsubscribename-onmessage
[`diagnostics_channel.unsubscribe(name, onMessage)`]: #diagnostics_channelunsubscribename-onmessage
[`diagnostics_channel.channel(name)`]: #diagnostics_channelchannelname

0 comments on commit beb556e

Please sign in to comment.