From 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 四月 2026 11:46:41 +0800
Subject: [PATCH] 推送
---
node_modules/@types/node/process.d.ts | 98 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 88 insertions(+), 10 deletions(-)
diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts
index b3082eb..ea50c94 100644
--- a/node_modules/@types/node/process.d.ts
+++ b/node_modules/@types/node/process.d.ts
@@ -1,6 +1,5 @@
declare module "node:process" {
import { Control, MessageOptions, SendHandle } from "node:child_process";
- import { InternalEventEmitter } from "node:events";
import { PathLike } from "node:fs";
import * as tty from "node:tty";
import { Worker } from "node:worker_threads";
@@ -254,7 +253,7 @@
/**
* A value that is `"strip"` by default,
* `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
- * Node.js is run with `--no-experimental-strip-types`.
+ * Node.js is run with `--no-strip-types`.
* @since v22.10.0
*/
readonly typescript: "strip" | "transform" | false;
@@ -466,12 +465,7 @@
isTTY?: true | undefined;
}
// Alias for compatibility
- interface ProcessEnv extends Dict<string> {
- /**
- * Can be used to change the default timezone at runtime
- */
- TZ?: string | undefined;
- }
+ interface ProcessEnv extends Dict<string> {}
interface HRTime {
/**
* This is the legacy version of {@link process.hrtime.bigint()}
@@ -595,6 +589,11 @@
*/
reportOnUncaughtException: boolean;
/**
+ * If true, a diagnostic report is generated without the environment variables.
+ * @default false
+ */
+ excludeEnv: boolean;
+ /**
* The signal used to trigger the creation of a diagnostic report.
* @default 'SIGUSR2'
*/
@@ -682,7 +681,7 @@
readonly visibility: string;
};
}
- interface Process extends InternalEventEmitter<ProcessEventMap> {
+ interface Process extends EventEmitter {
/**
* The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
* a `Writable` stream.
@@ -730,7 +729,8 @@
* arguments passed when the Node.js process was launched. The first element will
* be {@link execPath}. See `process.argv0` if access to the original value
* of `argv[0]` is needed. The second element will be the path to the JavaScript
- * file being executed. The remaining elements will be any additional command-line
+ * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v25.x/api/cli.html#program-entry-point) was provided, the second element
+ * will be the absolute path to it. The remaining elements are additional command-line
* arguments.
*
* For example, assuming the following script for `process-args.js`:
@@ -1863,6 +1863,24 @@
readonly release: ProcessRelease;
readonly features: ProcessFeatures;
/**
+ * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
+ * is set on the current Node.js process. This property allows programmatic control over the
+ * tracing of warnings, enabling or disabling stack traces for warnings at runtime.
+ *
+ * ```js
+ * // Enable trace warnings
+ * process.traceProcessWarnings = true;
+ *
+ * // Emit a warning with a stack trace
+ * process.emitWarning('Warning with stack trace');
+ *
+ * // Disable trace warnings
+ * process.traceProcessWarnings = false;
+ * ```
+ * @since v6.10.0
+ */
+ traceProcessWarnings: boolean;
+ /**
* `process.umask()` returns the Node.js process's file mode creation mask. Child
* processes inherit the mask from the parent process.
* @since v0.1.19
@@ -1906,6 +1924,15 @@
sendHandle?: SendHandle,
options?: MessageOptions,
callback?: (error: Error | null) => void,
+ ): boolean;
+ send?(
+ message: any,
+ sendHandle: SendHandle,
+ callback?: (error: Error | null) => void,
+ ): boolean;
+ send?(
+ message: any,
+ callback: (error: Error | null) => void,
): boolean;
/**
* If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
@@ -2086,6 +2113,57 @@
* **Default:** `process.env`.
*/
execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
+ // #region InternalEventEmitter
+ addListener<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ emit<E extends keyof ProcessEventMap>(eventName: E, ...args: ProcessEventMap[E]): boolean;
+ emit(eventName: string | symbol, ...args: any[]): boolean;
+ listenerCount<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener?: (...args: ProcessEventMap[E]) => void,
+ ): number;
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+ listeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+ off<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ on<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ once<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ rawListeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+ removeAllListeners<E extends keyof ProcessEventMap>(eventName?: E): this;
+ removeAllListeners(eventName?: string | symbol): this;
+ removeListener<E extends keyof ProcessEventMap>(
+ eventName: E,
+ listener: (...args: ProcessEventMap[E]) => void,
+ ): this;
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ // #endregion
}
}
}
--
Gitblit v1.9.3