Skip to content

Commit 44b6927

Browse files
tony-godanielleadams
authored andcommitted
doc: add note about resource type in async_hooks
PR-URL: #41797 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
1 parent 1be701c commit 44b6927

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/api/async_hooks.md

+5
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ The `type` is a string identifying the type of resource that caused
329329
`init` to be called. Generally, it will correspond to the name of the
330330
resource's constructor.
331331

332+
Valid values are:
333+
332334
```text
333335
FSEVENTWRAP, FSREQCALLBACK, GETADDRINFOREQWRAP, GETNAMEINFOREQWRAP, HTTPINCOMINGMESSAGE,
334336
HTTPCLIENTREQUEST, JSSTREAM, PIPECONNECTWRAP, PIPEWRAP, PROCESSWRAP, QUERYWRAP,
@@ -337,6 +339,9 @@ TTYWRAP, UDPSENDWRAP, UDPWRAP, WRITEWRAP, ZLIB, SSLCONNECTION, PBKDF2REQUEST,
337339
RANDOMBYTESREQUEST, TLSWRAP, Microtask, Timeout, Immediate, TickObject
338340
```
339341

342+
These values can change in any Node.js release. Furthermore users of [`AsyncResource`][]
343+
likely provide other values.
344+
340345
There is also the `PROMISE` resource type, which is used to track `Promise`
341346
instances and asynchronous work scheduled by them.
342347

0 commit comments

Comments
 (0)