@types/node 10.14.5 → 10.14.9

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 v10/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/v10
9
9
 
10
10
  Additional Details
11
- * Last updated: Fri, 19 Apr 2019 19:51:03 GMT
11
+ * Last updated: Tue, 11 Jun 2019 19:11:56 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
14
14
 
node v10/fs.d.ts CHANGED
@@ -858,7 +858,7 @@ declare module "fs" {
858
858
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
859
859
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
860
860
  */
861
- function readdir(path: PathLike, options: { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
861
+ function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
862
862
 
863
863
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
864
864
  namespace readdir {
@@ -888,7 +888,7 @@ declare module "fs" {
888
888
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
889
889
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
890
890
  */
891
- function __promisify__(path: PathLike, options: { withFileTypes: true }): Promise<Dirent[]>;
891
+ function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<Dirent[]>;
892
892
  }
893
893
 
894
894
  /**
@@ -913,11 +913,11 @@ declare module "fs" {
913
913
  function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[];
914
914
 
915
915
  /**
916
- * Asynchronous readdir(3) - read a directory.
916
+ * Synchronous readdir(3) - read a directory.
917
917
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
918
918
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
919
919
  */
920
- function readdirSync(path: PathLike, options: { withFileTypes: true }): Dirent[];
920
+ function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[];
921
921
 
922
922
  /**
923
923
  * Asynchronous close(2) - close a file descriptor.
@@ -2056,21 +2056,28 @@ declare module "fs" {
2056
2056
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2057
2057
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
2058
2058
  */
2059
- function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string[]>;
2059
+ function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
2060
2060
 
2061
2061
  /**
2062
2062
  * Asynchronous readdir(3) - read a directory.
2063
2063
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2064
2064
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
2065
2065
  */
2066
- function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer[]>;
2066
+ function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise<Buffer[]>;
2067
2067
 
2068
2068
  /**
2069
2069
  * Asynchronous readdir(3) - read a directory.
2070
2070
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2071
2071
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
2072
2072
  */
2073
- function readdir(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string[] | Buffer[]>;
2073
+ function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise<string[] | Buffer[]>;
2074
+
2075
+ /**
2076
+ * Asynchronous readdir(3) - read a directory.
2077
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2078
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
2079
+ */
2080
+ function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<Dirent[]>;
2074
2081
 
2075
2082
  /**
2076
2083
  * Asynchronous readlink(2) - read value of a symbolic link.
node v10/inspector.d.ts CHANGED
@@ -3156,7 +3156,7 @@ declare module "inspector" {
3156
3156
  function close(): void;
3157
3157
 
3158
3158
  /**
3159
- * Return the URL of the active inspector, or undefined if there is none.
3159
+ * Return the URL of the active inspector, or `undefined` if there is none.
3160
3160
  */
3161
- function url(): string;
3161
+ function url(): string | undefined;
3162
3162
  }
node v10/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "10.14.5",
3
+ "version": "10.14.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -196,6 +196,6 @@
196
196
  },
197
197
  "scripts": {},
198
198
  "dependencies": {},
199
- "typesPublisherContentHash": "17476ed7134e3ba19902a95755d27372ce2a2fbfe658dcc95084bd05b0e8f68f",
199
+ "typesPublisherContentHash": "f4a041133bf28aed618b2e8776c24e4965a99c9b5984b53559b60893d32253aa",
200
200
  "typeScriptVersion": "2.0"
201
201
  }
node v10/util.d.ts CHANGED
@@ -89,22 +89,22 @@ declare module "util" {
89
89
 
90
90
  function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
91
91
  function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
92
- function promisify(fn: (callback: (err?: Error) => void) => void): () => Promise<void>;
92
+ function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise<void>;
93
93
  function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
94
- function promisify<T1>(fn: (arg1: T1, callback: (err?: Error) => void) => void): (arg1: T1) => Promise<void>;
94
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise<void>;
95
95
  function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
96
- function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
96
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
97
97
  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>;
98
- function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
98
+ 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>;
99
99
  function promisify<T1, T2, T3, T4, TResult>(
100
100
  fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
101
101
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
102
- function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
102
+ 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>;
103
103
  function promisify<T1, T2, T3, T4, T5, TResult>(
104
104
  fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
105
105
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
106
106
  function promisify<T1, T2, T3, T4, T5>(
107
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error) => void) => void,
107
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void,
108
108
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
109
109
  function promisify(fn: Function): Function;
110
110