@types/node 20.11.29 → 20.11.30

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 (3) hide show
  1. node/README.md +1 -1
  2. node/package.json +2 -2
  3. node/wasi.d.ts +12 -10
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://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, 18 Mar 2024 19:35:28 GMT
11
+ * Last updated: Tue, 19 Mar 2024 12:41:20 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.11.29",
3
+ "version": "20.11.30",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~5.26.4"
214
214
  },
215
- "typesPublisherContentHash": "601e89c10ccbef86517c0e5c93b1ded9d6c14a61a4f2ddfde003e0eac55e8f2f",
215
+ "typesPublisherContentHash": "f32598ce514dab7b6619466fa574d45c878183cb69f626de9a4ba7676000d809",
216
216
  "typeScriptVersion": "4.7"
217
217
  }
node/wasi.d.ts CHANGED
@@ -29,7 +29,7 @@
29
29
  * wasi.start(instance);
30
30
  * ```
31
31
  *
32
- * To run the above example, create a new WebAssembly text format file named`demo.wat`:
32
+ * To run the above example, create a new WebAssembly text format file named `demo.wat`:
33
33
  *
34
34
  * ```text
35
35
  * (module
@@ -67,7 +67,7 @@
67
67
  * wat2wasm demo.wat
68
68
  * ```
69
69
  * @experimental
70
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/wasi.js)
70
+ * @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/wasi.js)
71
71
  */
72
72
  declare module "wasi" {
73
73
  interface WASIOptions {
@@ -75,11 +75,13 @@ declare module "wasi" {
75
75
  * An array of strings that the WebAssembly application will
76
76
  * see as command line arguments. The first argument is the virtual path to the
77
77
  * WASI command itself.
78
+ * @default []
78
79
  */
79
80
  args?: string[] | undefined;
80
81
  /**
81
82
  * An object similar to `process.env` that the WebAssembly
82
83
  * application will see as its environment.
84
+ * @default {}
83
85
  */
84
86
  env?: object | undefined;
85
87
  /**
@@ -91,7 +93,7 @@ declare module "wasi" {
91
93
  preopens?: NodeJS.Dict<string> | undefined;
92
94
  /**
93
95
  * By default, when WASI applications call `__wasi_proc_exit()`
94
- * `wasi.start()` will return with the exit code specified rather than terminatng the process.
96
+ * `wasi.start()` will return with the exit code specified rather than terminatng the process.
95
97
  * Setting this option to `false` will cause the Node.js process to exit with
96
98
  * the specified exit code instead.
97
99
  * @default true
@@ -114,10 +116,10 @@ declare module "wasi" {
114
116
  stderr?: number | undefined;
115
117
  /**
116
118
  * The version of WASI requested.
117
- * Currently the only supported versions are `'unstable'` and `'preview1'`.
118
- * @since v20.0.0
119
+ * Currently the only supported versions are `'unstable'` and `'preview1'`. This option is mandatory.
120
+ * @since v19.8.0
119
121
  */
120
- version: string;
122
+ version: "unstable" | "preview1";
121
123
  }
122
124
  /**
123
125
  * The `WASI` class provides the WASI system call API and additional convenience
@@ -145,10 +147,10 @@ declare module "wasi" {
145
147
  */
146
148
  getImportObject(): object;
147
149
  /**
148
- * Attempt to begin execution of `instance` as a WASI command by invoking its`_start()` export. If `instance` does not contain a `_start()` export, or if`instance` contains an `_initialize()`
150
+ * Attempt to begin execution of `instance` as a WASI command by invoking its `_start()` export. If `instance` does not contain a `_start()` export, or if `instance` contains an `_initialize()`
149
151
  * export, then an exception is thrown.
150
152
  *
151
- * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
153
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`. If
152
154
  * `instance` does not have a `memory` export an exception is thrown.
153
155
  *
154
156
  * If `start()` is called more than once, an exception is thrown.
@@ -156,9 +158,9 @@ declare module "wasi" {
156
158
  */
157
159
  start(instance: object): number; // TODO: avoid DOM dependency until WASM moved to own lib.
158
160
  /**
159
- * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
161
+ * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present. If `instance` contains a `_start()` export, then an exception is thrown.
160
162
  *
161
- * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
163
+ * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`.
162
164
  * If `instance` does not have a `memory` export an exception is thrown.
163
165
  *
164
166
  * If `initialize()` is called more than once, an exception is thrown.