From 7cc61855cb1582f8ee852919da17e74448d4bdff Mon Sep 17 00:00:00 2001 From: Yukihiro Hasegawa <49516827+y-hsgw@users.noreply.github.com> Date: Sun, 14 Dec 2025 08:49:10 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74184=20node/proce?= =?UTF-8?q?ss:=20add=20process.noDeprecation=20by=20@y-hsgw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node/process.d.ts | 5 +++++ types/node/v20/process.d.ts | 5 +++++ types/node/v20/test/process.ts | 4 ++++ types/node/v22/process.d.ts | 5 +++++ types/node/v22/test/process.ts | 4 ++++ types/node/v24/process.d.ts | 5 +++++ types/node/v24/test/process.ts | 4 ++++ 7 files changed, 32 insertions(+) diff --git a/types/node/process.d.ts b/types/node/process.d.ts index 67a2705010637e..b3082eb7132f6b 100644 --- a/types/node/process.d.ts +++ b/types/node/process.d.ts @@ -1826,6 +1826,11 @@ declare module "node:process" { * @param args Additional arguments to pass when invoking the `callback` */ nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; /** * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. * diff --git a/types/node/v20/process.d.ts b/types/node/v20/process.d.ts index 8e9df01dc36e0f..b4bf98992defbe 100644 --- a/types/node/v20/process.d.ts +++ b/types/node/v20/process.d.ts @@ -1637,6 +1637,11 @@ declare module "process" { * @param args Additional arguments to pass when invoking the `callback` */ nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; /** * This API is available through the [--experimental-permission](https://nodejs.org/api/cli.html#--experimental-permission) flag. * diff --git a/types/node/v20/test/process.ts b/types/node/v20/test/process.ts index 45a323586a054e..044dcaab6b0421 100644 --- a/types/node/v20/test/process.ts +++ b/types/node/v20/test/process.ts @@ -164,6 +164,10 @@ process.env.TZ = "test"; process.getActiveResourcesInfo(); // $ExpectType string[] } +{ + process.noDeprecation; // $ExpectType boolean | undefined +} + { process.permission.has("fs.read"); // $ExpectType boolean process.permission.has("fs.read", "./README.md"); // $ExpectType boolean diff --git a/types/node/v22/process.d.ts b/types/node/v22/process.d.ts index 368da9d398d291..b761ec170f5edd 100644 --- a/types/node/v22/process.d.ts +++ b/types/node/v22/process.d.ts @@ -1705,6 +1705,11 @@ declare module "process" { * @param args Additional arguments to pass when invoking the `callback` */ nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; /** * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. * diff --git a/types/node/v22/test/process.ts b/types/node/v22/test/process.ts index 941800ba2024f6..a87700e8e4be29 100644 --- a/types/node/v22/test/process.ts +++ b/types/node/v22/test/process.ts @@ -165,6 +165,10 @@ process.env.TZ = "test"; process.getActiveResourcesInfo(); // $ExpectType string[] } +{ + process.noDeprecation; // $ExpectType boolean | undefined +} + { process.permission.has("fs.read"); // $ExpectType boolean process.permission.has("fs.read", "./README.md"); // $ExpectType boolean diff --git a/types/node/v24/process.d.ts b/types/node/v24/process.d.ts index a49d2bd68cdb0b..c1108661abb1d3 100644 --- a/types/node/v24/process.d.ts +++ b/types/node/v24/process.d.ts @@ -1704,6 +1704,11 @@ declare module "process" { * @param args Additional arguments to pass when invoking the `callback` */ nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; /** * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. * diff --git a/types/node/v24/test/process.ts b/types/node/v24/test/process.ts index 941800ba2024f6..a87700e8e4be29 100644 --- a/types/node/v24/test/process.ts +++ b/types/node/v24/test/process.ts @@ -165,6 +165,10 @@ process.env.TZ = "test"; process.getActiveResourcesInfo(); // $ExpectType string[] } +{ + process.noDeprecation; // $ExpectType boolean | undefined +} + { process.permission.has("fs.read"); // $ExpectType boolean process.permission.has("fs.read", "./README.md"); // $ExpectType boolean