@types/node 14.11.4 → 14.11.5

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.
Files changed (4) hide show
  1. node/README.md +1 -1
  2. node/package.json +2 -2
  3. node/wasi.d.ts +35 -1
  4. node/zlib.d.ts +3 -0
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: Tue, 06 Oct 2020 00:12:23 GMT
11
+ * Last updated: Tue, 06 Oct 2020 05:46:06 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.11.4",
3
+ "version": "14.11.5",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -246,6 +246,6 @@
246
246
  },
247
247
  "scripts": {},
248
248
  "dependencies": {},
249
- "typesPublisherContentHash": "c9f281dca3a2c83d3ec1cb1962cf197c93097f9401920f7d394a27de75625caa",
249
+ "typesPublisherContentHash": "5e34ee10bcfbd6459166c194b3c6ba92abd61512eb102d4c4365c95af0c67dbc",
250
250
  "typeScriptVersion": "3.2"
251
251
  }
node/wasi.d.ts CHANGED
@@ -6,11 +6,13 @@ declare module 'wasi' {
6
6
  * WASI command itself.
7
7
  */
8
8
  args?: string[];
9
+
9
10
  /**
10
11
  * An object similar to `process.env` that the WebAssembly
11
12
  * application will see as its environment.
12
13
  */
13
14
  env?: object;
15
+
14
16
  /**
15
17
  * This object represents the WebAssembly application's
16
18
  * sandbox directory structure. The string keys of `preopens` are treated as
@@ -27,6 +29,24 @@ declare module 'wasi' {
27
29
  * @default false
28
30
  */
29
31
  returnOnExit?: boolean;
32
+
33
+ /**
34
+ * The file descriptor used as standard input in the WebAssembly application.
35
+ * @default 0
36
+ */
37
+ stdin?: number;
38
+
39
+ /**
40
+ * The file descriptor used as standard output in the WebAssembly application.
41
+ * @default 1
42
+ */
43
+ stdout?: number;
44
+
45
+ /**
46
+ * The file descriptor used as standard error in the WebAssembly application.
47
+ * @default 2
48
+ */
49
+ stderr?: number;
30
50
  }
31
51
 
32
52
  class WASI {
@@ -40,11 +60,25 @@ declare module 'wasi' {
40
60
  *
41
61
  * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
42
62
  * `memory`. If `instance` does not have a `memory` export an exception is thrown.
63
+ *
64
+ * If `start()` is called more than once, an exception is thrown.
43
65
  */
44
66
  start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
67
+
68
+ /**
69
+ * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
70
+ * If `instance` contains a `_start()` export, then an exception is thrown.
71
+ *
72
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
73
+ * `memory`. If `instance` does not have a `memory` export an exception is thrown.
74
+ *
75
+ * If `initialize()` is called more than once, an exception is thrown.
76
+ */
77
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
78
+
45
79
  /**
46
80
  * Is an object that implements the WASI system call API. This object
47
- * should be passed as the `wasi_unstable` import during the instantiation of a
81
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
48
82
  * [`WebAssembly.Instance`][].
49
83
  */
50
84
  readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
node/zlib.d.ts CHANGED
@@ -19,6 +19,8 @@ declare module "zlib" {
19
19
  memLevel?: number; // compression only
20
20
  strategy?: number; // compression only
21
21
  dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
22
+ info?: boolean;
23
+ maxOutputLength?: number;
22
24
  }
23
25
 
24
26
  interface BrotliOptions {
@@ -40,6 +42,7 @@ declare module "zlib" {
40
42
  */
41
43
  [key: number]: boolean | number;
42
44
  };
45
+ maxOutputLength?: number;
43
46
  }
44
47
 
45
48
  interface Zlib {