@types/node 18.19.25 → 18.19.26
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 v18.19/README.md +1 -1
- node v18.19/package.json +2 -2
- node v18.19/wasi.d.ts +11 -9
node v18.19/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/v18.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
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 v18.19/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.19.
|
|
3
|
+
"version": "18.19.26",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -217,6 +217,6 @@
|
|
|
217
217
|
"dependencies": {
|
|
218
218
|
"undici-types": "~5.26.4"
|
|
219
219
|
},
|
|
220
|
-
"typesPublisherContentHash": "
|
|
220
|
+
"typesPublisherContentHash": "d865d9e8b8eeacad3c30eb521f8013803059b8b517e651723a26234eca451004",
|
|
221
221
|
"typeScriptVersion": "4.7"
|
|
222
222
|
}
|
node v18.19/wasi.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* underlying operating system via a collection of POSIX-like functions.
|
|
4
4
|
*
|
|
5
5
|
* ```js
|
|
6
|
-
* import { readFile } from 'fs/promises';
|
|
6
|
+
* import { readFile } from 'node:fs/promises';
|
|
7
7
|
* import { WASI } from 'wasi';
|
|
8
|
-
* import { argv, env } from 'process';
|
|
8
|
+
* import { argv, env } from 'node:process';
|
|
9
9
|
*
|
|
10
10
|
* const wasi = new WASI({
|
|
11
11
|
* args: argv,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* wasi.start(instance);
|
|
28
28
|
* ```
|
|
29
29
|
*
|
|
30
|
-
* To run the above example, create a new WebAssembly text format file named`demo.wat`:
|
|
30
|
+
* To run the above example, create a new WebAssembly text format file named `demo.wat`:
|
|
31
31
|
*
|
|
32
32
|
* ```text
|
|
33
33
|
* (module
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
* The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
|
|
69
69
|
* example to run.
|
|
70
70
|
* @experimental
|
|
71
|
-
* @see [source](https://github.com/nodejs/node/blob/v18.
|
|
71
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.19.1/lib/wasi.js)
|
|
72
72
|
*/
|
|
73
73
|
declare module "wasi" {
|
|
74
74
|
interface WASIOptions {
|
|
@@ -76,11 +76,13 @@ declare module "wasi" {
|
|
|
76
76
|
* An array of strings that the WebAssembly application will
|
|
77
77
|
* see as command line arguments. The first argument is the virtual path to the
|
|
78
78
|
* WASI command itself.
|
|
79
|
+
* @default []
|
|
79
80
|
*/
|
|
80
81
|
args?: string[] | undefined;
|
|
81
82
|
/**
|
|
82
83
|
* An object similar to `process.env` that the WebAssembly
|
|
83
84
|
* application will see as its environment.
|
|
85
|
+
* @default {}
|
|
84
86
|
*/
|
|
85
87
|
env?: object | undefined;
|
|
86
88
|
/**
|
|
@@ -117,17 +119,17 @@ declare module "wasi" {
|
|
|
117
119
|
/**
|
|
118
120
|
* The `WASI` class provides the WASI system call API and additional convenience
|
|
119
121
|
* methods for working with WASI-based applications. Each `WASI` instance
|
|
120
|
-
* represents a distinct sandbox environment. For security purposes, each `WASI`instance must have its command-line arguments, environment variables, and
|
|
122
|
+
* represents a distinct sandbox environment. For security purposes, each `WASI` instance must have its command-line arguments, environment variables, and
|
|
121
123
|
* sandbox directory structure configured explicitly.
|
|
122
124
|
* @since v13.3.0, v12.16.0
|
|
123
125
|
*/
|
|
124
126
|
class WASI {
|
|
125
127
|
constructor(options?: WASIOptions);
|
|
126
128
|
/**
|
|
127
|
-
* 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()`
|
|
129
|
+
* 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()`
|
|
128
130
|
* export, then an exception is thrown.
|
|
129
131
|
*
|
|
130
|
-
* `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
|
|
132
|
+
* `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
|
|
131
133
|
* `instance` does not have a `memory` export an exception is thrown.
|
|
132
134
|
*
|
|
133
135
|
* If `start()` is called more than once, an exception is thrown.
|
|
@@ -135,9 +137,9 @@ declare module "wasi" {
|
|
|
135
137
|
*/
|
|
136
138
|
start(instance: object): number; // TODO: avoid DOM dependency until WASM moved to own lib.
|
|
137
139
|
/**
|
|
138
|
-
* 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.
|
|
140
|
+
* 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.
|
|
139
141
|
*
|
|
140
|
-
* `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
|
|
142
|
+
* `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`.
|
|
141
143
|
* If `instance` does not have a `memory` export an exception is thrown.
|
|
142
144
|
*
|
|
143
145
|
* If `initialize()` is called more than once, an exception is thrown.
|