Back to Trilium

Interface EventEmitterAsyncResourceOptions

docs/Script API/interfaces/Backend_Script_API._internal_.EventEmitter.EventEmitterAsyncResourceOptions.html

0.102.22.1 KB
Original Source

Interface EventEmitterAsyncResourceOptions

interface EventEmitterAsyncResourceOptions {
captureRejections?: boolean;
name?: string;
requireManualDestroy?: boolean;
triggerAsyncId?: number;
}

Hierarchy (View Summary)

Index

Properties

captureRejections?name?requireManualDestroy?triggerAsyncId?

Properties

OptionalcaptureRejections

captureRejections?: boolean

Enables automatic capturing of promise rejection.

Optionalname

name?: string

The type of async event, this is required when instantiating EventEmitterAsyncResource directly rather than as a child class.

Default

new.target.name if instantiated as a child class.Copy

OptionalrequireManualDestroy

requireManualDestroy?: boolean

Disables automatic emitDestroy when the object is garbage collected. This usually does not need to be set (even if emitDestroy is called manually), unless the resource's asyncId is retrieved and the sensitive API's emitDestroy is called with it.

Default

falseCopy

OptionaltriggerAsyncId

triggerAsyncId?: number

The ID of the execution context that created this async event.

Default

executionAsyncId()Copy

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Properties captureRejectionsnamerequireManualDestroytriggerAsyncId