@types/node 16.18.53 → 16.18.54

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 (100) hide show
  1. node v16.18/README.md +1 -1
  2. node v16.18/assert/strict.d.ts +4 -4
  3. node v16.18/assert.d.ts +48 -24
  4. node v16.18/async_hooks.d.ts +10 -7
  5. node v16.18/buffer.d.ts +47 -24
  6. node v16.18/child_process.d.ts +262 -122
  7. node v16.18/cluster.d.ts +107 -89
  8. node v16.18/console.d.ts +7 -7
  9. node v16.18/constants.d.ts +12 -11
  10. node v16.18/crypto.d.ts +738 -267
  11. node v16.18/dgram.d.ts +81 -45
  12. node v16.18/diagnostics_channel.d.ts +3 -3
  13. node v16.18/dns/promises.d.ts +28 -25
  14. node v16.18/dns.d.ts +202 -61
  15. node v16.18/domain.d.ts +4 -4
  16. node v16.18/events.d.ts +15 -7
  17. node v16.18/fs/promises.d.ts +93 -64
  18. node v16.18/fs.d.ts +485 -290
  19. node v16.18/globals.d.ts +13 -13
  20. node v16.18/http.d.ts +177 -177
  21. node v16.18/http2.d.ts +628 -376
  22. node v16.18/https.d.ts +107 -105
  23. node v16.18/module.d.ts +11 -8
  24. node v16.18/net.d.ts +106 -87
  25. node v16.18/os.d.ts +7 -7
  26. node v16.18/package.json +2 -2
  27. node v16.18/path.d.ts +13 -13
  28. node v16.18/perf_hooks.d.ts +17 -15
  29. node v16.18/process.d.ts +144 -124
  30. node v16.18/punycode.d.ts +3 -3
  31. node v16.18/querystring.d.ts +14 -4
  32. node v16.18/readline.d.ts +64 -54
  33. node v16.18/repl.d.ts +67 -61
  34. node v16.18/stream/consumers.d.ts +4 -4
  35. node v16.18/stream/promises.d.ts +56 -15
  36. node v16.18/stream/web.d.ts +19 -19
  37. node v16.18/stream.d.ts +314 -216
  38. node v16.18/string_decoder.d.ts +3 -3
  39. node v16.18/test.d.ts +2 -2
  40. node v16.18/timers/promises.d.ts +4 -4
  41. node v16.18/timers.d.ts +23 -8
  42. node v16.18/tls.d.ts +150 -71
  43. node v16.18/trace_events.d.ts +3 -3
  44. node v16.18/ts4.8/assert/strict.d.ts +4 -4
  45. node v16.18/ts4.8/assert.d.ts +48 -24
  46. node v16.18/ts4.8/async_hooks.d.ts +10 -7
  47. node v16.18/ts4.8/buffer.d.ts +47 -24
  48. node v16.18/ts4.8/child_process.d.ts +262 -122
  49. node v16.18/ts4.8/cluster.d.ts +107 -89
  50. node v16.18/ts4.8/console.d.ts +7 -7
  51. node v16.18/ts4.8/constants.d.ts +12 -11
  52. node v16.18/ts4.8/crypto.d.ts +738 -267
  53. node v16.18/ts4.8/dgram.d.ts +81 -45
  54. node v16.18/ts4.8/diagnostics_channel.d.ts +3 -3
  55. node v16.18/ts4.8/dns/promises.d.ts +28 -25
  56. node v16.18/ts4.8/dns.d.ts +202 -61
  57. node v16.18/ts4.8/domain.d.ts +4 -4
  58. node v16.18/ts4.8/events.d.ts +15 -7
  59. node v16.18/ts4.8/fs/promises.d.ts +93 -64
  60. node v16.18/ts4.8/fs.d.ts +485 -290
  61. node v16.18/ts4.8/globals.d.ts +13 -13
  62. node v16.18/ts4.8/http.d.ts +176 -176
  63. node v16.18/ts4.8/http2.d.ts +628 -376
  64. node v16.18/ts4.8/https.d.ts +107 -105
  65. node v16.18/ts4.8/module.d.ts +11 -8
  66. node v16.18/ts4.8/net.d.ts +106 -87
  67. node v16.18/ts4.8/os.d.ts +7 -7
  68. node v16.18/ts4.8/path.d.ts +13 -13
  69. node v16.18/ts4.8/perf_hooks.d.ts +17 -15
  70. node v16.18/ts4.8/process.d.ts +144 -124
  71. node v16.18/ts4.8/punycode.d.ts +3 -3
  72. node v16.18/ts4.8/querystring.d.ts +14 -4
  73. node v16.18/ts4.8/readline.d.ts +64 -54
  74. node v16.18/ts4.8/repl.d.ts +67 -61
  75. node v16.18/ts4.8/stream/consumers.d.ts +4 -4
  76. node v16.18/ts4.8/stream/promises.d.ts +56 -15
  77. node v16.18/ts4.8/stream/web.d.ts +19 -19
  78. node v16.18/ts4.8/stream.d.ts +309 -214
  79. node v16.18/ts4.8/string_decoder.d.ts +3 -3
  80. node v16.18/ts4.8/test.d.ts +2 -2
  81. node v16.18/ts4.8/timers/promises.d.ts +4 -4
  82. node v16.18/ts4.8/timers.d.ts +23 -8
  83. node v16.18/ts4.8/tls.d.ts +150 -71
  84. node v16.18/ts4.8/trace_events.d.ts +3 -3
  85. node v16.18/ts4.8/tty.d.ts +10 -10
  86. node v16.18/ts4.8/url.d.ts +26 -14
  87. node v16.18/ts4.8/util.d.ts +122 -51
  88. node v16.18/ts4.8/v8.d.ts +4 -4
  89. node v16.18/ts4.8/vm.d.ts +18 -18
  90. node v16.18/ts4.8/wasi.d.ts +3 -3
  91. node v16.18/ts4.8/worker_threads.d.ts +77 -77
  92. node v16.18/ts4.8/zlib.d.ts +9 -9
  93. node v16.18/tty.d.ts +10 -10
  94. node v16.18/url.d.ts +26 -14
  95. node v16.18/util.d.ts +122 -51
  96. node v16.18/v8.d.ts +4 -4
  97. node v16.18/vm.d.ts +18 -18
  98. node v16.18/wasi.d.ts +3 -3
  99. node v16.18/worker_threads.d.ts +77 -77
  100. node v16.18/zlib.d.ts +9 -9
