@types/node 20.5.5 → 20.5.6
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/module.d.ts +12 -5
- node/package.json +2 -2
- node/ts4.8/module.d.ts +12 -5
- node/ts4.8/vm.d.ts +2 -1
- node/vm.d.ts +2 -1
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (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: Thu, 24 Aug 2023
|
|
11
|
+
* Last updated: Thu, 24 Aug 2023 22:03:16 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/module.d.ts
CHANGED
|
@@ -93,6 +93,9 @@ declare module 'module' {
|
|
|
93
93
|
*/
|
|
94
94
|
findEntry(lineOffset: number, columnOffset: number): SourceMapping;
|
|
95
95
|
}
|
|
96
|
+
interface ImportAssertions extends NodeJS.Dict<string> {
|
|
97
|
+
type?: string | undefined;
|
|
98
|
+
}
|
|
96
99
|
type ModuleFormat = 'builtin' | 'commonjs' | 'json' | 'module' | 'wasm';
|
|
97
100
|
type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
|
|
98
101
|
interface GlobalPreloadContext {
|
|
@@ -114,7 +117,7 @@ declare module 'module' {
|
|
|
114
117
|
/**
|
|
115
118
|
* An object whose key-value pairs represent the assertions for the module to import
|
|
116
119
|
*/
|
|
117
|
-
importAssertions:
|
|
120
|
+
importAssertions: ImportAssertions;
|
|
118
121
|
/**
|
|
119
122
|
* The module importing this one, or undefined if this is the Node.js entry point
|
|
120
123
|
*/
|
|
@@ -128,7 +131,7 @@ declare module 'module' {
|
|
|
128
131
|
/**
|
|
129
132
|
* The import assertions to use when caching the module (optional; if excluded the input will be used)
|
|
130
133
|
*/
|
|
131
|
-
importAssertions?:
|
|
134
|
+
importAssertions?: ImportAssertions | undefined;
|
|
132
135
|
/**
|
|
133
136
|
* A signal that this hook intends to terminate the chain of `resolve` hooks.
|
|
134
137
|
* @default false
|
|
@@ -151,7 +154,7 @@ declare module 'module' {
|
|
|
151
154
|
type ResolveHook = (
|
|
152
155
|
specifier: string,
|
|
153
156
|
context: ResolveHookContext,
|
|
154
|
-
nextResolve: (specifier: string, context?: ResolveHookContext) => ResolveFnOutput
|
|
157
|
+
nextResolve: (specifier: string, context?: ResolveHookContext) => ResolveFnOutput | Promise<ResolveFnOutput>
|
|
155
158
|
) => ResolveFnOutput | Promise<ResolveFnOutput>;
|
|
156
159
|
interface LoadHookContext {
|
|
157
160
|
/**
|
|
@@ -165,7 +168,7 @@ declare module 'module' {
|
|
|
165
168
|
/**
|
|
166
169
|
* An object whose key-value pairs represent the assertions for the module to import
|
|
167
170
|
*/
|
|
168
|
-
importAssertions:
|
|
171
|
+
importAssertions: ImportAssertions;
|
|
169
172
|
}
|
|
170
173
|
interface LoadFnOutput {
|
|
171
174
|
format: ModuleFormat;
|
|
@@ -187,7 +190,11 @@ declare module 'module' {
|
|
|
187
190
|
* @param context Metadata about the module
|
|
188
191
|
* @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook
|
|
189
192
|
*/
|
|
190
|
-
type LoadHook = (
|
|
193
|
+
type LoadHook = (
|
|
194
|
+
url: string,
|
|
195
|
+
context: LoadHookContext,
|
|
196
|
+
nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>
|
|
197
|
+
) => LoadFnOutput | Promise<LoadFnOutput>;
|
|
191
198
|
}
|
|
192
199
|
interface Module extends NodeModule {}
|
|
193
200
|
class Module {
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.5.
|
|
3
|
+
"version": "20.5.6",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -227,6 +227,6 @@
|
|
|
227
227
|
},
|
|
228
228
|
"scripts": {},
|
|
229
229
|
"dependencies": {},
|
|
230
|
-
"typesPublisherContentHash": "
|
|
230
|
+
"typesPublisherContentHash": "388c88b629ed8230741d755cb5a27b192dcbfe96298b8de0939797b7aaaf2b78",
|
|
231
231
|
"typeScriptVersion": "4.3"
|
|
232
232
|
}
|
node/ts4.8/module.d.ts
CHANGED
|
@@ -93,6 +93,9 @@ declare module 'module' {
|
|
|
93
93
|
*/
|
|
94
94
|
findEntry(lineOffset: number, columnOffset: number): SourceMapping;
|
|
95
95
|
}
|
|
96
|
+
interface ImportAssertions extends NodeJS.Dict<string> {
|
|
97
|
+
type?: string | undefined;
|
|
98
|
+
}
|
|
96
99
|
type ModuleFormat = 'builtin' | 'commonjs' | 'json' | 'module' | 'wasm';
|
|
97
100
|
type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
|
|
98
101
|
interface GlobalPreloadContext {
|
|
@@ -114,7 +117,7 @@ declare module 'module' {
|
|
|
114
117
|
/**
|
|
115
118
|
* An object whose key-value pairs represent the assertions for the module to import
|
|
116
119
|
*/
|
|
117
|
-
importAssertions:
|
|
120
|
+
importAssertions: ImportAssertions;
|
|
118
121
|
/**
|
|
119
122
|
* The module importing this one, or undefined if this is the Node.js entry point
|
|
120
123
|
*/
|
|
@@ -128,7 +131,7 @@ declare module 'module' {
|
|
|
128
131
|
/**
|
|
129
132
|
* The import assertions to use when caching the module (optional; if excluded the input will be used)
|
|
130
133
|
*/
|
|
131
|
-
importAssertions?:
|
|
134
|
+
importAssertions?: ImportAssertions | undefined;
|
|
132
135
|
/**
|
|
133
136
|
* A signal that this hook intends to terminate the chain of `resolve` hooks.
|
|
134
137
|
* @default false
|
|
@@ -151,7 +154,7 @@ declare module 'module' {
|
|
|
151
154
|
type ResolveHook = (
|
|
152
155
|
specifier: string,
|
|
153
156
|
context: ResolveHookContext,
|
|
154
|
-
nextResolve: (specifier: string, context?: ResolveHookContext) => ResolveFnOutput
|
|
157
|
+
nextResolve: (specifier: string, context?: ResolveHookContext) => ResolveFnOutput | Promise<ResolveFnOutput>
|
|
155
158
|
) => ResolveFnOutput | Promise<ResolveFnOutput>;
|
|
156
159
|
interface LoadHookContext {
|
|
157
160
|
/**
|
|
@@ -165,7 +168,7 @@ declare module 'module' {
|
|
|
165
168
|
/**
|
|
166
169
|
* An object whose key-value pairs represent the assertions for the module to import
|
|
167
170
|
*/
|
|
168
|
-
importAssertions:
|
|
171
|
+
importAssertions: ImportAssertions;
|
|
169
172
|
}
|
|
170
173
|
interface LoadFnOutput {
|
|
171
174
|
format: ModuleFormat;
|
|
@@ -187,7 +190,11 @@ declare module 'module' {
|
|
|
187
190
|
* @param context Metadata about the module
|
|
188
191
|
* @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook
|
|
189
192
|
*/
|
|
190
|
-
type LoadHook = (
|
|
193
|
+
type LoadHook = (
|
|
194
|
+
url: string,
|
|
195
|
+
context: LoadHookContext,
|
|
196
|
+
nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>
|
|
197
|
+
) => LoadFnOutput | Promise<LoadFnOutput>;
|
|
191
198
|
}
|
|
192
199
|
interface Module extends NodeModule {}
|
|
193
200
|
class Module {
|
node/ts4.8/vm.d.ts
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
|
|
38
38
|
*/
|
|
39
39
|
declare module 'vm' {
|
|
40
|
+
import { ImportAssertions } from 'node:module';
|
|
40
41
|
interface Context extends NodeJS.Dict<any> {}
|
|
41
42
|
interface BaseOptions {
|
|
42
43
|
/**
|
|
@@ -66,7 +67,7 @@ declare module 'vm' {
|
|
|
66
67
|
* Called during evaluation of this module when `import()` is called.
|
|
67
68
|
* If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
|
|
68
69
|
*/
|
|
69
|
-
importModuleDynamically?: ((specifier: string, script: Script, importAssertions:
|
|
70
|
+
importModuleDynamically?: ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module) | undefined;
|
|
70
71
|
}
|
|
71
72
|
interface RunningScriptOptions extends BaseOptions {
|
|
72
73
|
/**
|
node/vm.d.ts
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
|
|
38
38
|
*/
|
|
39
39
|
declare module 'vm' {
|
|
40
|
+
import { ImportAssertions } from 'node:module';
|
|
40
41
|
interface Context extends NodeJS.Dict<any> {}
|
|
41
42
|
interface BaseOptions {
|
|
42
43
|
/**
|
|
@@ -66,7 +67,7 @@ declare module 'vm' {
|
|
|
66
67
|
* Called during evaluation of this module when `import()` is called.
|
|
67
68
|
* If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
|
|
68
69
|
*/
|
|
69
|
-
importModuleDynamically?: ((specifier: string, script: Script, importAssertions:
|
|
70
|
+
importModuleDynamically?: ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module) | undefined;
|
|
70
71
|
}
|
|
71
72
|
interface RunningScriptOptions extends BaseOptions {
|
|
72
73
|
/**
|