doc: add documentation deprecation for process._tickCallback

This change also supports --pending-deprecation for the new deprecation.

PR-URL: https://github.com/nodejs/node/pull/29781
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Lucas Holmquist 2019-09-30 13:56:26 -04:00 committed by Rich Trott
parent 420d4e461d
commit 83418b593f
2 changed files with 17 additions and 0 deletions

View File

@ -2519,6 +2519,19 @@ Type: Documentation-only
Prefer [`response.socket`][] over [`response.connection`] and
[`request.socket`][] over [`request.connection`].
<a id="DEP0XXX"></a>
### DEP0XXX: process._tickCallback
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/29781
description: Documentation-only deprecation.
-->
Type: Documentation-only (supports [`--pending-deprecation`][])
The `process._tickCallback` property was never documented as
an officially supported API.
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size

View File

@ -271,6 +271,10 @@ function initializeDeprecations() {
process.binding = deprecate(process.binding,
'process.binding() is deprecated. ' +
'Please use public APIs instead.', 'DEP0111');
process._tickCallback = deprecate(process._tickCallback,
'process._tickCallback() is deprecated',
'DEP0XXX');
}
// Create global.process and global.Buffer as getters so that we have a