Skip to content

HookCallbacks

[<Interface>]
type HookCallbacks =
    abstract member after: (float -> unit) option with get, set
    abstract member before: (float -> unit) option with get, set
    abstract member destroy: (float -> unit) option with get, set
    abstract member init: Init option with get, set
    abstract member promiseResolve: (float -> unit) option with get, set
    static member Create (?init: Init, ?before: (float -> unit), ?after: (float -> unit), ?promiseResolve: (float -> unit), ?destroy: (float -> unit)) : HookCallbacks
AssemblyXantham.Fable.Node
Attributes[<Interface>]

Properties

abstract member after: (float -> unit) option with get, set

Called immediately after the callback specified in before is completed.

If an uncaught exception occurs during execution of the callback, then after will run after the 'uncaughtException' event is emitted or a domain's handler runs.

Parameter
asyncIdthe unique identifier assigned to the resource which has executed the callback.
abstract member before: (float -> unit) option with get, set

When an asynchronous operation is initiated or completes a callback is called to notify the user. The before callback is called just before said callback is executed.

Parameter
asyncIdthe unique identifier assigned to the resource about to execute the callback.
abstract member destroy: (float -> unit) option with get, set

Called after the resource corresponding to asyncId is destroyed

Parameter
asyncIda unique ID for the async resource
abstract member init: Init option with get, set

Called when a class is constructed that has the possibility to emit an asynchronous event.

Parameter
asyncIdA unique ID for the async resource
typeThe type of the async resource
triggerAsyncIdThe unique ID of the async resource in whose execution context this async resource was created
resourceReference to the resource representing the async operation, needs to be released during destroy
abstract member promiseResolve: (float -> unit) option with get, set

Called when a promise has resolve() called. This may not be in the same execution id as the promise itself.

Parameter
asyncIdthe unique id for the promise that was resolve()d.

Methods

static member Create (?init: Init, ?before: (float -> unit), ?after: (float -> unit), ?promiseResolve: (float -> unit), ?destroy: (float -> unit)) : HookCallbacks