Open
Description
Currently, the AsyncResource
constructor requires a type
argument, e.g. new AsyncResource('foo')
. It will throw if this is not provided. This information, however, is only used for async_hooks integration and is not necessary for async context propagation. I'd like to propose that we make the argument optional, defaulting its value to this.constructor?.name || 'AsyncResource'
when it is not provided.
/cc @Qard @legendecas @nodejs/async_hooks