@types/node 18.0.0 → 18.0.3

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.
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (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: Wed, 15 Jun 2022 23:01:34 GMT
11
+ * Last updated: Wed, 06 Jul 2022 04:02:23 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/fs/promises.d.ts CHANGED
@@ -1107,7 +1107,7 @@ declare module 'fs/promises' {
1107
1107
  * @param dest destination path to copy to.
1108
1108
  * @return Fulfills with `undefined` upon success.
1109
1109
  */
1110
- function cp(source: string, destination: string, opts?: CopyOptions): Promise<void>;
1110
+ function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
1111
1111
  }
1112
1112
  declare module 'node:fs/promises' {
1113
1113
  export * from 'fs/promises';
node/fs.d.ts CHANGED
@@ -3838,8 +3838,8 @@ declare module 'fs' {
3838
3838
  * @param src source path to copy.
3839
3839
  * @param dest destination path to copy to.
3840
3840
  */
3841
- export function cp(source: string, destination: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
3842
- export function cp(source: string, destination: string, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
3841
+ export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
3842
+ export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
3843
3843
  /**
3844
3844
  * Synchronously copies the entire directory structure from `src` to `dest`,
3845
3845
  * including subdirectories and files.
@@ -3851,7 +3851,7 @@ declare module 'fs' {
3851
3851
  * @param src source path to copy.
3852
3852
  * @param dest destination path to copy to.
3853
3853
  */
3854
- export function cpSync(source: string, destination: string, opts?: CopyOptions): void;
3854
+ export function cpSync(source: string | URL, destination: string | URL, opts?: CopyOptions): void;
3855
3855
  }
3856
3856
  declare module 'node:fs' {
3857
3857
  export * from 'fs';
node/http.d.ts CHANGED
@@ -249,6 +249,16 @@ declare module 'http' {
249
249
  * @since v14.11.0
250
250
  */
251
251
  requestTimeout: number;
252
+ /**
253
+ * Closes all connections connected to this server.
254
+ * @since v18.2.0
255
+ */
256
+ closeAllConnections(): void;
257
+ /**
258
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
259
+ * @since v18.2.0
260
+ */
261
+ closeIdleConnections(): void;
252
262
  addListener(event: string, listener: (...args: any[]) => void): this;
253
263
  addListener(event: 'close', listener: () => void): this;
254
264
  addListener(event: 'connection', listener: (socket: Socket) => void): this;
node/https.d.ts CHANGED
@@ -34,6 +34,16 @@ declare module 'https' {
34
34
  class Server extends tls.Server {
35
35
  constructor(requestListener?: http.RequestListener);
36
36
  constructor(options: ServerOptions, requestListener?: http.RequestListener);
37
+ /**
38
+ * Closes all connections connected to this server.
39
+ * @since v18.2.0
40
+ */
41
+ closeAllConnections(): void;
42
+ /**
43
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
44
+ * @since v18.2.0
45
+ */
46
+ closeIdleConnections(): void;
37
47
  addListener(event: string, listener: (...args: any[]) => void): this;
38
48
  addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
39
49
  addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.0.0",
3
+ "version": "18.0.3",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  },
221
221
  "scripts": {},
222
222
  "dependencies": {},
223
- "typesPublisherContentHash": "7b0d8dcde4896c79ad74f0d57a24996d6812633e45ed2abd06201f1b078dd9db",
223
+ "typesPublisherContentHash": "f88edb516946d349187ba7de857caf040f59be37853483f48af1af856105ff55",
224
224
  "typeScriptVersion": "4.0"
225
225
  }
node/perf_hooks.d.ts CHANGED
@@ -507,6 +507,12 @@ declare module 'perf_hooks' {
507
507
  * @since v15.9.0, v14.18.0
508
508
  */
509
509
  recordDelta(): void;
510
+ /**
511
+ * Adds the values from other to this histogram.
512
+ * @since v17.4.0, v16.14.0
513
+ * @param other Recordable Histogram to combine with
514
+ */
515
+ add(other: RecordableHistogram): void;
510
516
  }
511
517
  /**
512
518
  * _This property is an extension by Node.js. It is not available in Web browsers._