Skip to content

Commit ac4fd1e

Browse files
doc: deprecate utilisNativeError in favor of ErrorisError
1 parent 6160108 commit ac4fd1e

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
@@ -4013,6 +4013,20 @@ To make [`child_process.exec`][] invoke the default shell, either omit the
40134013
`shell` option, or set it to a nullish value. If the intention is not to invoke
40144014
a shell, use [`child_process.execFile`][] instead.
40154015

4016+
### DEP0197: `util.types.isNativeError()`
4017+
4018+
<!-- YAML
4019+
changes:
4020+
- version:
4021+
- REPLACEME
4022+
pr-url: https://github.com/nodejs/node/pull/58262
4023+
description: Documentation-only deprecation.
4024+
-->
4025+
4026+
Type: Documentation-only
4027+
4028+
The [`util.types.isNativeError`][] API is deprecated. Please use [`Error.isError`][] instead.
4029+
40164030
[DEP0142]: #dep0142-repl_builtinlibs
40174031
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
40184032
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -4031,6 +4045,7 @@ a shell, use [`child_process.execFile`][] instead.
40314045
[`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj
40324046
[`Cipheriv`]: crypto.md#class-cipheriv
40334047
[`Decipheriv`]: crypto.md#class-decipheriv
4048+
[`Error.isError`]: https://github.com/tc39/proposal-is-error
40344049
[`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
40354050
[`ReadStream.open()`]: fs.md#class-fsreadstream
40364051
[`Server.getConnections()`]: net.md#servergetconnectionscallback
@@ -4143,6 +4158,7 @@ a shell, use [`child_process.execFile`][] instead.
41434158
[`util.isArray()`]: util.md#utilisarrayobject
41444159
[`util.promisify`]: util.md#utilpromisifyoriginal
41454160
[`util.toUSVString()`]: util.md#utiltousvstringstring
4161+
[`util.types.isNativeError`]: util.md#utiltypesisnativeerrorvalue
41464162
[`util.types`]: util.md#utiltypes
41474163
[`util`]: util.md
41484164
[`worker.exitedAfterDisconnect`]: cluster.md#workerexitedafterdisconnect

doc/api/util.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3328,8 +3328,11 @@ util.types.isModuleNamespaceObject(ns); // Returns true
33283328
33293329
<!-- YAML
33303330
added: v10.0.0
3331+
deprecated: REPLACEME
33313332
-->
33323333
3334+
> Stability: 0 - Deprecated: Use [`Error.isError`][] instead.
3335+
33333336
* `value` {any}
33343337
* Returns: {boolean}
33353338
@@ -3716,6 +3719,7 @@ util.isArray({});
37163719
[`'warning'`]: process.md#event-warning
37173720
[`Array.isArray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
37183721
[`ArrayBuffer.isView()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
3722+
[`Error.isError`]: https://github.com/tc39/proposal-is-error
37193723
[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
37203724
[`MIMEparams`]: #class-utilmimeparams
37213725
[`Object.assign()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign

0 commit comments

Comments
 (0)