mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
async_hooks,doc: some async_hooks improvements
Update docs and type checking for AsyncResource type PR-URL: https://github.com/nodejs/node/pull/15103 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
parent
8f52ccc828
commit
d8a0364ad5
5 changed files with 128 additions and 54 deletions
|
@ -15,7 +15,7 @@ async_hooks.createHook({
|
|||
assert.throws(() => {
|
||||
return new AsyncResource();
|
||||
}, common.expectsError({
|
||||
code: 'ERR_ASYNC_TYPE',
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
type: TypeError,
|
||||
}));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue