@types/node 14.18.18 → 14.18.21

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 v14.18/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/v14.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 12 May 2022 21:31:47 GMT
11
+ * Last updated: Tue, 07 Jun 2022 19:01:36 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
@@ -184,10 +184,11 @@ declare module 'fs/promises' {
184
184
  /**
185
185
  * Asynchronous open(2) - open and possibly create a file.
186
186
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
187
- * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
187
+ * @param [flags='r'] See `support of file system `flags``.
188
+ * @param [mode] A file mode. If a string is passed, it is parsed as an octal integer. If not
188
189
  * supplied, defaults to `0o666`.
189
190
  */
190
- function open(path: PathLike, flags: string | number, mode?: Mode): Promise<FileHandle>;
191
+ function open(path: PathLike, flags?: string | number, mode?: string | number): Promise<FileHandle>;
191
192
 
192
193
  /**
193
194
  * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
node v14.18/fs.d.ts CHANGED
@@ -1264,15 +1264,23 @@ declare module 'fs' {
1264
1264
  /**
1265
1265
  * Asynchronous open(2) - open and possibly create a file.
1266
1266
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1267
- * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1267
+ * @param [flags='r'] See `support of file system `flags``.
1268
+ * @param [mode=0o666]
1269
+ */
1270
+ export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1271
+
1272
+ /**
1273
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
1274
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1275
+ * @param [flags='r'] See `support of file system `flags``.
1268
1276
  */
1269
- export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1277
+ export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1270
1278
 
1271
1279
  /**
1272
1280
  * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
1273
1281
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1274
1282
  */
1275
- export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1283
+ export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1276
1284
 
1277
1285
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1278
1286
  export namespace open {
@@ -52,9 +52,9 @@ declare namespace setTimeout {
52
52
  function __promisify__(ms: number): Promise<void>;
53
53
  function __promisify__<T>(ms: number, value: T): Promise<T>;
54
54
  }
55
- declare function clearTimeout(timeoutId: NodeJS.Timeout | undefined): void;
55
+ declare function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
56
56
  declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
57
- declare function clearInterval(intervalId: NodeJS.Timeout | undefined): void;
57
+ declare function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
58
58
  declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
59
59
  declare namespace setImmediate {
60
60
  function __promisify__(): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.18.18",
3
+ "version": "14.18.21",
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": "43b8056dd94a3de8b9b283cda28627a89fb71037ce02af0bb65ec41e489fe766",
223
+ "typesPublisherContentHash": "0e120850d2efd3c212686946890a557c78b49f575a98e7575b49a55b2ddd9e90",
224
224
  "typeScriptVersion": "3.9"
225
225
  }
node v14.18/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>;
node v14.18/tls.d.ts CHANGED
@@ -147,7 +147,7 @@ declare module 'tls' {
147
147
  * Static boolean value, always true.
148
148
  * May be used to distinguish TLS sockets from regular ones.
149
149
  */
150
- encrypted: boolean;
150
+ encrypted: true;
151
151
 
152
152
  /**
153
153
  * String containing the selected ALPN protocol.