Skip to content

Commit 7cc6185

Browse files
authored
🤖 Merge PR DefinitelyTyped#74184 node/process: add process.noDeprecation by @y-hsgw
1 parent b3cc72a commit 7cc6185

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed

types/node/process.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,11 @@ declare module "node:process" {
18261826
* @param args Additional arguments to pass when invoking the `callback`
18271827
*/
18281828
nextTick(callback: Function, ...args: any[]): void;
1829+
/**
1830+
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1831+
* 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.
1832+
*/
1833+
noDeprecation?: boolean;
18291834
/**
18301835
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
18311836
*

types/node/v20/process.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,11 @@ declare module "process" {
16371637
* @param args Additional arguments to pass when invoking the `callback`
16381638
*/
16391639
nextTick(callback: Function, ...args: any[]): void;
1640+
/**
1641+
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1642+
* 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.
1643+
*/
1644+
noDeprecation?: boolean;
16401645
/**
16411646
* This API is available through the [--experimental-permission](https://nodejs.org/api/cli.html#--experimental-permission) flag.
16421647
*

types/node/v20/test/process.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ process.env.TZ = "test";
164164
process.getActiveResourcesInfo(); // $ExpectType string[]
165165
}
166166

167+
{
168+
process.noDeprecation; // $ExpectType boolean | undefined
169+
}
170+
167171
{
168172
process.permission.has("fs.read"); // $ExpectType boolean
169173
process.permission.has("fs.read", "./README.md"); // $ExpectType boolean

types/node/v22/process.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,11 @@ declare module "process" {
17051705
* @param args Additional arguments to pass when invoking the `callback`
17061706
*/
17071707
nextTick(callback: Function, ...args: any[]): void;
1708+
/**
1709+
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1710+
* 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.
1711+
*/
1712+
noDeprecation?: boolean;
17081713
/**
17091714
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
17101715
*

types/node/v22/test/process.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ process.env.TZ = "test";
165165
process.getActiveResourcesInfo(); // $ExpectType string[]
166166
}
167167

168+
{
169+
process.noDeprecation; // $ExpectType boolean | undefined
170+
}
171+
168172
{
169173
process.permission.has("fs.read"); // $ExpectType boolean
170174
process.permission.has("fs.read", "./README.md"); // $ExpectType boolean

types/node/v24/process.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,11 @@ declare module "process" {
17041704
* @param args Additional arguments to pass when invoking the `callback`
17051705
*/
17061706
nextTick(callback: Function, ...args: any[]): void;
1707+
/**
1708+
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1709+
* 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.
1710+
*/
1711+
noDeprecation?: boolean;
17071712
/**
17081713
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
17091714
*

types/node/v24/test/process.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ process.env.TZ = "test";
165165
process.getActiveResourcesInfo(); // $ExpectType string[]
166166
}
167167

168+
{
169+
process.noDeprecation; // $ExpectType boolean | undefined
170+
}
171+
168172
{
169173
process.permission.has("fs.read"); // $ExpectType boolean
170174
process.permission.has("fs.read", "./README.md"); // $ExpectType boolean

0 commit comments

Comments
 (0)