@types/node 12.11.2 → 12.11.6

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 (http://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: Mon, 21 Oct 2019 16:05:07 GMT
11
+ * Last updated: Wed, 23 Oct 2019 22:10:09 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
14
14
 
node/assert.d.ts CHANGED
@@ -20,13 +20,9 @@ declare module "assert" {
20
20
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
21
21
  function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
22
22
  function ok(value: any, message?: string | Error): void;
23
- /** @deprecated since v9.9.0 - use strictEqual() instead. */
24
23
  function equal(actual: any, expected: any, message?: string | Error): void;
25
- /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
26
24
  function notEqual(actual: any, expected: any, message?: string | Error): void;
27
- /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
28
25
  function deepEqual(actual: any, expected: any, message?: string | Error): void;
29
- /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
30
26
  function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
31
27
  function strictEqual(actual: any, expected: any, message?: string | Error): void;
32
28
  function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
node/crypto.d.ts CHANGED
@@ -398,6 +398,8 @@ declare module "crypto" {
398
398
  }
399
399
  function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
400
400
  function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
401
+ function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
402
+ function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
401
403
  function getCiphers(): string[];
402
404
  function getCurves(): string[];
403
405
  function getHashes(): string[];
node/fs.d.ts CHANGED
@@ -2124,7 +2124,7 @@ declare module "fs" {
2124
2124
  * Asynchronous rmdir(2) - delete a directory.
2125
2125
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2126
2126
  */
2127
- function rmdir(path: PathLike): Promise<void>;
2127
+ function rmdir(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
2128
2128
 
2129
2129
  /**
2130
2130
  * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
node/globals.d.ts CHANGED
@@ -185,9 +185,6 @@ declare namespace setImmediate {
185
185
  }
186
186
  declare function clearImmediate(immediateId: NodeJS.Immediate): void;
187
187
 
188
- /**
189
- * @experimental
190
- */
191
188
  declare function queueMicrotask(callback: () => void): void;
192
189
 
193
190
  // TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
@@ -704,7 +701,8 @@ declare namespace NodeJS {
704
701
  | 'openbsd'
705
702
  | 'sunos'
706
703
  | 'win32'
707
- | 'cygwin';
704
+ | 'cygwin'
705
+ | 'netbsd';
708
706
 
709
707
  type Signals =
710
708
  "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
@@ -1156,4 +1154,8 @@ declare namespace NodeJS {
1156
1154
 
1157
1155
  type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
1158
1156
  type ArrayBufferView = TypedArray | DataView;
1157
+
1158
+ // The value type here is a "poor man's `unknown`". When these types support TypeScript
1159
+ // 3.0+, we can replace this with `unknown`.
1160
+ type PoorMansUnknown = {} | null | undefined;
1159
1161
  }
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.11.2",
3
+ "version": "12.11.6",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -211,6 +211,6 @@
211
211
  },
212
212
  "scripts": {},
213
213
  "dependencies": {},
214
- "typesPublisherContentHash": "c6de2ae0653f4c081ddafb7fda2e0869e04fac2cc87908f2f0cbb976b81b5a62",
214
+ "typesPublisherContentHash": "0d7c969086f55de8eae546ec29386e26049c7e43c687bebf68a52882a1dde37d",
215
215
  "typeScriptVersion": "2.0"
216
216
  }
node/querystring.d.ts CHANGED
@@ -11,10 +11,7 @@ declare module "querystring" {
11
11
  interface ParsedUrlQuery { [key: string]: string | string[]; }
12
12
 
13
13
  interface ParsedUrlQueryInput {
14
- [key: string]:
15
- // The value type here is a "poor man's `unknown`". When these types support TypeScript
16
- // 3.0+, we can replace this with `unknown`.
17
- {} | null | undefined;
14
+ [key: string]: NodeJS.PoorMansUnknown;
18
15
  }
19
16
 
20
17
  function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
node/tty.d.ts CHANGED
@@ -45,7 +45,8 @@ declare module "tty" {
45
45
  /**
46
46
  * Moves this WriteStream's cursor to the specified position.
47
47
  */
48
- cursorTo(x: number, y: number, callback?: () => void): boolean;
48
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
49
+ cursorTo(x: number, callback: () => void): boolean;
49
50
  /**
50
51
  * Moves this WriteStream's cursor relative to its current position.
51
52
  */
node/util.d.ts CHANGED
@@ -84,23 +84,25 @@ declare module "util" {
84
84
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
85
85
 
86
86
  function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
87
- function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
88
- function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise<void>;
89
- function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
90
- function promisify<T1>(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise<void>;
91
- function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
92
- function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
93
- function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
94
- function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
87
+ function promisify<TResult>(fn: (callback: (err: NodeJS.PoorMansUnknown, result: TResult) => void) => void): () => Promise<TResult>;
88
+ function promisify(fn: (callback: (err?: NodeJS.PoorMansUnknown) => void) => void): () => Promise<void>;
89
+ function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: NodeJS.PoorMansUnknown, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
90
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: NodeJS.PoorMansUnknown) => void) => void): (arg1: T1) => Promise<void>;
91
+ function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: NodeJS.PoorMansUnknown, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
92
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: NodeJS.PoorMansUnknown) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
93
+ function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.PoorMansUnknown, result: TResult) => void) => void):
94
+ (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
95
+ function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: NodeJS.PoorMansUnknown) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
95
96
  function promisify<T1, T2, T3, T4, TResult>(
96
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
97
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.PoorMansUnknown, result: TResult) => void) => void,
97
98
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
98
- function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
99
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: NodeJS.PoorMansUnknown) => void) => void):
100
+ (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
99
101
  function promisify<T1, T2, T3, T4, T5, TResult>(
100
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
102
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.PoorMansUnknown, result: TResult) => void) => void,
101
103
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
102
104
  function promisify<T1, T2, T3, T4, T5>(
103
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void,
105
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: NodeJS.PoorMansUnknown) => void) => void,
104
106
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
105
107
  function promisify(fn: Function): Function;
106
108