| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -625,6 +625,7 @@ stopHookSet(); | |||
| 625 | 625 | ``` | |
| 626 | 626 | ||
| 627 | 627 | ### `promiseHooks.onInit(init)` | |
| 628 | + | ||
| 628 | 629 | <!-- YAML | |
| 629 | 630 | added: REPLACEME | |
| 630 | 631 | --> | |
@@ -648,6 +649,7 @@ const stop = promiseHooks.onInit((promise, parent) => {}); | |||
| 648 | 649 | ``` | |
| 649 | 650 | ||
| 650 | 651 | ### `promiseHooks.onSettled(settled)` | |
| 652 | + | ||
| 651 | 653 | <!-- YAML | |
| 652 | 654 | added: REPLACEME | |
| 653 | 655 | --> | |
@@ -672,6 +674,7 @@ const stop = promiseHooks.onSettled((promise) => {}); | |||
| 672 | 674 | ``` | |
| 673 | 675 | ||
| 674 | 676 | ### `promiseHooks.onBefore(before)` | |
| 677 | + | ||
| 675 | 678 | <!-- YAML | |
| 676 | 679 | added: REPLACEME | |
| 677 | 680 | --> | |
@@ -696,6 +699,7 @@ const stop = promiseHooks.onBefore((promise) => {}); | |||
| 696 | 699 | ``` | |
| 697 | 700 | ||
| 698 | 701 | ### `promiseHooks.onAfter(after)` | |
| 702 | + | ||
| 699 | 703 | <!-- YAML | |
| 700 | 704 | added: REPLACEME | |
| 701 | 705 | --> | |
@@ -720,6 +724,7 @@ const stop = promiseHooks.onAfter((promise) => {}); | |||
| 720 | 724 | ``` | |
| 721 | 725 | ||
| 722 | 726 | ### `promiseHooks.createHook(callbacks)` | |
| 727 | + | ||
| 723 | 728 | <!-- YAML | |
| 724 | 729 | added: REPLACEME | |
| 725 | 730 | --> | |
@@ -776,7 +781,7 @@ not necessarily ever even be garbage collected. | |||
| 776 | 781 | ||
| 777 | 782 | Because promises are asynchronous resources whose lifecycle is tracked | |
| 778 | 783 | via the promise hooks mechanism, the `init()`, `before()`, `after()`, and | |
| 779 | - `settled()` callbacks *must not* be async functions as they create more | ||
| 784 | + `settled()` callbacks _must not_ be async functions as they create more | ||
| 780 | 785 | promises which would produce an infinite loop. | |
| 781 | 786 | ||
| 782 | 787 | While this API is used to feed promise events into [`async_hooks`][], the | |
| Back | FazBrowse Home | New Git URL |
0 commit comments