Skip to content

Commit bdc175c

Browse files
doc: deprecate utilisNativeError in favor of ErrorisError
1 parent 6710c00 commit bdc175c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

doc/api/deprecations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3904,6 +3904,20 @@ of built-in modules. This was incomplete and matched the already deprecated
39043904
`repl._builtinLibs` ([DEP0142][]) instead it's better to rely
39053905
upon `require('node:module').builtinModules`.
39063906

3907+
### DEP0192: `util.types.isNativeError()`
3908+
3909+
<!-- YAML
3910+
changes:
3911+
- version:
3912+
- REPLACEME
3913+
pr-url: https://github.com/nodejs/node/pull/000000
3914+
description: Documentation-only deprecation.
3915+
-->
3916+
3917+
Type: Documentation-only
3918+
3919+
The [`util.types.isNativeError`][] API is deprecated. Please use [`Error.isError`][] instead.
3920+
39073921
[DEP0142]: #dep0142-repl_builtinlibs
39083922
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
39093923
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -3921,6 +3935,7 @@ upon `require('node:module').builtinModules`.
39213935
[`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj
39223936
[`Cipheriv`]: crypto.md#class-cipheriv
39233937
[`Decipheriv`]: crypto.md#class-decipheriv
3938+
[`Error.isError`]: https://github.com/tc39/proposal-is-error
39243939
[`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
39253940
[`ReadStream.open()`]: fs.md#class-fsreadstream
39263941
[`Server.getConnections()`]: net.md#servergetconnectionscallback
@@ -4032,6 +4047,7 @@ upon `require('node:module').builtinModules`.
40324047
[`util.isArray()`]: util.md#utilisarrayobject
40334048
[`util.promisify`]: util.md#utilpromisifyoriginal
40344049
[`util.toUSVString()`]: util.md#utiltousvstringstring
4050+
[`util.types.isNativeError`]: util.md#utiltypesisnativeerrorvalue
40354051
[`util.types`]: util.md#utiltypes
40364052
[`util`]: util.md
40374053
[`worker.exitedAfterDisconnect`]: cluster.md#workerexitedafterdisconnect

doc/api/util.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3319,8 +3319,11 @@ util.types.isModuleNamespaceObject(ns); // Returns true
33193319
33203320
<!-- YAML
33213321
added: v10.0.0
3322+
deprecated: REPLACEME
33223323
-->
33233324
3325+
> Stability: 0 - Deprecated: Use [`Error.isError`][] instead.
3326+
33243327
* `value` {any}
33253328
* Returns: {boolean}
33263329
@@ -3707,6 +3710,7 @@ util.isArray({});
37073710
[`'warning'`]: process.md#event-warning
37083711
[`Array.isArray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
37093712
[`ArrayBuffer.isView()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
3713+
[`Error.isError`]: https://github.com/tc39/proposal-is-error
37103714
[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
37113715
[`MIMEparams`]: #class-utilmimeparams
37123716
[`Object.assign()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign

0 commit comments

Comments
 (0)