@types/node 22.15.27 → 22.15.28
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/package.json +2 -2
- node/vm.d.ts +48 -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: Fri, 30 May 2025
|
11
|
+
* Last updated: Fri, 30 May 2025 15:02:22 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": "22.15.
|
3
|
+
"version": "22.15.28",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -220,6 +220,6 @@
|
|
220
220
|
"undici-types": "~6.21.0"
|
221
221
|
},
|
222
222
|
"peerDependencies": {},
|
223
|
-
"typesPublisherContentHash": "
|
223
|
+
"typesPublisherContentHash": "db44d4d8e306b0a65418c772ae0993c94eeed587664db5b3b7b195e7f4b2e0aa",
|
224
224
|
"typeScriptVersion": "5.1"
|
225
225
|
}
|
node/vm.d.ts
CHANGED
@@ -56,6 +56,11 @@ declare module "vm" {
|
|
56
56
|
*/
|
57
57
|
columnOffset?: number | undefined;
|
58
58
|
}
|
59
|
+
type DynamicModuleLoader<T> = (
|
60
|
+
specifier: string,
|
61
|
+
referrer: T,
|
62
|
+
importAttributes: ImportAttributes,
|
63
|
+
) => Module | Promise<Module>;
|
59
64
|
interface ScriptOptions extends BaseOptions {
|
60
65
|
/**
|
61
66
|
* Provides an optional data with V8's code cache data for the supplied source.
|
@@ -69,7 +74,7 @@ declare module "vm" {
|
|
69
74
|
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
70
75
|
*/
|
71
76
|
importModuleDynamically?:
|
72
|
-
|
|
77
|
+
| DynamicModuleLoader<Script>
|
73
78
|
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
74
79
|
| undefined;
|
75
80
|
}
|
@@ -114,14 +119,30 @@ declare module "vm" {
|
|
114
119
|
* Provides an optional data with V8's code cache data for the supplied source.
|
115
120
|
*/
|
116
121
|
cachedData?: ScriptOptions["cachedData"] | undefined;
|
117
|
-
|
122
|
+
/**
|
123
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
124
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
125
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
126
|
+
*/
|
127
|
+
importModuleDynamically?:
|
128
|
+
| DynamicModuleLoader<Script>
|
129
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
130
|
+
| undefined;
|
118
131
|
}
|
119
132
|
interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
|
120
133
|
/**
|
121
134
|
* Provides an optional data with V8's code cache data for the supplied source.
|
122
135
|
*/
|
123
136
|
cachedData?: ScriptOptions["cachedData"] | undefined;
|
124
|
-
|
137
|
+
/**
|
138
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
139
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
140
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
141
|
+
*/
|
142
|
+
importModuleDynamically?:
|
143
|
+
| DynamicModuleLoader<Script>
|
144
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
145
|
+
| undefined;
|
125
146
|
}
|
126
147
|
interface CompileFunctionOptions extends BaseOptions {
|
127
148
|
/**
|
@@ -141,6 +162,15 @@ declare module "vm" {
|
|
141
162
|
* An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
|
142
163
|
*/
|
143
164
|
contextExtensions?: Object[] | undefined;
|
165
|
+
/**
|
166
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
167
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
168
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
169
|
+
*/
|
170
|
+
importModuleDynamically?:
|
171
|
+
| DynamicModuleLoader<ReturnType<typeof compileFunction>>
|
172
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
173
|
+
| undefined;
|
144
174
|
}
|
145
175
|
interface CreateContextOptions {
|
146
176
|
/**
|
@@ -175,6 +205,15 @@ declare module "vm" {
|
|
175
205
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
176
206
|
*/
|
177
207
|
microtaskMode?: "afterEvaluate" | undefined;
|
208
|
+
/**
|
209
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
210
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
211
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
212
|
+
*/
|
213
|
+
importModuleDynamically?:
|
214
|
+
| DynamicModuleLoader<Context>
|
215
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
216
|
+
| undefined;
|
178
217
|
}
|
179
218
|
type MeasureMemoryMode = "summary" | "detailed";
|
180
219
|
interface MeasureMemoryOptions {
|
@@ -865,13 +904,12 @@ declare module "vm" {
|
|
865
904
|
* Called during evaluation of this module to initialize the `import.meta`.
|
866
905
|
*/
|
867
906
|
initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
| undefined;
|
907
|
+
/**
|
908
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
909
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
910
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
911
|
+
*/
|
912
|
+
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
875
913
|
}
|
876
914
|
/**
|
877
915
|
* This feature is only available with the `--experimental-vm-modules` command
|