| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -627,6 +627,7 @@ stopHookSet(); | |||
| 627 | 627 | ``` | |
| 628 | 628 | ||
| 629 | 629 | ### `promiseHooks.onInit(init)` | |
| 630 | + | ||
| 630 | 631 | <!-- YAML | |
| 631 | 632 | added: REPLACEME | |
| 632 | 633 | --> | |
@@ -650,6 +651,7 @@ const stop = promiseHooks.onInit((promise, parent) => {}); | |||
| 650 | 651 | ``` | |
| 651 | 652 | ||
| 652 | 653 | ### `promiseHooks.onSettled(settled)` | |
| 654 | + | ||
| 653 | 655 | <!-- YAML | |
| 654 | 656 | added: REPLACEME | |
| 655 | 657 | --> | |
@@ -674,6 +676,7 @@ const stop = promiseHooks.onSettled((promise) => {}); | |||
| 674 | 676 | ``` | |
| 675 | 677 | ||
| 676 | 678 | ### `promiseHooks.onBefore(before)` | |
| 679 | + | ||
| 677 | 680 | <!-- YAML | |
| 678 | 681 | added: REPLACEME | |
| 679 | 682 | --> | |
@@ -698,6 +701,7 @@ const stop = promiseHooks.onBefore((promise) => {}); | |||
| 698 | 701 | ``` | |
| 699 | 702 | ||
| 700 | 703 | ### `promiseHooks.onAfter(after)` | |
| 704 | + | ||
| 701 | 705 | <!-- YAML | |
| 702 | 706 | added: REPLACEME | |
| 703 | 707 | --> | |
@@ -722,6 +726,7 @@ const stop = promiseHooks.onAfter((promise) => {}); | |||
| 722 | 726 | ``` | |
| 723 | 727 | ||
| 724 | 728 | ### `promiseHooks.createHook(callbacks)` | |
| 729 | + | ||
| 725 | 730 | <!-- YAML | |
| 726 | 731 | added: REPLACEME | |
| 727 | 732 | --> | |
@@ -778,7 +783,7 @@ not necessarily ever even be garbage collected. | |||
| 778 | 783 | ||
| 779 | 784 | Because promises are asynchronous resources whose lifecycle is tracked | |
| 780 | 785 | via 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 | ||
| 782 | 787 | promises which would produce an infinite loop. | |
| 783 | 788 | ||
| 784 | 789 | While this API is used to feed promise events into [`async_hooks`][], the | |
| Back | FazBrowse Home | New Git URL |
0 commit comments