File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Open diff view settings
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -627,6 +627,7 @@ stopHookSet();
627627```
628628
629629### ` promiseHooks.onInit(init) `
630+
630631<!-- YAML
631632added: REPLACEME
632633-->
@@ -650,6 +651,7 @@ const stop = promiseHooks.onInit((promise, parent) => {});
650651```
651652
652653### ` promiseHooks.onSettled(settled) `
654+
653655<!-- YAML
654656added: REPLACEME
655657-->
@@ -674,6 +676,7 @@ const stop = promiseHooks.onSettled((promise) => {});
674676```
675677
676678### ` promiseHooks.onBefore(before) `
679+
677680<!-- YAML
678681added: REPLACEME
679682-->
@@ -698,6 +701,7 @@ const stop = promiseHooks.onBefore((promise) => {});
698701```
699702
700703### ` promiseHooks.onAfter(after) `
704+
701705<!-- YAML
702706added: REPLACEME
703707-->
@@ -722,6 +726,7 @@ const stop = promiseHooks.onAfter((promise) => {});
722726```
723727
724728### ` promiseHooks.createHook(callbacks) `
729+
725730<!-- YAML
726731added: REPLACEME
727732-->
@@ -778,7 +783,7 @@ not necessarily ever even be garbage collected.
778783
779784Because promises are asynchronous resources whose lifecycle is tracked
780785via the promise hooks mechanism, the ` init() ` , ` before() ` , ` after() ` , and
781- ` settled() ` callbacks * must not * be async functions as they create more
786+ ` settled() ` callbacks _ must not _ be async functions as they create more
782787promises which would produce an infinite loop.
783788
784789While this API is used to feed promise events into [ ` async_hooks ` ] [ ] , the
You can’t perform that action at this time.
0 commit comments