@types/node 16.11.24 → 16.11.27

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 v16.11/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/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 10 Feb 2022 10:01:31 GMT
11
+ * Last updated: Thu, 14 Apr 2022 06:31:28 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
node v16.11/net.d.ts CHANGED
@@ -59,6 +59,7 @@ declare module 'net' {
59
59
  path: string;
60
60
  }
61
61
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
62
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
62
63
  /**
63
64
  * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
64
65
  * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
@@ -262,6 +263,12 @@ declare module 'net' {
262
263
  * @since v0.9.6
263
264
  */
264
265
  readonly localPort?: number;
266
+ /**
267
+ * This property represents the state of the connection as a string.
268
+ * @see {https://nodejs.org/api/net.html#socketreadystate}
269
+ * @since v0.5.0
270
+ */
271
+ readonly readyState: SocketReadyState;
265
272
  /**
266
273
  * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
267
274
  * the socket is destroyed (for example, if the client disconnected).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.11.24",
3
+ "version": "16.11.27",
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": "0693ef3fe1b25dffce1c9abdae48d4fb78444f0ab3a0a3b086d3b963ef83fbe2",
224
- "typeScriptVersion": "3.8"
223
+ "typesPublisherContentHash": "0c0a53f9b9e5b161d165d8a3a15db894ea2e4ecfd06583cb9687936087ffcfa4",
224
+ "typeScriptVersion": "3.9"
225
225
  }
@@ -162,7 +162,8 @@ declare module 'stream/web' {
162
162
  pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
163
163
  pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
164
164
  tee(): [ReadableStream<R>, ReadableStream<R>];
165
- [Symbol.asyncIterator](options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
165
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
166
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
166
167
  }
167
168
 
168
169
  const ReadableStream: {
node v16.11/url.d.ts CHANGED
@@ -829,17 +829,21 @@ declare module 'url' {
829
829
  * https://nodejs.org/api/url.html#the-whatwg-url-api
830
830
  * @since v10.0.0
831
831
  */
832
- var URL: typeof globalThis extends { webkitURL: infer URL } ? URL : typeof _URL;
832
+ var URL:
833
+ // For compatibility with "dom" and "webworker" URL declarations
834
+ typeof globalThis extends { onmessage: any, URL: infer URL }
835
+ ? URL
836
+ : typeof _URL;
833
837
  /**
834
838
  * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
835
839
  * https://nodejs.org/api/url.html#class-urlsearchparams
836
840
  * @since v10.0.0
837
841
  */
838
- var URLSearchParams: {
839
- prototype: URLSearchParams;
840
- new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
841
- toString(): string;
842
- };
842
+ var URLSearchParams:
843
+ // For compatibility with "dom" and "webworker" URLSearchParams declarations
844
+ typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
845
+ ? URLSearchParams
846
+ : typeof _URLSearchParams;
843
847
  }
844
848
  }
845
849
  declare module 'node:url' {