@@ -12,11 +12,15 @@
12
12
  * ```
13
13
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js)
14
14
  */
15
- declare module 'net' {
16
- import * as stream from 'node:stream';
17
- import { Abortable, EventEmitter } from 'node:events';
18
- import * as dns from 'node:dns';
19
- type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
15
+ declare module "net" {
16
+ import * as stream from "node:stream";
17
+ import { Abortable, EventEmitter } from "node:events";
18
+ import * as dns from "node:dns";
19
+ type LookupFunction = (
20
+ hostname: string,
21
+ options: dns.LookupOneOptions,
22
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
23
+ ) => void;
20
24
  interface AddressInfo {
21
25
  address: string;
22
26
  family: string;
@@ -62,7 +66,7 @@ declare module 'net' {
62
66
  path: string;
63
67
  }
64
68
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
65
- type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
69
+ type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
66
70
  /**
67
71
  * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
68
72
  * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
@@ -329,65 +333,80 @@ declare module 'net' {
329
333
  * 8. timeout
330
334
  */
331
335
  addListener(event: string, listener: (...args: any[]) => void): this;
332
- addListener(event: 'close', listener: (hadError: boolean) => void): this;
333
- addListener(event: 'connect', listener: () => void): this;
334
- addListener(event: 'data', listener: (data: Buffer) => void): this;
335
- addListener(event: 'drain', listener: () => void): this;
336
- addListener(event: 'end', listener: () => void): this;
337
- addListener(event: 'error', listener: (err: Error) => void): this;
338
- addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
339
- addListener(event: 'ready', listener: () => void): this;
340
- addListener(event: 'timeout', listener: () => void): this;
336
+ addListener(event: "close", listener: (hadError: boolean) => void): this;
337
+ addListener(event: "connect", listener: () => void): this;
338
+ addListener(event: "data", listener: (data: Buffer) => void): this;
339
+ addListener(event: "drain", listener: () => void): this;
340
+ addListener(event: "end", listener: () => void): this;
341
+ addListener(event: "error", listener: (err: Error) => void): this;
342
+ addListener(
343
+ event: "lookup",
344
+ listener: (err: Error, address: string, family: string | number, host: string) => void,
345
+ ): this;
346
+ addListener(event: "ready", listener: () => void): this;
347
+ addListener(event: "timeout", listener: () => void): this;
341
348
  emit(event: string | symbol, ...args: any[]): boolean;
342
- emit(event: 'close', hadError: boolean): boolean;
343
- emit(event: 'connect'): boolean;
344
- emit(event: 'data', data: Buffer): boolean;
345
- emit(event: 'drain'): boolean;
346
- emit(event: 'end'): boolean;
347
- emit(event: 'error', err: Error): boolean;
348
- emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
349
- emit(event: 'ready'): boolean;
350
- emit(event: 'timeout'): boolean;
349
+ emit(event: "close", hadError: boolean): boolean;
350
+ emit(event: "connect"): boolean;
351
+ emit(event: "data", data: Buffer): boolean;
352
+ emit(event: "drain"): boolean;
353
+ emit(event: "end"): boolean;
354
+ emit(event: "error", err: Error): boolean;
355
+ emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
356
+ emit(event: "ready"): boolean;
357
+ emit(event: "timeout"): boolean;
351
358
  on(event: string, listener: (...args: any[]) => void): this;
352
- on(event: 'close', listener: (hadError: boolean) => void): this;
353
- on(event: 'connect', listener: () => void): this;
354
- on(event: 'data', listener: (data: Buffer) => void): this;
355
- on(event: 'drain', listener: () => void): this;
356
- on(event: 'end', listener: () => void): this;
357
- on(event: 'error', listener: (err: Error) => void): this;
358
- on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
359
- on(event: 'ready', listener: () => void): this;
360
- on(event: 'timeout', listener: () => void): this;
359
+ on(event: "close", listener: (hadError: boolean) => void): this;
360
+ on(event: "connect", listener: () => void): this;
361
+ on(event: "data", listener: (data: Buffer) => void): this;
362
+ on(event: "drain", listener: () => void): this;
363
+ on(event: "end", listener: () => void): this;
364
+ on(event: "error", listener: (err: Error) => void): this;
365
+ on(
366
+ event: "lookup",
367
+ listener: (err: Error, address: string, family: string | number, host: string) => void,
368
+ ): this;
369
+ on(event: "ready", listener: () => void): this;
370
+ on(event: "timeout", listener: () => void): this;
361
371
  once(event: string, listener: (...args: any[]) => void): this;
362
- once(event: 'close', listener: (hadError: boolean) => void): this;
363
- once(event: 'connect', listener: () => void): this;
364
- once(event: 'data', listener: (data: Buffer) => void): this;
365
- once(event: 'drain', listener: () => void): this;
366
- once(event: 'end', listener: () => void): this;
367
- once(event: 'error', listener: (err: Error) => void): this;
368
- once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
369
- once(event: 'ready', listener: () => void): this;
370
- once(event: 'timeout', listener: () => void): this;
372
+ once(event: "close", listener: (hadError: boolean) => void): this;
373
+ once(event: "connect", listener: () => void): this;
374
+ once(event: "data", listener: (data: Buffer) => void): this;
375
+ once(event: "drain", listener: () => void): this;
376
+ once(event: "end", listener: () => void): this;
377
+ once(event: "error", listener: (err: Error) => void): this;
378
+ once(
379
+ event: "lookup",
380
+ listener: (err: Error, address: string, family: string | number, host: string) => void,
381
+ ): this;
382
+ once(event: "ready", listener: () => void): this;
383
+ once(event: "timeout", listener: () => void): this;
371
384
  prependListener(event: string, listener: (...args: any[]) => void): this;
372
- prependListener(event: 'close', listener: (hadError: boolean) => void): this;
373
- prependListener(event: 'connect', listener: () => void): this;
374
- prependListener(event: 'data', listener: (data: Buffer) => void): this;
375
- prependListener(event: 'drain', listener: () => void): this;
376
- prependListener(event: 'end', listener: () => void): this;
377
- prependListener(event: 'error', listener: (err: Error) => void): this;
378
- prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
379
- prependListener(event: 'ready', listener: () => void): this;
380
- prependListener(event: 'timeout', listener: () => void): this;
385
+ prependListener(event: "close", listener: (hadError: boolean) => void): this;
386
+ prependListener(event: "connect", listener: () => void): this;
387
+ prependListener(event: "data", listener: (data: Buffer) => void): this;
388
+ prependListener(event: "drain", listener: () => void): this;
389
+ prependListener(event: "end", listener: () => void): this;
390
+ prependListener(event: "error", listener: (err: Error) => void): this;
391
+ prependListener(
392
+ event: "lookup",
393
+ listener: (err: Error, address: string, family: string | number, host: string) => void,
394
+ ): this;
395
+ prependListener(event: "ready", listener: () => void): this;
396
+ prependListener(event: "timeout", listener: () => void): this;
381
397
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
382
- prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
383
- prependOnceListener(event: 'connect', listener: () => void): this;
384
- prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
385
- prependOnceListener(event: 'drain', listener: () => void): this;
386
- prependOnceListener(event: 'end', listener: () => void): this;
387
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
388
- prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
389
- prependOnceListener(event: 'ready', listener: () => void): this;
390
- prependOnceListener(event: 'timeout', listener: () => void): this;
398
+ prependOnceListener(event: "close", listener: (hadError: boolean) => void): this;
399
+ prependOnceListener(event: "connect", listener: () => void): this;
400
+ prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
401
+ prependOnceListener(event: "drain", listener: () => void): this;
402
+ prependOnceListener(event: "end", listener: () => void): this;
403
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
404
+ prependOnceListener(
405
+ event: "lookup",
406
+ listener: (err: Error, address: string, family: string | number, host: string) => void,
407
+ ): this;
408
+ prependOnceListener(event: "ready", listener: () => void): this;
409
+ prependOnceListener(event: "timeout", listener: () => void): this;
391
410
  }
392
411
  interface ListenOptions extends Abortable {
393
412
  port?: number | undefined;
@@ -571,37 +590,37 @@ declare module 'net' {
571
590
  * 4. listening
572
591
  */
573
592
  addListener(event: string, listener: (...args: any[]) => void): this;
574
- addListener(event: 'close', listener: () => void): this;
575
- addListener(event: 'connection', listener: (socket: Socket) => void): this;
576
- addListener(event: 'error', listener: (err: Error) => void): this;
577
- addListener(event: 'listening', listener: () => void): this;
593
+ addListener(event: "close", listener: () => void): this;
594
+ addListener(event: "connection", listener: (socket: Socket) => void): this;
595
+ addListener(event: "error", listener: (err: Error) => void): this;
596
+ addListener(event: "listening", listener: () => void): this;
578
597
  emit(event: string | symbol, ...args: any[]): boolean;
579
- emit(event: 'close'): boolean;
580
- emit(event: 'connection', socket: Socket): boolean;
581
- emit(event: 'error', err: Error): boolean;
582
- emit(event: 'listening'): boolean;
598
+ emit(event: "close"): boolean;
599
+ emit(event: "connection", socket: Socket): boolean;
600
+ emit(event: "error", err: Error): boolean;
601
+ emit(event: "listening"): boolean;
583
602
  on(event: string, listener: (...args: any[]) => void): this;
584
- on(event: 'close', listener: () => void): this;
585
- on(event: 'connection', listener: (socket: Socket) => void): this;
586
- on(event: 'error', listener: (err: Error) => void): this;
587
- on(event: 'listening', listener: () => void): this;
603
+ on(event: "close", listener: () => void): this;
604
+ on(event: "connection", listener: (socket: Socket) => void): this;
605
+ on(event: "error", listener: (err: Error) => void): this;
606
+ on(event: "listening", listener: () => void): this;
588
607
  once(event: string, listener: (...args: any[]) => void): this;
589
- once(event: 'close', listener: () => void): this;
590
- once(event: 'connection', listener: (socket: Socket) => void): this;
591
- once(event: 'error', listener: (err: Error) => void): this;
592
- once(event: 'listening', listener: () => void): this;
608
+ once(event: "close", listener: () => void): this;
609
+ once(event: "connection", listener: (socket: Socket) => void): this;
610
+ once(event: "error", listener: (err: Error) => void): this;
611
+ once(event: "listening", listener: () => void): this;
593
612
  prependListener(event: string, listener: (...args: any[]) => void): this;
594
- prependListener(event: 'close', listener: () => void): this;
595
- prependListener(event: 'connection', listener: (socket: Socket) => void): this;
596
- prependListener(event: 'error', listener: (err: Error) => void): this;
597
- prependListener(event: 'listening', listener: () => void): this;
613
+ prependListener(event: "close", listener: () => void): this;
614
+ prependListener(event: "connection", listener: (socket: Socket) => void): this;
615
+ prependListener(event: "error", listener: (err: Error) => void): this;
616
+ prependListener(event: "listening", listener: () => void): this;
598
617
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
599
- prependOnceListener(event: 'close', listener: () => void): this;
600
- prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
601
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
602
- prependOnceListener(event: 'listening', listener: () => void): this;
618
+ prependOnceListener(event: "close", listener: () => void): this;
619
+ prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
620
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
621
+ prependOnceListener(event: "listening", listener: () => void): this;
603
622
  }
604
- type IPVersion = 'ipv4' | 'ipv6';
623
+ type IPVersion = "ipv4" | "ipv6";
605
624
  /**
606
625
  * The `BlockList` object can be used with some network APIs to specify rules for
607
626
  * disabling inbound or outbound access to specific IP addresses, IP ranges, or
@@ -823,6 +842,6 @@ declare module 'net' {
823
842
  readonly flowlabel: number;
824
843
  }
825
844
  }
826
- declare module 'node:net' {
827
- export * from 'net';
845
+ declare module "node:net" {
846
+ export * from "net";
828
847
  }
@@ -7,7 +7,7 @@
7
7
  * ```
