diff --git a/doc/api/v8.md b/doc/api/v8.md index 2ab3d387893167..6671f0e945fab1 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -627,6 +627,7 @@ stopHookSet(); ``` ### `promiseHooks.onInit(init)` + @@ -650,6 +651,7 @@ const stop = promiseHooks.onInit((promise, parent) => {}); ``` ### `promiseHooks.onSettled(settled)` + @@ -674,6 +676,7 @@ const stop = promiseHooks.onSettled((promise) => {}); ``` ### `promiseHooks.onBefore(before)` + @@ -698,6 +701,7 @@ const stop = promiseHooks.onBefore((promise) => {}); ``` ### `promiseHooks.onAfter(after)` + @@ -722,6 +726,7 @@ const stop = promiseHooks.onAfter((promise) => {}); ``` ### `promiseHooks.createHook(callbacks)` + @@ -778,7 +783,7 @@ not necessarily ever even be garbage collected. Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and -`settled()` callbacks *must not* be async functions as they create more +`settled()` callbacks _must not_ be async functions as they create more promises which would produce an infinite loop. While this API is used to feed promise events into [`async_hooks`][], the