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 6034638
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 @@ -344,6 +347,7 @@ channel.subscribe((message, name) => {
added:
- v15.1.0
- v14.17.0
deprecated: REPLACEME
changes:
- version:
- v17.1.0
Expand All @@ -353,6 +357,8 @@ changes:
description: Added return value. Added to channels without subscribers.
-->

> 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.channel(name)`]: #diagnostics_channelchannelname
[`diagnostics_channel.subscribe(name, onMessage)`]: #diagnostics_channelsubscribename-onmessage
[`diagnostics_channel.unsubscribe(name, onMessage)`]: #diagnostics_channelunsubscribename-onmessage

0 comments on commit 6034638

Please sign in to comment.