@types/node 22.15.22 → 22.15.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. node/README.md +1 -1
  2. node/module.d.ts +18 -2
  3. node/package.json +2 -2
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 27 May 2025 17:34:27 GMT
11
+ * Last updated: Tue, 27 May 2025 18:40:40 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/module.d.ts CHANGED
@@ -225,12 +225,12 @@ declare module "module" {
225
225
  * See [load hook](https://nodejs.org/docs/latest-v22.x/api/module.html#loadurl-context-nextload).
226
226
  * @default undefined
227
227
  */
228
- load?: LoadHook | undefined;
228
+ load?: LoadHookSync | undefined;
229
229
  /**
230
230
  * See [resolve hook](https://nodejs.org/docs/latest-v22.x/api/module.html#resolvespecifier-context-nextresolve).
231
231
  * @default undefined
232
232
  */
233
- resolve?: ResolveHook | undefined;
233
+ resolve?: ResolveHookSync | undefined;
234
234
  }
235
235
  interface ModuleHooks {
236
236
  /**
@@ -429,6 +429,14 @@ declare module "module" {
429
429
  context?: Partial<ResolveHookContext>,
430
430
  ) => ResolveFnOutput | Promise<ResolveFnOutput>,
431
431
  ) => ResolveFnOutput | Promise<ResolveFnOutput>;
432
+ type ResolveHookSync = (
433
+ specifier: string,
434
+ context: ResolveHookContext,
435
+ nextResolve: (
436
+ specifier: string,
437
+ context?: Partial<ResolveHookContext>,
438
+ ) => ResolveFnOutput,
439
+ ) => ResolveFnOutput;
432
440
  interface LoadHookContext {
433
441
  /**
434
442
  * Export conditions of the relevant `package.json`
@@ -468,6 +476,14 @@ declare module "module" {
468
476
  context?: Partial<LoadHookContext>,
469
477
  ) => LoadFnOutput | Promise<LoadFnOutput>,
470
478
  ) => LoadFnOutput | Promise<LoadFnOutput>;
479
+ type LoadHookSync = (
480
+ url: string,
481
+ context: LoadHookContext,
482
+ nextLoad: (
483
+ url: string,
484
+ context?: Partial<LoadHookContext>,
485
+ ) => LoadFnOutput,
486
+ ) => LoadFnOutput;
471
487
  /**
472
488
  * `path` is the resolved path for the file for which a corresponding source map
473
489
  * should be fetched.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.22",
3
+ "version": "22.15.23",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.21.0"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "9dfe7a25be073d9a58330259517f55bb6e2172c83e0a85a82cbb2753c16d93f9",
223
+ "typesPublisherContentHash": "3844c0b84003a1c9382712245a57b4124212f8132db577606add964efd038ea4",
224
224
  "typeScriptVersion": "5.1"
225
225
  }