8
8
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js)
9
9
  */
10
- declare module 'os' {
10
+ declare module "os" {
11
11
  interface CpuInfo {
12
12
  model: string;
13
13
  speed: number;
@@ -27,11 +27,11 @@ declare module 'os' {
27
27
  cidr: string | null;
28
28
  }
29
29
  interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
30
- family: 'IPv4';
30
+ family: "IPv4";
31
31
  scopeid?: undefined;
32
32
  }
33
33
  interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
34
- family: 'IPv6';
34
+ family: "IPv6";
35
35
  scopeid: number;
36
36
  }
37
37
  interface UserInfo<T> {
@@ -227,7 +227,7 @@ declare module 'os' {
227
227
  * Throws a `SystemError` if a user has no `username` or `homedir`.
228
228
  * @since v6.0.0
229
229
  */
230
- function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
230
+ function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
231
231
  function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
232
232
  type SignalConstants = {
233
233
  [key in NodeJS.Signals]: number;
@@ -426,7 +426,7 @@ declare module 'os' {
426
426
  * Possible values are `'BE'` for big endian and `'LE'` for little endian.
427
427
  * @since v0.9.4
428
428
  */
429
- function endianness(): 'BE' | 'LE';
429
+ function endianness(): "BE" | "LE";
430
430
  /**
431
431
  * Returns the scheduling priority for the process specified by `pid`. If `pid` is
432
432
  * not provided or is `0`, the priority of the current process is returned.
@@ -451,6 +451,6 @@ declare module 'os' {
451
451
  function setPriority(priority: number): void;
452
452
  function setPriority(pid: number, priority: number): void;
453
453
  }
454
- declare module 'node:os' {
455
- export * from 'os';
454
+ declare module "node:os" {
455
+ export * from "os";
456
456
  }
@@ -1,9 +1,9 @@
1
- declare module 'path/posix' {
2
- import path = require('path');
1
+ declare module "path/posix" {
2
+ import path = require("path");
3
3
  export = path;
4
4
  }
5
- declare module 'path/win32' {
6
- import path = require('path');
5
+ declare module "path/win32" {
6
+ import path = require("path");
7
7
  export = path;
8
8
  }
9
9
  /**
@@ -15,7 +15,7 @@ declare module 'path/win32' {
15
15
  * ```
16
16
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js)
17
17
  */
18
- declare module 'path' {
18
+ declare module "path" {
19
19
  namespace path {
20
20
  /**
21
21
  * A parsed path object generated by path.parse() or consumed by path.format().
@@ -137,11 +137,11 @@ declare module 'path' {
137
137
  /**
138
138
  * The platform-specific file separator. '\\' or '/'.
139
139
  */
140
- readonly sep: '\\' | '/';
140
+ readonly sep: "\\" | "/";
141
141
  /**
142
142
  * The platform-specific file delimiter. ';' or ':'.
143
143
  */
144
- readonly delimiter: ';' | ':';
144
+ readonly delimiter: ";" | ":";
145
145
  /**
146
146
  * Returns an object from a path string - the opposite of format().
147
147
  *
@@ -177,15 +177,15 @@ declare module 'path' {
177
177
  const path: path.PlatformPath;
178
178
  export = path;
179
179
  }
180
- declare module 'node:path' {
181
- import path = require('path');
180
+ declare module "node:path" {
181
+ import path = require("path");
182
182
  export = path;
183
183
  }
184
- declare module 'node:path/posix' {
185
- import path = require('path/posix');
184
+ declare module "node:path/posix" {
185
+ import path = require("path/posix");
186
186
  export = path;
187
187
  }
188
- declare module 'node:path/win32' {
189
- import path = require('path/win32');
188
+ declare module "node:path/win32" {
189
+ import path = require("path/win32");
190
190
  export = path;
191
191
  }
@@ -28,9 +28,9 @@
28
28
  * ```
29
29
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js)
30
30
  */
31
- declare module 'perf_hooks' {
32
- import { AsyncResource } from 'node:async_hooks';
33
- type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
31
+ declare module "perf_hooks" {
32
+ import { AsyncResource } from "node:async_hooks";
33
+ type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http";
34
34
  interface NodeGCPerformanceDetail {
35
35
  /**
36
36
  * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
@@ -146,7 +146,10 @@ declare module 'perf_hooks' {
146
146
  * @param util1 The result of a previous call to eventLoopUtilization()
147
147
  * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
148
148
  */
149
- type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization;
149
+ type EventLoopUtilityFunction = (
150
+ util1?: EventLoopUtilization,
151
+ util2?: EventLoopUtilization,
152
+ ) => EventLoopUtilization;
150
153
  interface MarkOptions {
151
154
  /**
152
155
  * Additional optional detail to include with the mark.
@@ -425,13 +428,13 @@ declare module 'perf_hooks' {
425
428
  observe(
426
429
  options:
427
430
  | {
428
- entryTypes: ReadonlyArray<EntryType>;
429
- buffered?: boolean | undefined;
430
- }
431
+ entryTypes: ReadonlyArray<EntryType>;
432
+ buffered?: boolean | undefined;
433
+ }
431
434
  | {
432
- type: EntryType;
433
- buffered?: boolean | undefined;
434
- }
435
+ type: EntryType;
436
+ buffered?: boolean | undefined;
437
+ },
435
438
  ): void;
436
439
  }
437
440
  namespace constants {
@@ -581,7 +584,7 @@ declare module 'perf_hooks' {
581
584
  */
582
585
  function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
583
586
 
584
- import { performance as _performance } from 'perf_hooks';
587
+ import { performance as _performance } from "perf_hooks";
585
588
  global {
586
589
  /**
587
590
  * `performance` is a global reference for `require('perf_hooks').performance`
@@ -591,11 +594,10 @@ declare module 'perf_hooks' {
591
594
  var performance: typeof globalThis extends {
592
595
  onmessage: any;
593
596
  performance: infer T;
594
- }
595
- ? T
597
+ } ? T
596
598
  : typeof _performance;
597
599
  }
598
600
  }
599
- declare module 'node:perf_hooks' {
600
- export * from 'perf_hooks';
601
+ declare module "node:perf_hooks" {
602
+ export * from "perf_hooks";
601
603
  }