You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* When an asynchronous operation is initiated or completes a callback is called to notify the user.
135
-
* The before callback is called just before said callback is executed.
136
-
* @param asyncId the unique identifier assigned to the resource about to execute the callback.
130
+
* The [`before` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#beforeasyncid).
137
131
*/
138
132
before?(asyncId: number): void;
139
133
/**
140
-
* Called immediately after the callback specified in `before` is completed.
141
-
*
142
-
* 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.
143
-
* @param asyncId the unique identifier assigned to the resource which has executed the callback.
134
+
* The [`after` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#afterasyncid).
144
135
*/
145
136
after?(asyncId: number): void;
146
137
/**
147
-
* Called when a promise has resolve() called. This may not be in the same execution id
148
-
* as the promise itself.
149
-
* @param asyncId the unique id for the promise that was resolve()d.
138
+
* The [`promiseResolve` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promiseresolveasyncid).
150
139
*/
151
140
promiseResolve?(asyncId: number): void;
152
141
/**
153
-
* Called after the resource corresponding to asyncId is destroyed
154
-
* @param asyncId a unique ID for the async resource
142
+
* The [`destroy` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#destroyasyncid).
155
143
*/
156
144
destroy?(asyncId: number): void;
145
+
/**
146
+
* Whether the hook should track `Promise`s. Cannot be `false` if
0 commit comments