---
title: "EventEmitterAsyncResourceOptions | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface EventEmitterAsyncResourceOptions

interface EventEmitterAsyncResourceOptions {  
    [captureRejections](#capturerejections)?: boolean;  
    [name](#name)?: string;  
    [requireManualDestroy](#requiremanualdestroy)?: boolean;  
    [triggerAsyncId](#triggerasyncid)?: number;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.EventEmitter.EventEmitterAsyncResourceOptions))

-   [AsyncResourceOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AsyncResourceOptions/)
-   [EventEmitterOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.EventEmitterOptions/)
    -   EventEmitterAsyncResourceOptions

##### Index

### Properties[](#properties)

[captureRejections?](#capturerejections) [name?](#name) [requireManualDestroy?](#requiremanualdestroy) [triggerAsyncId?](#triggerasyncid)

## Properties[](#properties-1)

### `Optional`captureRejections[](#capturerejections)

captureRejections?: boolean

It enables [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v25.x/api/events.html#capture-rejections-of-promises).

#### Default[](#default)

```typescript
false
```

Inherited from [EventEmitterOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.EventEmitterOptions/).[captureRejections](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.EventEmitterOptions/#capturerejections)

### `Optional`name[](#name)

name?: string

The type of async event.

#### Default[](#default-1)

```typescript
new.target.name
```

### `Optional`requireManualDestroy[](#requiremanualdestroy)

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[](#default-2)

```typescript
false
```

Inherited from [AsyncResourceOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AsyncResourceOptions/).[requireManualDestroy](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AsyncResourceOptions/#requiremanualdestroy)

### `Optional`triggerAsyncId[](#triggerasyncid)

triggerAsyncId?: number

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

#### Default[](#default-3)

```typescript
executionAsyncId()
```

Inherited from [AsyncResourceOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AsyncResourceOptions/).[triggerAsyncId](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.AsyncResourceOptions/#triggerasyncid)
