Skip to content

Commit 3f076dd

Browse files
tony-goVoltrexKeyva
authored andcommitted
doc: add note about resource type in async_hooks
PR-URL: nodejs#41797 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]>
1 parent b8c21d9 commit 3f076dd

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)