@types/node 12.0.1 → 12.0.2
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 +1 -1
- node/fs.d.ts +10 -3
- node/package.json +2 -2
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:
|
|
11
|
+
* Last updated: Tue, 14 May 2019 22:04:14 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/fs.d.ts
CHANGED
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -206,6 +206,6 @@
|
|
|
206
206
|
},
|
|
207
207
|
"scripts": {},
|
|
208
208
|
"dependencies": {},
|
|
209
|
-
"typesPublisherContentHash": "
|
|
209
|
+
"typesPublisherContentHash": "47132d67cb9651de76893d99f5aea74537f07741291a5fd1f13009f53689281d",
|
|
210
210
|
"typeScriptVersion": "2.0"
|
|
211
211
|
}
|