GeezerVison is showing github.com — doc: add note about resource type in async_hooks · nodejs/node@064783c
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: doc/api/async_hooks.md +5Lines changed: 5 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -329,6 +329,8 @@ The `type` is a string identifying the type of resource that caused | 329 | 329 | `init` to be called. Generally, it will correspond to the name of the | 330 | 330 | resource's constructor. | 331 | 331 |
| | 332 | +Valid values are: | | 333 | + | 332 | 334 | ```text | 333 | 335 | FSEVENTWRAP, FSREQCALLBACK, GETADDRINFOREQWRAP, GETNAMEINFOREQWRAP, HTTPINCOMINGMESSAGE, | 334 | 336 | HTTPCLIENTREQUEST, JSSTREAM, PIPECONNECTWRAP, PIPEWRAP, PROCESSWRAP, QUERYWRAP, | @@ -337,6 +339,9 @@ TTYWRAP, UDPSENDWRAP, UDPWRAP, WRITEWRAP, ZLIB, SSLCONNECTION, PBKDF2REQUEST, | 337 | 339 | RANDOMBYTESREQUEST, TLSWRAP, Microtask, Timeout, Immediate, TickObject | 338 | 340 | ``` | 339 | 341 |
| | 342 | +These values can change in any Node.js release. Furthermore users of [`AsyncResource`][] | | 343 | +likely provide other values. | | 344 | + | 340 | 345 | There is also the `PROMISE` resource type, which is used to track `Promise` | 341 | 346 | instances and asynchronous work scheduled by them. | 342 | 347 |
| |
|