HookCallbacks
[<Interface>]
type HookCallbacks =
abstract member after: After option with get, set
abstract member before: Before option with get, set
abstract member init: Init option with get, set
abstract member settled: Settled option with get, set
static member Create (?init: Init, ?before: Before, ?after: After, ?settled: Settled) : HookCallbacks| Assembly | Xantham.Fable.Node |
| Attributes | [<Interface>] |
Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or around an await, and when the promise resolves or rejects.
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 promises which would produce an infinite loop.
@since v17.1.0, v16.14.0
Properties
abstract member after: After option with get, setabstract member before: Before option with get, setabstract member settled: Settled option with get, set