40 lines
1.6 KiB
Markdown
40 lines
1.6 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [AsyncTracker](./js-utils.asynctracker.md)
|
|
|
|
## AsyncTracker class
|
|
|
|
Async resource tracker using node's internal hooks.
|
|
|
|
This probably won't work in a browser. It does not hold references to the resource, to avoid leaks. Adapted from https://gist.github.com/boneskull/7fe75b63d613fa940db7ec990a5f5843\#file-async-dump-js
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
export declare class AsyncTracker
|
|
```
|
|
|
|
## Constructors
|
|
|
|
| Constructor | Modifiers | Description |
|
|
| --- | --- | --- |
|
|
| [(constructor)()](./js-utils.asynctracker._constructor_.md) | | Constructs a new instance of the <code>AsyncTracker</code> class |
|
|
|
|
## Properties
|
|
|
|
| Property | Modifiers | Type | Description |
|
|
| --- | --- | --- | --- |
|
|
| [filter](./js-utils.asynctracker.filter.md) | | <code>Optional<StackFilter></code> | |
|
|
| [size](./js-utils.asynctracker.size.md) | | <code>number</code> | |
|
|
|
|
## Methods
|
|
|
|
| Method | Modifiers | Description |
|
|
| --- | --- | --- |
|
|
| [clear()](./js-utils.asynctracker.clear.md) | | |
|
|
| [disable()](./js-utils.asynctracker.disable.md) | | |
|
|
| [dump()](./js-utils.asynctracker.dump.md) | | Print a listing of all tracked resources. When debug mode is enabled (DEBUG=TRUE), include stack traces. |
|
|
| [enable()](./js-utils.asynctracker.enable.md) | | |
|
|
| [getStack()](./js-utils.asynctracker.getstack.md) | | Get a filtered version of the current call stack. This creates a new error to generate the stack trace and will be quite slow. |
|
|
|