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
Copy file name to clipboardExpand all lines: types/node/v24/domain.d.ts
+8-12Lines changed: 8 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,9 @@ declare module "domain" {
24
24
*/
25
25
classDomainextendsEventEmitter{
26
26
/**
27
-
* An array of timers and event emitters that have been explicitly added
28
-
* to the domain.
27
+
* An array of event emitters that have been explicitly added to the domain.
29
28
*/
30
-
members: Array<EventEmitter|NodeJS.Timer>;
29
+
members: EventEmitter[];
31
30
/**
32
31
* The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly
33
32
* pushes the domain onto the domain
@@ -91,20 +90,17 @@ declare module "domain" {
91
90
* will be routed to the domain's `'error'` event, just like with implicit
92
91
* binding.
93
92
*
94
-
* This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
95
-
* the domain `'error'` handler.
96
-
*
97
-
* If the Timer or `EventEmitter` was already bound to a domain, it is removed
98
-
* from that one, and bound to this one instead.
99
-
* @param emitter emitter or timer to be added to the domain
93
+
* If the `EventEmitter` was already bound to a domain, it is removed from that
94
+
* one, and bound to this one instead.
95
+
* @param emitter emitter to be added to the domain
100
96
*/
101
-
add(emitter: EventEmitter|NodeJS.Timer): void;
97
+
add(emitter: EventEmitter): void;
102
98
/**
103
99
* The opposite of {@link add}. Removes domain handling from the
104
100
* specified emitter.
105
-
* @param emitter emitter or timer to be removed from the domain
101
+
* @param emitter emitter to be removed from the domain
106
102
*/
107
-
remove(emitter: EventEmitter|NodeJS.Timer): void;
103
+
remove(emitter: EventEmitter): void;
108
104
/**
109
105
* The returned function will be a wrapper around the supplied callback
110
106
* function. When the returned function is called, any errors that are
Copy file name to clipboardExpand all lines: types/node/v24/process.d.ts
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -608,7 +608,8 @@ declare module "process" {
608
608
* arguments passed when the Node.js process was launched. The first element will
609
609
* be {@link execPath}. See `process.argv0` if access to the original value
610
610
* of `argv[0]` is needed. The second element will be the path to the JavaScript
611
-
* file being executed. The remaining elements will be any additional command-line
611
+
* file being executed. If a [program entry point](https://nodejs.org/docs/latest-v24.x/api/cli.html#program-entry-point) was provided, the second element
612
+
* will be the absolute path to it. The remaining elements are additional command-line
612
613
* arguments.
613
614
*
614
615
* For example, assuming the following script for `process-args.js`:
@@ -1740,6 +1741,24 @@ declare module "process" {
1740
1741
*/
1741
1742
readonlyrelease: ProcessRelease;
1742
1743
readonlyfeatures: ProcessFeatures;
1744
+
/**
1745
+
* The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
1746
+
* is set on the current Node.js process. This property allows programmatic control over the
1747
+
* tracing of warnings, enabling or disabling stack traces for warnings at runtime.
1748
+
*
1749
+
* ```js
1750
+
* // Enable trace warnings
1751
+
* process.traceProcessWarnings = true;
1752
+
*
1753
+
* // Emit a warning with a stack trace
1754
+
* process.emitWarning('Warning with stack trace');
0 commit comments