@types/node 12.20.51 → 12.20.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.
node v12.20/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/v12.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 10 May 2022 21:31:43 GMT
11
+ * Last updated: Tue, 31 May 2022 20:31:35 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node v12.20/fs.d.ts CHANGED
@@ -1089,15 +1089,23 @@ declare module 'fs' {
1089
1089
  /**
1090
1090
  * Asynchronous open(2) - open and possibly create a file.
1091
1091
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1092
- * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1092
+ * @param [flags='r'] See `support of file system `flags``.
1093
+ * @param [mode] A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1094
+ */
1095
+ function open(path: PathLike, flags: string | number | undefined, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1096
+
1097
+ /**
1098
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
1099
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1100
+ * @param [flags='r'] See `support of file system `flags``.
1093
1101
  */
1094
- function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1102
+ function open(path: PathLike, flags: string | number | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1095
1103
 
1096
1104
  /**
1097
1105
  * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
1098
1106
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1099
1107
  */
1100
- function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1108
+ function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1101
1109
 
1102
1110
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1103
1111
  namespace open {
@@ -2179,10 +2187,11 @@ declare module 'fs' {
2179
2187
  /**
2180
2188
  * Asynchronous open(2) - open and possibly create a file.
2181
2189
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2182
- * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
2190
+ * @param [flags='r'] See `support of file system `flags``.
2191
+ * @param [mode] A file mode. If a string is passed, it is parsed as an octal integer. If not
2183
2192
  * supplied, defaults to `0o666`.
2184
2193
  */
2185
- function open(path: PathLike, flags: string | number, mode?: string | number): Promise<FileHandle>;
2194
+ function open(path: PathLike, flags?: string | number, mode?: string | number): Promise<FileHandle>;
2186
2195
 
2187
2196
  /**
2188
2197
  * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
@@ -179,9 +179,9 @@ declare namespace setTimeout {
179
179
  function __promisify__(ms: number): Promise<void>;
180
180
  function __promisify__<T>(ms: number, value: T): Promise<T>;
181
181
  }
182
- declare function clearTimeout(timeoutId: NodeJS.Timeout | undefined): void;
182
+ declare function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
183
183
  declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
184
- declare function clearInterval(intervalId: NodeJS.Timeout | undefined): void;
184
+ declare function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
185
185
  declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
186
186
  declare namespace setImmediate {
187
187
  function __promisify__(): Promise<void>;
@@ -1249,8 +1249,8 @@ declare namespace NodeJS {
1249
1249
  WeakMap: WeakMapConstructor;
1250
1250
  WeakSet: WeakSetConstructor;
1251
1251
  clearImmediate: (immediateId: Immediate) => void;
1252
- clearInterval: (intervalId: Timeout) => void;
1253
- clearTimeout: (timeoutId: Timeout) => void;
1252
+ clearInterval: (intervalId: Timeout | string | number) => void;
1253
+ clearTimeout: (timeoutId: Timeout | string | number) => void;
1254
1254
  console: typeof console;
1255
1255
  decodeURI: typeof decodeURI;
1256
1256
  decodeURIComponent: typeof decodeURIComponent;
node v12.20/net.d.ts CHANGED
@@ -96,6 +96,11 @@ declare module 'net' {
96
96
  readonly remoteAddress?: string | undefined;
97
97
  readonly remoteFamily?: string | undefined;
98
98
  readonly remotePort?: number | undefined;
99
+ /**
100
+ * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
101
+ * @since v10.7.0
102
+ */
103
+ readonly timeout?: number | undefined;
99
104
 
100
105
  // Extended base methods
101
106
  end(cb?: () => void): this;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.20.51",
3
+ "version": "12.20.54",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -190,6 +190,6 @@
190
190
  },
191
191
  "scripts": {},
192
192
  "dependencies": {},
193
- "typesPublisherContentHash": "af09730afd3f1c1c28403f4ef9f3443c03b722f4973ff70e7dd0b0583ab97236",
193
+ "typesPublisherContentHash": "a1caa6442418f5145ca1c769707159412c35aa78705278349a4bbdf70f17013b",
194
194
  "typeScriptVersion": "3.9"
195
195
  }
node v12.20/timers.d.ts CHANGED
@@ -4,9 +4,9 @@ declare module 'timers' {
4
4
  function __promisify__(ms: number): Promise<void>;
5
5
  function __promisify__<T>(ms: number, value: T): Promise<T>;
6
6
  }
7
- function clearTimeout(timeoutId: NodeJS.Timeout | undefined): void;
7
+ function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
8
8
  function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
9
- function clearInterval(intervalId: NodeJS.Timeout | undefined): void;
9
+ function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
10
10
  function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
11
11
  namespace setImmediate {
12
12
  function __promisify__(): Promise<void>;